Skip to content

Commit

Permalink
add temp bicepconfig to validate bicep
Browse files Browse the repository at this point in the history
Signed-off-by: sk593 <[email protected]>
  • Loading branch information
sk593 committed Aug 12, 2024
1 parent 3a8df14 commit 3bba88b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/functional-test-cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,30 @@ jobs:
message: |
:hourglass: Publishing Bicep Recipes for functional tests...
- name: Generate test bicepconfig.json
run: |
if [[ "${{ env.REL_VERSION }}" == "edge" ]]; then
RADIUS_VERSION="latest"
else
RADIUS_VERSION="${{ env.REL_VERSION }}"
fi
cat <<EOF > ./test/bicepconfig.json
{
"experimentalFeaturesEnabled": {
"extensibility": true,
"extensionRegistry": true,
"dynamicTypeLoading": true
},
"extensions": {
"radius": "br:${{ env.BICEP_TYPES_REGISTRY }}/test/radius:$RADIUS_VERSION",
"aws": "br:${{ env.BICEP_TYPES_REGISTRY }}/aws:latest"
},
"cloud": {
"credentialPrecedence": ["Environment"]
}
}
EOF
- name: Publish Bicep Test Recipes
run: |
mkdir ./bin
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/validate-bicep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ jobs:
bicep --version
- name: Check out repo
uses: actions/checkout@v4
- name: Install jq
run: sudo apt-get install -y jq
- name: Modify bicepconfig.json
run: |
# Add credential preference to the bicepconfig.json file
jq '. + {"cloud": {"credentialPrecedence": ["Environment"]}}' bicepconfig.json > tmp.json && mv tmp.json bicepconfig.json
- name: Verify Bicep files
run: ./build/validate-bicep.sh
env:
Expand Down
6 changes: 0 additions & 6 deletions bicepconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,5 @@
"extensions": {
"radius": "br:biceptypes.azurecr.io/radius:latest",
"aws": "br:biceptypes.azurecr.io/aws:latest"
},
"cloud": {
"credentialPrecedence": [
"Environment",
"AzureCLI"
]
}
}

0 comments on commit 3bba88b

Please sign in to comment.