azdev-release-orchestrator
azdev-release-orchestrator copied to clipboard
Possible Bug: Orchestrated pipelines are always triggered using default branch, not the branch the orchestrator pipeline is run from
Title says it all: orchestrated pipelines are always triggered using default branch, not the branch the orchestrator pipeline is run from.
Expectation: run the orchestrated pipelines from the same branch as the orchestrator.
I ran into this issue as well - also found that it doesn't like when you use branch folders.
To get around this, just passed the Build.SourceBranch var with refs/heads/ stripped like below:
- task: releaseorchestrator@3
displayName: 'Build Pipeline'
inputs:
projectName: 'Project'
definitionName: 'Build Service'
strategy: 'new'
branchName: ${{ replace(variables['Build.SourceBranch'], 'refs/heads/') }}
Thanks for the workaround! I also noticed that I have to use version 3 of the task to trigger even classic pipelines and if I set the branchName there, the execution will fail. So changing the default behavior to use the branch the orchestrator runs from would have even bigger implications...