Skip to content

[CI] Overwrite AZURE_EXTENSION_DIR to fix bug that CI will fail if installing azure-devops extension#1493

Merged
haroldrandom merged 3 commits intoAzure:masterfrom
haroldrandom:devops-pr
Apr 2, 2020
Merged

[CI] Overwrite AZURE_EXTENSION_DIR to fix bug that CI will fail if installing azure-devops extension#1493
haroldrandom merged 3 commits intoAzure:masterfrom
haroldrandom:devops-pr

Conversation

@haroldrandom
Copy link
Copy Markdown
Contributor

@haroldrandom haroldrandom commented Apr 2, 2020

It's caused by ADO would install a global Azure CLI in /opt/az and pre-install azure-devops extension in /opt/az/azcliextenions. Besides, it will overwrite a environment variables AZURE_EXTENSION_DIR.

The value of overwritten AZURE_EXTENSION_DIR is /opt/az/azcliextensions, so when tring to install the same extension azure-devops but with different version like this #1482 does, CLI will complain about there is already an existing extension installed, so, CI will fail.

Have to overwrite the AZURE_EXTENSION_DIR back to normal to fix that.

Test Result in previous one commit:
image


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

@haroldrandom haroldrandom added the CI label Apr 2, 2020
@haroldrandom haroldrandom self-assigned this Apr 2, 2020
@haroldrandom haroldrandom changed the title test azure-devops linter Fix bug CI will fail if installing azure-devops extension Apr 2, 2020
@haroldrandom haroldrandom changed the title Fix bug CI will fail if installing azure-devops extension [CI] Fix bug CI will fail if installing azure-devops extension Apr 2, 2020
@haroldrandom haroldrandom marked this pull request as ready for review April 2, 2020 08:10
@haroldrandom haroldrandom changed the title [CI] Fix bug CI will fail if installing azure-devops extension [CI] Overwrite AZURE_EXTENSION_DIR to fix bug that CI will fail if installing azure-devops extension Apr 2, 2020
@haroldrandom haroldrandom added this to the S168 milestone Apr 2, 2020
@haroldrandom haroldrandom merged commit eb2e9a5 into Azure:master Apr 2, 2020
@haroldrandom haroldrandom deleted the devops-pr branch April 2, 2020 08:46
ManuInNZ pushed a commit to ManuInNZ/azure-cli-extensions that referenced this pull request Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants