-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Official Microsoft GitHub Action and Azure Pipeline task #1341
Comments
Hey @MarcusFelling Just wanted to chime in and say we're super excited about Bicep! Myself and my comrades had the opportunity to talk to @alex-frankel and @anthony-c-martin yesterday; you're all doing some amazing work! Having a first class experience for doing bicep in an Azure Pipeline is something we value highly. Until that shimmers into being, is there advice on how we should be doing Bicep in pipelines? We happened upon this: https://thomasthornton.cloud/2021/02/22/deploy-azure-bicep-using-azure-devops-pipelines/ Does this seem like a reasonable approach? It looks like 0.3 was released after this post. Perhaps this means that just using the az cli might work in the interim? Just to give you an idea of what we're trying to achieve in a pipeline, it's something of this nature but for bicep: - task: AzureResourceManagerTemplateDeployment@3
displayName: 'Deploy App Service ARM Template'
inputs:
deploymentScope: Resource Group
azureResourceManagerConnection: $(serviceConnection)
subscriptionId: $(subscriptionId)
action: Create Or Update Resource Group
resourceGroupName: $(azureResourceGroup)
location: $(location)
templateLocation: Linked artifact
csmFile: 'infra/app-service/azuredeploy.json'
deploymentMode: Incremental
overrideParameters: >-
-environment $(environment)
-tags {"owner": "$(owner)", "costCenter": "$(costCenter)", "application": "$(application)", "description": "$(description)", "repo": "$(repo)"}
-appServiceName $(appServiceName)
-appServicePlanName $(appServicePlanName)
-logAnalyticsWsName $(logAnalyticsWsName)
-managedIdentityName $(managedIdentityName)
-appInsightsName $(appInsightsName)
-keyVaultName $(keyVaultName)
-storageAccountName $(storageAccountName)
-sqlServerName $(sqlServerName)
-sqlDatabaseName $(sqlDatabaseName) |
I'd recommend using the Azure CLI task to deploy. As long as that task is updated to Az CLI version 2.20 or later, it will automatically install the bicep CLI when calling There is an outstanding issue that may prevent this from working today, so you may need to wait until 3/23 to do this. @shenglol - will this issue affect both GitHub actions and DevOps YAML pipelines? |
Until the official task ships, it's possible to do what @alex-frankel suggested around using the Azure task. I've written it up here: https://blog.johnnyreilly.com/2021/03/20/bicep-meet-azure-pipelines |
Just to chime in on this, we're trying to do bicep based deployments from GitHub Actions (so not Azure Pipelines), but haven't been successful thus far. The issue seems to be that the AZ CLI task in GitHub Actions (https://github.com/marketplace/actions/azure-cli-action) runs inside an Alpine based docker container. That contains musl libc, whereas the bicep binaries for linux are built against glibc.
I've been able to fix the first error by doing some clever symbolic linking, but haven't been able to get passed the "symbol not found" errors... |
@KeesV FYI we had a known issue with Az CLI + Docker that has been resolved with Az CLI v2.21.0. More info in #1683 This is working for me now: https://github.com/alex-frankel/ignite-spring-21/blob/main/.github/workflows/jobs.yaml#L26 |
@alex-frankel thanks for the quick reply! I can confirm that with az 2.21.0 it now works as expected. My google-fu didn't lead me to #1683 , but that's exactly the issue we had indeed. |
Thanks for referencing my original blog post, original post was written < az 2.20.0. Have updated the post with the relevant change, https://thomasthornton.cloud/2021/02/22/deploy-azure-bicep-using-azure-devops-pipelines/ |
GitHub Action also for reference https://thomasthornton.cloud/2021/04/12/deploying-azure-bicep-using-github-actions/ |
Hi @MarcusFelling, Loving the ability to use the As a result we are currently building Bicep to ARM first and then using the task. It would be great to have Bicep support in the task for this :) |
While workarounds are usable in a pinch, they're still workarounds. First-class, official support is not just a nicety. It's currently the biggest roadblock I've personally encountered to the adoption of Bicep. Developers will nod along and agree that the benefits of Bicep sound really good, and then backpedal and say that it is "too hard" when this issue comes up. |
Agreed, we should prioritize ease of adoption. I've put some implementation notes under microsoft/azure-pipelines-tasks#15337. I'll re-add the "needs triage" label so we discuss this in our next triage discussion. |
Hi team, sorry about raising this question again, is there any progress on getting Bicep Azure Pipeline task ready? Looks like it is not coming with the 1.0 milestone, which is quite strange as the absence of the official task is biggest stopper from Bicep adoption. |
Hi @rshariy -- can you clarify what is the blocking issue? We definitely are eager to update this task so that it supports Bicep files, but our understanding is that you can use the Az CLI task as an alternative for deploying bicep in a DevOps pipeline. Have you looked into this? |
I can confirm what @alex-frankel suggest . You can use azure cli task and run az deployment command in it using .bicep file like you use it in azure cli in your command line. |
@alex-frankel, yes, I can do it, but the original goal was "There should be a first-class Bicep experience for GitHub Actions and Azure Pipelines. It should make it as easy as possible to build, test, and deploy a Bicep template." Not Az CLI nor some third-party add-ons deliver the same simple experience as native task (comparing to the ARM template deployment task in Azure DevOps). |
Support for the I'll close this issue - please use the above issue to track rollout status! |
There should be a first-class Bicep experience for GitHub Actions and Azure Pipelines. It should make it as easy as possible to build, test, and deploy a Bicep template.
Prerequisite: #858
The text was updated successfully, but these errors were encountered: