Skip to content

Commit

Permalink
update validate bicep
Browse files Browse the repository at this point in the history
Signed-off-by: sk593 <[email protected]>
  • Loading branch information
sk593 committed Jul 16, 2024
1 parent 40f6401 commit 94425ad
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .github/scripts/validate_bicep.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ def validate_file(f):
stderr = result.stderr.decode("utf-8")
exitcode = result.returncode

warning_prefix = "WARNING: The following experimental Bicep features"
if stderr.startswith(warning_prefix):
stderr = ""
exitcode = 0

if exitcode != 0:
failures.append(f)
print(stderr, flush=True)
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/validate-bicep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Parse release version and set environment variables
run: python ./.github/scripts/get_docs_version.py
- name: Download rad-bicep
- name: Setup and verify bicep CLI
run: |
oras pull ghcr.io/radius-project/radius/bicep/rad-bicep/linux-x64:latest
chmod +x rad-bicep
./rad-bicep --version
curl -Lo rad-bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
chmod +x ./rad-bicep
bicep --version
- name: Verify Bicep files
run: python ./.github/scripts/validate_bicep.py
11 changes: 11 additions & 0 deletions docs/bicepconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"experimentalFeaturesEnabled": {
"extensibility": true,
"extensionRegistry": true,
"dynamicTypeLoading": true
},
"extensions": {
"radius": "br:biceptypes.azurecr.io/radius:latest",
"aws": "br:biceptypes.azurecr.io/aws:latest"
}
}

0 comments on commit 94425ad

Please sign in to comment.