Skip to content

Commit 8b7d5f6

Browse files
authored
Revert "Implemented az-cli warmup (#11173)" (#11400)
This reverts commit ffe7e6a.
1 parent f92a955 commit 8b7d5f6

File tree

3 files changed

+10
-37
lines changed

3 files changed

+10
-37
lines changed

images/ubuntu/scripts/build/cleanup.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ if command -v journalctl; then
1919
journalctl --vacuum-time=1s
2020
fi
2121

22-
# remove redundant folders from azcli
23-
if [[ -z "${AZURE_CONFIG_DIR}" ]]; then
24-
rm -rf $AZURE_CONFIG_DIR/logs
25-
rm -rf $AZURE_CONFIG_DIR/commands
26-
rm -rf $AZURE_CONFIG_DIR/telemetry
27-
fi
28-
2922
# delete all .gz and rotated file
3023
find /var/log -type f -regex ".*\.gz$" -delete
3124
find /var/log -type f -regex ".*\.[0-9]$" -delete

images/ubuntu/scripts/build/install-azure-cli.sh

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,12 @@
44
## Desc: Install Azure CLI (az)
55
################################################################################
66

7-
# Source the helpers for use with the script
8-
source $HELPER_SCRIPTS/etc-environment.sh
9-
10-
# AZURE_CONFIG_DIR shell variable defines where the CLI configuration file for managing behavior are stored
11-
# https://learn.microsoft.com/en-us/cli/azure/azure-cli-configuration#cli-configuration-file
12-
# This path SHOULD be different from the installation directory /opt/az/
13-
export AZURE_CONFIG_DIR="/opt/az-config"
14-
mkdir -p $AZURE_CONFIG_DIR
15-
set_etc_environment_variable "AZURE_CONFIG_DIR" "${AZURE_CONFIG_DIR}"
16-
17-
# AZURE_EXTENSION_DIR shell variable defines where modules are installed
18-
# https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-overview
19-
# This path SHOULD be different from the installation directory /opt/az/
20-
export AZURE_EXTENSION_DIR="/opt/az-extension"
21-
mkdir -p $AZURE_EXTENSION_DIR
22-
set_etc_environment_variable "AZURE_EXTENSION_DIR" "${AZURE_EXTENSION_DIR}"
23-
247
# Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
258
curl -fsSL https://aka.ms/InstallAzureCLIDeb | sudo bash
269

2710
echo "azure-cli https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt" >> $HELPER_SCRIPTS/apt-sources.txt
2811

29-
# Remove Azure CLI repository (instructions taken from https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt#uninstall-azure-cli)
30-
rm -f /etc/apt/sources.list.d/azure-cli.sources
31-
32-
echo "Warmup 'az'"
33-
az --help > /dev/null
34-
if [ $? -ne 0 ]; then
35-
echo "Command 'az --help' failed"
36-
exit 1
37-
fi
38-
39-
# Hand over the ownership of the directories and files to the non-root user
40-
chown -R "$SUDO_USER:$SUDO_USER" $AZURE_CONFIG_DIR
41-
chown -R "$SUDO_USER:$SUDO_USER" $AZURE_EXTENSION_DIR
12+
rm -f /etc/apt/sources.list.d/azure-cli.list
13+
rm -f /etc/apt/sources.list.d/azure-cli.list.save
4214

4315
invoke_tests "CLI.Tools" "Azure CLI"

images/ubuntu/scripts/build/install-azure-devops-cli.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
## Desc: Install Azure DevOps CLI (az devops)
55
################################################################################
66

7+
# Source the helpers for use with the script
8+
source $HELPER_SCRIPTS/etc-environment.sh
9+
10+
# AZURE_EXTENSION_DIR shell variable defines where modules are installed
11+
# https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-overview
12+
export AZURE_EXTENSION_DIR=/opt/az/azcliextensions
13+
set_etc_environment_variable "AZURE_EXTENSION_DIR" "${AZURE_EXTENSION_DIR}"
14+
715
# install azure devops Cli extension
816
az extension add -n azure-devops
917

0 commit comments

Comments
 (0)