- Download the Samples folder, and unzip it.
- Open the unzipped Samples folder in VSCode, and select one of the
.bicepparam
files you wish to deploy. - Launch the Deploy Pane to run the deployment.
Note
Extension binary packages are not signed on a Mac. If you see the following error, you will need to manually sign the extension package:
Failed to launch provider: Failed to connect to provider /Users/ant/.bicep/br/bicepextdemo.azurecr.io/extensions$github/0.1.1$/extension.bin
To work around it, run the following in a terminal window, using the path from the error message:
codesign -s - '/Users/ant/.bicep/br/bicepextdemo.azurecr.io/extensions$github/0.1.1$/extension.bin'
These commands publish the extension to the local file system, and updates the sample bicepconfig to point to the local extension.
./scripts/publish.sh ./bin/bicep-ext-github
jq '.extensions.github="../bin/bicep-ext-github"' ./samples/bicepconfig.json > ./samples/bicepconfig.new.json
mv ./samples/bicepconfig.new.json ./samples/bicepconfig.json
Run the deployment.
~/.azure/bin/bicep local-deploy ./samples/basic/main.bicepparam
To enable verbose tracing, run the following beforehand.
export BICEP_TRACING_ENABLED=true
This repo is set up with GitHub Actions to publish a new version to an ACR on every push to the main
branch.
To pick up a new version after publishing, view the Publish Extension output, and update your bicepconfig.json to use the new spec:
To configure the GitHub Actions automation for the first time:
Log in to Azure CLI. Customize and run ./scripts/initial_setup.sh
.
This repo is also intended to demonstrate how to build + publish an end-to-end Bicep extension in C#. Feel free to copy, rename and modify it to prototype building an extension to extend other services.