From 4136fb0bd6378a0cf184503efbb524351b797b4b Mon Sep 17 00:00:00 2001 From: Hocine Hacherouf Date: Wed, 27 Dec 2023 15:49:58 +0100 Subject: [PATCH] Remove arm-ttk ci job #2734 --- .github/workflows/arm-ttk.yml | 61 -------------------------------- .github/workflows/bicep-lint.yml | 40 +++++++++++++++++++++ 2 files changed, 40 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/arm-ttk.yml create mode 100644 .github/workflows/bicep-lint.yml diff --git a/.github/workflows/arm-ttk.yml b/.github/workflows/arm-ttk.yml deleted file mode 100644 index d791447c2..000000000 --- a/.github/workflows/arm-ttk.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Validate Bicep templates - -on: - pull_request: - branches: [ main ] - paths: - - 'templates/**' - push: - branches: [ main ] - paths: - - 'templates/**' - schedule: - # ┌───────────── minute (0 - 59) - # │ ┌───────────── hour (0 - 23) - # │ │ ┌───────────── day of the month (1 - 31) - # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) - # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) - # │ │ │ │ │ - # │ │ │ │ │ - # │ │ │ │ │ - # * * * * * - - cron: '30 1 * * *' - workflow_dispatch: - -jobs: - validate_arm_templates: - name: Build Bicep and Validate ARM Templates - runs-on: ubuntu-latest - - steps: - - name: Apply arm-templates label on PR - uses: actions/github-script@v7 - if: ${{ github.event_name == 'pull_request' }} - with: - script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['arm-templates'] - }) - - - uses: actions/checkout@v4.1.1 - with: - submodules: recursive - - - name: Generate ARM file - working-directory: templates/azure - run: az bicep build --file azuredeploy.bicep --outfile azuredeploy.json - - - name: Checkout Azure/arm-ttk - uses: actions/checkout@v4.1.1 - with: - repository: Azure/arm-ttk - path: arm-ttk - - - name: Run arm-ttk - shell: pwsh - run: | - Import-Module ./arm-ttk/arm-ttk/arm-ttk.psd1 - Test-AzTemplate -TemplatePath ./templates/azure/azuredeploy.json -Skip 'Template Should Not Contain Blanks','URIs Should Be Properly Constructed' \ No newline at end of file diff --git a/.github/workflows/bicep-lint.yml b/.github/workflows/bicep-lint.yml new file mode 100644 index 000000000..137e83c2c --- /dev/null +++ b/.github/workflows/bicep-lint.yml @@ -0,0 +1,40 @@ +name: Validate Bicep templates + +on: + pull_request: + branches: [ main ] + paths: + - 'templates/azure/**' + - 'templates/iotedge-lorawan-starterkit/**' + push: + branches: [ main ] + paths: + - 'templates/azure/**' + - 'templates/iotedge-lorawan-starterkit/**' + workflow_dispatch: + +jobs: + validate_bicep_templates: + name: Build and Validate Bicep Templates + runs-on: ubuntu-latest + + steps: + - name: Apply arm-templates label on PR + uses: actions/github-script@v7 + if: ${{ github.event_name == 'pull_request' }} + with: + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['arm-templates'] + }) + + - uses: actions/checkout@v4.1.1 + with: + submodules: recursive + + - name: Lint Bicep templates and Generate ARM template + working-directory: templates/azure + run: az bicep build --file azuredeploy.bicep --outfile azuredeploy.json