Currently I have two separate Azure DevOps Pipeline config files:
azure-pipelines-staging.yaml
azure-pipelines-production.yaml
Really the only differences in them are the:
trigger:
branches:
include:
- master # or staging
And the directory where my k8s manifests are:
manifests: |
$(Pipeline.Workspace)/manifests/azure/prod/api.yaml
# or
manifests: |
$(Pipeline.Workspace)/manifests/azure/staging/api.yaml
So ideally it would be something like:
trigger:
branches:
include:
- master
- staging
...
manifests: |
$(Pipeline.Workspace)/manifests/azure/$(branch)/api.yaml
Not quite seeing how to get $(branch)
name in there. Suggestions?