Created
May 11, 2023 11:56
-
-
Save JeffWouters/1aa8022b09ad391bf1812953e481c584 to your computer and use it in GitHub Desktop.
CZ Infra
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Starter pipeline | |
| # Start with a minimal pipeline that you can customize to build and deploy your code. | |
| # Add steps that build, run tests, deploy, and more: | |
| # https://aka.ms/yaml | |
| trigger: | |
| - main | |
| pool: | |
| vmImage: ubuntu-latest | |
| variables: | |
| azureServiceConnection: 'AZ400-CZ' | |
| steps: | |
| - task: AzureCLI@2 | |
| displayName: 'build bicep artifact' | |
| inputs: | |
| azureSubscription: $(azureServiceConnection) | |
| scriptType: 'pscore' | |
| scriptLocation: 'inlineScript' | |
| inlineScript: 'az bicep build --file $(Build.SourcesDirectory)/infra/main.bicep' | |
| - task: PublishBuildArtifacts@1 | |
| displayName: 'Publish artifact in pipeline' | |
| inputs: | |
| PathtoPublish: '$(Build.SourcesDirectory)/infra/main.json' | |
| ArtifactName: 'finishedTemplate' | |
| publishLocation: 'Container' | |
| - task: AzureCLI@2 | |
| displayName: 'deploy bicep template' | |
| inputs: | |
| azureSubscription: $(azureServiceConnection) | |
| scriptType: 'pscore' | |
| scriptLocation: 'inlineScript' | |
| inlineScript: | | |
| az deployment sub create ` | |
| --template-file $(Build.SourcesDirectory)/infra/main.bicep ` | |
| --parameters $(Build.SourcesDirectory)/infra/main.parameters.json ` | |
| --location westeurope |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment