Skip to content

Instantly share code, notes, and snippets.

@piense
Created May 29, 2021 21:41
Show Gist options
  • Save piense/4d89da15852cea19c3f0204533064bb8 to your computer and use it in GitHub Desktop.
Save piense/4d89da15852cea19c3f0204533064bb8 to your computer and use it in GitHub Desktop.
YAML Debugging
trigger:
enabled: false
variables:
- group: dev
stages:
- stage: Build
jobs:
- job: Test
steps:
- task: CmdLine@2
inputs:
script: |
echo $(MONGODB_DATABASE)
- stage: CI
dependsOn:
- Build
jobs:
- job: Test
steps:
- task: CmdLine@2
inputs:
script: |
echo $(MONGODB_DATABASE)
- stage: Deploy
dependsOn:
- CI
jobs:
- job: Test
steps:
- task: CmdLine@2
inputs:
script: |
echo $(MONGODB_DATABASE)
trigger: none
variables:
- ${{ if eq(variables['Build.SourceBranch'], 'release/*') }}:
- group: prod
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
- group: dev
stages:
- stage: Build
jobs:
- job: Test
steps:
- script: |
echo $(MONGODB_DATABASE)
- stage: CI
dependsOn: Build
jobs:
- job: Test
steps:
- script: |
echo $(MONGODB_DATABASE)
- stage: Deploy
dependsOn: CI
jobs:
- job: Test
steps:
- script: |
echo $(MONGODB_DATABASE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment