Unverified Commit 0a4fa18e authored by Gaurav Saini's avatar Gaurav Saini Committed by GitHub

[azure-cli] - python3.12 - feature broken due to distutils module removed - code fix (#909)

* [azure-cli] - python3.12 - feature broken due to distutils module removed - fix

* update default for installUsingPython

* removed the installUsingPython=true flag from the building scenario

* bump update the patch version

---------
Co-authored-by: 's avatarSamruddhi Khandale <samruddhikhandale@github.com>
parent 0100f661
{
"id": "azure-cli",
"version": "1.2.2",
"version": "1.2.3",
"name": "Azure CLI",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/azure-cli",
"description": "Installs the Azure CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
......
......@@ -15,10 +15,10 @@ rm -rf /var/lib/apt/lists/*
AZ_VERSION=${VERSION:-"latest"}
AZ_EXTENSIONS=${EXTENSIONS}
AZ_INSTALLBICEP=${INSTALLBICEP:-false}
INSTALL_USING_PYTHON=${INSTALL_USING_PYTHON:-true}
INSTALL_USING_PYTHON=${INSTALL_USING_PYTHON:-false}
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
AZCLI_ARCHIVE_ARCHITECTURES="amd64"
AZCLI_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal jammy"
AZCLI_ARCHIVE_ARCHITECTURES="amd64 arm64"
AZCLI_ARCHIVE_VERSION_CODENAMES="stretch bookworm buster bullseye bionic focal jammy"
if [ "$(id -u)" -ne 0 ]; then
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
......@@ -183,7 +183,7 @@ install_with_complete_python_installation() {
export DEBIAN_FRONTEND=noninteractive
# See if we're on x86_64 and if so, install via apt-get, otherwise use pip3
# See if we're on x86_64 or AARCH64 and if so, install via apt-get, otherwise use pip3
echo "(*) Installing Azure CLI..."
. /etc/os-release
architecture="$(dpkg --print-architecture)"
......
#!/bin/bash
set -e
# Import test library for `check` command
source dev-container-features-test-lib
# Check to make sure the user is vscode
check "user is vscode" whoami | grep vscode
check "version" az --version
echo -e "\n\n🔄 Testing 'O.S'"
if cat /etc/os-release | grep -q 'PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"'; then
echo -e "\n\n✅ Passed 'O.S is Linux 12 (bookworm)'!"
else
echo -e "\n\n❌ Failed 'O.S is other than Linux 12 (bookworm)'!"
fi
# Report result
reportResults
\ No newline at end of file
......@@ -38,5 +38,14 @@
"installUsingPython": true
}
}
},
"install_with_python_3_12_bookworm": {
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
"user": "vscode",
"features": {
"azure-cli": {
"version": "latest"
}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment