Skip to content

Commit 4d9c348

Browse files
authored
Merge branch 'main' into dependabot/go_modules/go-dependencies-07f835f864
2 parents ed4c5a5 + 21ead27 commit 4d9c348

4 files changed

Lines changed: 28 additions & 11 deletions

File tree

‎.github/workflows/functional-test-noncloud.yaml‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ env:
8787
GIT_HTTP_PASSWORD: not-a-secret-password
8888
# Kubernetes client QPS and Burst settings for high-concurrency CI environments
8989
RADIUS_QPS_AND_BURST: "800"
90+
# Bicep CLI pinned: v0.40+ rejects br:localhost:5000/... (ThrowIfRegistryNotTrusted).
91+
# Bump only after verifying localhost support or adding allowedUntrustedRegistries to bicepconfig.json.
92+
BICEP_VER: v0.42.1
9093

9194
jobs:
9295
changes:
@@ -248,6 +251,13 @@ jobs:
248251
registry-server: ${{ env.LOCAL_REGISTRY_SERVER }}
249252
registry-port: ${{ env.LOCAL_REGISTRY_PORT }}
250253

254+
- name: Setup and verify bicep CLI
255+
run: |
256+
curl -Lo bicep "https://github.com/Azure/bicep/releases/download/${{ env.BICEP_VER }}/bicep-linux-x64"
257+
chmod +x ./bicep
258+
sudo mv ./bicep /usr/local/bin/bicep
259+
bicep --version
260+
251261
- name: Publish bicep types
252262
run: |
253263
bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.LOCAL_REGISTRY_SERVER }}:${{ env.LOCAL_REGISTRY_PORT }}/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force
@@ -428,13 +438,6 @@ jobs:
428438
run: |
429439
make publish-test-terraform-recipes
430440
431-
- name: Setup and verify bicep CLI
432-
run: |
433-
curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
434-
chmod +x ./bicep
435-
sudo mv ./bicep /usr/local/bin/bicep
436-
bicep --version
437-
438441
- name: Publish bicep types
439442
run: |
440443
bicep publish-extension ./hack/bicep-types-radius/generated/index.json --target br:${{ env.LOCAL_REGISTRY_SERVER }}:${{ env.LOCAL_REGISTRY_PORT }}/radius:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force

‎.github/workflows/validate-bicep.yaml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ env:
3333
LOCAL_REGISTRY_SERVER: localhost
3434
# Local Docker registry port
3535
LOCAL_REGISTRY_PORT: "5000"
36+
# Bicep CLI pinned: v0.43+ rejects br:localhost:5000/... (ThrowIfRegistryNotTrusted).
37+
# Bump only after verifying localhost support or adding allowedUntrustedRegistries to bicepconfig.json.
38+
BICEP_VER: v0.42.1
3639

3740
concurrency:
3841
# Cancel the previously triggered build for only PR build.
@@ -72,7 +75,7 @@ jobs:
7275
- name: Setup and verify bicep CLI
7376
run: |
7477
# Download bicep CLI
75-
curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
78+
curl -Lo bicep "https://github.com/Azure/bicep/releases/download/${{ env.BICEP_VER }}/bicep-linux-x64"
7679
chmod +x ./bicep
7780
7881
# Install in both locations for maximum compatibility

‎build/install-bicep.sh‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,17 @@ if [ "$ARCH" = "arm64" ]; then
5959
BICEP_ARCH="arm64"
6060
fi
6161

62+
# Bicep CLI version. Pinned because Bicep v0.43+ tightened
63+
# ContainerRegistryClientFactory.ThrowIfRegistryNotTrusted to reject br:localhost:5000/... targets,
64+
# breaking publish-extension to local registries used by our CI and local dev workflows.
65+
BICEP_VER="v0.42.1"
66+
6267
# Check if bicep binary already exists in the target location
6368
if [ -f "$OUTPUT_DIR/bicep" ]; then
6469
echo "Bicep CLI already exists at $OUTPUT_DIR/bicep, skipping download."
6570
else
66-
echo "Downloading Bicep CLI..."
67-
if ! curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-$BICEP_ARCH; then
71+
echo "Downloading Bicep CLI ${BICEP_VER}..."
72+
if ! curl -Lo bicep "https://github.com/Azure/bicep/releases/download/${BICEP_VER}/bicep-linux-${BICEP_ARCH}"; then
6873
echo "Failed to download Bicep CLI. Please check your internet connection or the URL."
6974
exit 1
7075
fi

‎pkg/cli/bicep/tools/download_tools.go‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ import (
2828
)
2929

3030
const (
31+
// bicepVersion is the pinned version of the Bicep CLI to download.
32+
// Pinned because Bicep v0.43+ tightened ContainerRegistryClientFactory.ThrowIfRegistryNotTrusted
33+
// to reject br:localhost:5000/... targets, breaking publish-extension to local registries used
34+
// by our CI and local dev workflows.
35+
bicepVersion = "v0.42.1"
36+
3137
// binaryRepo is the name of the remote bicep binary repository
32-
binaryRepo = "https://github.com/Azure/bicep/releases/latest/download/"
38+
binaryRepo = "https://github.com/Azure/bicep/releases/download/" + bicepVersion + "/"
3339
)
3440

3541
// validPlatforms is a map of valid platforms to download for. The key is the combination of GOOS and GOARCH.

0 commit comments

Comments
 (0)