azdev-release-orchestrator icon indicating copy to clipboard operation
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

Open sit-md opened this issue 10 months ago • 2 comments

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.

sit-md avatar Apr 25 '24 13:04 sit-md

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/') }}

josh-casey avatar May 01 '24 00:05 josh-casey

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...

sit-md avatar May 02 '24 08:05 sit-md