gh-gei icon indicating copy to clipboard operation
gh-gei copied to clipboard

`rewire-pipeline` Command Switches YAML Triggers

Open connorstorer-kbxcom opened this issue 1 year ago • 4 comments

Description

After running the rewire-pipeline against an ADO YAML pipeline, the pipeline options/triggers have been changed unexpectedly. Curling the definition content it looks like the rewire-pipeline command removes the pipeline definition triggers object and instead populates it with options (mine didn't have options before anyway). After manually unchecking the Override the YAML continuous integration trigger from here checkbox and curling the definition, the triggers object is repopulated.

image

After Running Command: image

After Manually Reverting/Unchecking: image

Reproduction Steps

Run the rewire-pipeline command against an ADO YAML pipeline without any explicit pipeline definition trigger overrides. After running the command, edit the pipeline in ADO and navigate to the triggers. Notice the Override the YAML continuous integration trigger from here checkbox is checked.

connorstorer-kbxcom avatar May 03 '24 02:05 connorstorer-kbxcom

Also seeing similar behavior.

tjolliff avatar May 08 '24 18:05 tjolliff

Wondering if this is the intended functionality & assumption that YAML pipelines would be using pr within their yaml? https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/pr?view=azure-pipelines#remarks image

connorstorer-kbxcom avatar May 08 '24 20:05 connorstorer-kbxcom

I tested out adding the pr section to the yaml file before rewiring the pipeline and got the same result :( Here were the steps I followed:

  • migrate repo from ADO to GH
  • update yaml file in GH to include pr section
  • ran the rewire-pipeline command
  • checked settings in ADO pipeline; PR triggers was still overridden

tjolliff avatar May 08 '24 20:05 tjolliff

I would expect it to still be overridden, but does a PR to github repo automatically kick off ADO pipeline?

EDIT: Oh nevermind, that should be default.

connorstorer-kbxcom avatar May 08 '24 20:05 connorstorer-kbxcom