Skip to content

Instantly share code, notes, and snippets.

@thepaulmacca
Last active January 4, 2022 14:32
Show Gist options
  • Save thepaulmacca/aa732a2be1539586dbcb4c6b50d28199 to your computer and use it in GitHub Desktop.
Save thepaulmacca/aa732a2be1539586dbcb4c6b50d28199 to your computer and use it in GitHub Desktop.
Azure Pipelines - Bicep Deployment Pipeline Template (GitHub repo)
trigger:
branches:
include:
- main
resources:
repositories:
- repository: templates
type: github
name: thepaulmacca/azure-pipelines-templates
ref: refs/tags/v1.0.0
endpoint: thepaulmacca
pool:
vmImage: ubuntu-latest
stages:
# Lint the Bicep file
- stage: Lint
jobs:
- template: bicep/lint.yml@templates
parameters:
templateFile: deploy/main.bicep
# Deploy to the dev environment
- template: bicep/deploy.yml@templates
parameters:
environmentType: Dev
variableGroupName: Pipelines-Testing-Dev
azureServiceConnection: Pipelines-Testing-Dev
resourceGroupName: $(ResourceGroupName)
deploymentMode: Incremental
templateFile: deploy/main.bicep
templateParameters: environmentType=$(EnvironmentType)
# Deploy to the test environment
- template: bicep/deploy.yml@templates
parameters:
environmentType: Test
variableGroupName: Pipelines-Testing-Test
azureServiceConnection: Pipelines-Testing-Test
resourceGroupName: $(ResourceGroupName)
deploymentMode: Incremental
templateFile: deploy/main.bicep
templateParameters: environmentType=$(EnvironmentType)
# Deploy to the production environment
- template: bicep/deploy.yml@templates
parameters:
environmentType: Production
variableGroupName: Pipelines-Testing-Production
azureServiceConnection: Pipelines-Testing-Production
resourceGroupName: $(ResourceGroupName)
deploymentMode: Incremental
templateFile: deploy/main.bicep
templateParameters: environmentType=$(EnvironmentType)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment