Skip to content

Commit 0a82ddb

Browse files
authored
[azure-cli] - Fix azure-cli installation in debian trixie(13) (#1476)
1 parent 787dd39 commit 0a82ddb

File tree

6 files changed

+82
-2
lines changed

6 files changed

+82
-2
lines changed

src/azure-cli/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "azure-cli",
3-
"version": "1.2.7",
3+
"version": "1.2.8",
44
"name": "Azure CLI",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/azure-cli",
66
"description": "Installs the Azure CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",

src/azure-cli/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ AZ_BICEPVERSION=${BICEPVERSION:-latest}
1919
INSTALL_USING_PYTHON=${INSTALLUSINGPYTHON:-false}
2020
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
2121
AZCLI_ARCHIVE_ARCHITECTURES="amd64 arm64"
22-
AZCLI_ARCHIVE_VERSION_CODENAMES="stretch bookworm buster bullseye bionic focal jammy noble"
22+
AZCLI_ARCHIVE_VERSION_CODENAMES="stretch bookworm buster bullseye bionic focal jammy noble trixie"
2323

2424
if [ "$(id -u)" -ne 0 ]; then
2525
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Import test library for `check` command
6+
source dev-container-features-test-lib
7+
8+
# Check to make sure the user is vscode
9+
check "user is vscode" whoami | grep vscode
10+
11+
check "version" az --version
12+
13+
# Bicep-specific tests
14+
check "bicep" bicep --version
15+
check "az bicep" az bicep version
16+
17+
# Report result
18+
reportResults
19+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Import test library for `check` command
6+
source dev-container-features-test-lib
7+
8+
./install_extensions.sh
9+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Import test library for `check` command
6+
source dev-container-features-test-lib
7+
8+
9+
echo -e "\n🔄 Testing 'O.S'"
10+
if cat /etc/os-release | grep -q 'PRETTY_NAME="Debian GNU/Linux 13 (trixie)"'; then
11+
echo -e "\n✅ Passed 'O.S is Linux 13 (trixie)'!\n"
12+
else
13+
echo -e "\n❌ Failed 'O.S is other than Linux 13 (trixie)'!\n"
14+
fi
15+
16+
# Check to make sure the user is vscode
17+
check "user is vscode" whoami | grep vscode
18+
check "version" az --version
19+
20+
# Report result
21+
reportResults
22+

test/azure-cli/scenarios.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
{
2+
"install_extensions_trixie": {
3+
"image": "mcr.microsoft.com/devcontainers/base:trixie",
4+
"user": "vscode",
5+
"features": {
6+
"azure-cli": {
7+
"version": "latest",
8+
"extensions": "aks-preview,amg,containerapp"
9+
}
10+
}
11+
},
212
"install_extensions": {
313
"image": "mcr.microsoft.com/devcontainers/base:jammy",
414
"user": "vscode",
@@ -28,6 +38,16 @@
2838
"installBicep": true
2939
}
3040
}
41+
},
42+
"install_bicep_trixie": {
43+
"image": "mcr.microsoft.com/devcontainers/base:trixie",
44+
"user": "vscode",
45+
"features": {
46+
"azure-cli": {
47+
"version": "latest",
48+
"installBicep": true
49+
}
50+
}
3151
},
3252
"install_with_python": {
3353
"image": "mcr.microsoft.com/devcontainers/base:jammy",
@@ -39,6 +59,16 @@
3959
}
4060
}
4161
},
62+
"install_with_python_3_13_trixie": {
63+
"image": "mcr.microsoft.com/devcontainers/python:2-3.13-trixie",
64+
"user": "vscode",
65+
"features": {
66+
"azure-cli": {
67+
"version": "latest",
68+
"installUsingPython": true
69+
}
70+
}
71+
},
4272
"install_with_python_3_12_bookworm": {
4373
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
4474
"user": "vscode",

0 commit comments

Comments
 (0)