Skip to content

Instantly share code, notes, and snippets.

@JeffWouters
Created May 11, 2023 11:56
Show Gist options
  • Select an option

  • Save JeffWouters/1aa8022b09ad391bf1812953e481c584 to your computer and use it in GitHub Desktop.

Select an option

Save JeffWouters/1aa8022b09ad391bf1812953e481c584 to your computer and use it in GitHub Desktop.
CZ Infra
# 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