When we configure the code base in CI pipeline, we would not able to set a fixed value for the branch, and each time when we run the pipeline we need to specify the branch details. We can configure an input set to have a required value for the branch that can be used in each execution however this article talks about another way how we can have a fixed branch value configured for the codebase in CI pipeline.
By default, we will have the below properties in a CI pipeline YAML when we have a codebase configured.
In order to have a fixed branch value, we need to update the above section in the pipeline YAML by removing the value
<+input> from the key
branch and adding the below lines with the required branch name.
Once the pipeline is saved, we will now don’t need to enter the branch name each time when we execute the pipeline as we have it hardcoded in the pipeline YAML.
Note that we can currently do this only by editing the pipeline YAML and can not be done via UI.