Created
May 17, 2023 11:32
-
-
Save JeffWouters/0fc819d96b222b30279761fd26c5781e to your computer and use it in GitHub Desktop.
pipeline-infra.yml
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
| 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