Hi Team,
I am trying to figure out the process for the pipeline, I already schedule my pipeline for a certain time frame, but now I want to execute that particular pipeline only when there is any new commit to that particular branch. Otherwise, the pipeline will on hold.
Currently, what is happing in my pipeline it will get execute on its scheduled time, no matter any changes are there or not on a particular branch! That creates a problem is so many ways.
How can we do that?
I guess the document that will provide you with the most meaningful information to understand pipelines structure is this one:
Let me share some examples that can be used as a reference so you know what are the changes you need perform in your configuration:
1) This is an example of a configuration that will only trigger builds in master and develop.
pipelines:
branches:
master:
- step:
script:
- echo "Trigger when there is a commit in master branch"
develop:
- step:
script:
- echo "Trigger when there is a commit in develop branch"
2) If your bitbucket-pipelines.yml have the following configuration, every commit will trigger a build. Any branch with this definition will trigger when a new commit arrives.
pipelines:
default:
- step:
script:
- echo "Triggers on every commit"
Please let me know if they are helpful. Please also check the document shared above and let me know if you have any questions on this matter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.