dmitryserbin / azdev-release-orchestrator

Azure DevOps extension to manage and orchestrate release pipelines
MIT License
23 stars 13 forks source link

Possible Bug: Orchestrated pipelines are always triggered using default branch, not the branch the orchestrator pipeline is run from #104

Open sit-md opened 5 months ago

sit-md commented 5 months ago

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.

josh-casey commented 5 months ago

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/') }}
sit-md commented 5 months ago

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