From 934c7ca435fa87d4f518ed0a67ebf1f69cae2b8f Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Fri, 21 Feb 2020 13:49:25 +0300 Subject: [PATCH] AZURE_EXTENSION_DIR --- images/linux/scripts/installers/azure-cli.sh | 7 +------ images/linux/scripts/installers/azure-devops-cli.sh | 5 +++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/images/linux/scripts/installers/azure-cli.sh b/images/linux/scripts/installers/azure-cli.sh index 665a188a8..713d23151 100644 --- a/images/linux/scripts/installers/azure-cli.sh +++ b/images/linux/scripts/installers/azure-cli.sh @@ -7,13 +7,8 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh -LSB_CODENAME=$(lsb_release -cs) - # Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) -echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $LSB_CODENAME main" | tee /etc/apt/sources.list.d/azure-cli.list -apt-key adv --keyserver packages.microsoft.com --recv-keys B02C46DF417A0893 -apt-get update -apt-get install -y --no-install-recommends apt-transport-https azure-cli +curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash # Run tests to determine that the software installed as expected echo "Testing to make sure that script performed as expected, and basic scenarios work" diff --git a/images/linux/scripts/installers/azure-devops-cli.sh b/images/linux/scripts/installers/azure-devops-cli.sh index 2529c53c2..e709243d6 100644 --- a/images/linux/scripts/installers/azure-devops-cli.sh +++ b/images/linux/scripts/installers/azure-devops-cli.sh @@ -7,6 +7,11 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh +# AZURE_EXTENSION_DIR shell variable defines where modules are installed +# https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-overview +export AZURE_EXTENSION_DIR=/opt/az/azcliextensions +echo "AZURE_EXTENSION_DIR=$AZURE_EXTENSION_DIR" | tee -a /etc/environment + # install azure devops Cli extension az extension add -n azure-devops