gh-gei
gh-gei copied to clipboard
`rewire-pipeline` Command Switches YAML Triggers
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.
After Running Command:
After Manually Reverting/Unchecking:
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.
Also seeing similar behavior.
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
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
prsection - ran the rewire-pipeline command
- checked settings in ADO pipeline; PR triggers was still overridden
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.