Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Skip CI/CD Pipeline for git push --mirror Command.

Nagaraja October 1, 2024

My project requires enabling CI/CD pipelines globally for the repository. However, there are specific scenarios where we need to push changes, for example, during a git push --mirror, without triggering pipelines.

2 answers

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2024

Hi Nagaraja,

We cannot detect if you pushed with the --mirror flag or not.

The only two ways to not trigger a Pipelines build even when there is a matching definition in the repo's bitbucket-pipelines.yml file are:

1. If you add the text [skip ci] or [ci skip] to the commit message of the last commit of the branch you push.

2. If a push involves more than five tags or branches. This is to prevent accidental triggering of Pipelines builds.

Kind regards,
Theodora

0 votes
Julien Dephix October 2, 2024

Hi.

We have set up Pipelines so they only run when a PR is open, and you need a PR to push to `develop` or `master`.

Maybe you could do that, without branch protections, so a regular push to a branch would not trigger a pipeline?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events