Skip to content
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

Enable PR checks on Bicep equivalent to the existing PR checks on the main branch #360

Closed
brooke-hamilton opened this issue Aug 16, 2021 · 1 comment · Fixed by #400 or #402
Closed
Assignees
Labels
bicep Related to Bicep code

Comments

@brooke-hamilton
Copy link
Contributor

Benefit/Result/Outcome
So that Bicep parity is kept with Terraform for automatic PR checks.

Description
The current Terraform main branch has two PR checks: license/cla, and validate Terraform. The license/cla check should continue to function regardless of what is in the main branch. To keep parity with Terraform we should add an az build validate action. For example, the Bicep Build GitHub action implements a build action.

Acceptance Criteria

  • A validate action for Bicep exists in .github folder. It can be az build or something similar that validates the Bicep code.
@brooke-hamilton brooke-hamilton added the bicep Related to Bicep code label Aug 16, 2021
@glennmusa
Copy link
Contributor

glennmusa commented Aug 24, 2021

More information: https://github.com/Azure/bicep/blob/main/docs/cicd-with-bicep.md

We'd be doing everything up to # Stop here if you only want to do "CI"

name: bicep build and deploy

on: push

jobs:
  bicep-build-and-deploy:
    name: bicep build and deploy
    runs-on: ubuntu-latest

    steps:
      # Checks out a copy of your repository on the ubuntu-latest machine
      - name: Checkout code
        uses: actions/checkout@v2

      # Transpile bicep file into ARM template
      - name: Build ARM Template from bicep file
        run: |
          az bicep build --file ./main.bicep

      # Stop here if you only want to do "CI" which just generates the 
      # build artifact (ARM Template JSON)

and leaves a good starting point to take on #344 -- that'd be nice to have

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bicep Related to Bicep code
Projects
None yet
3 participants