The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Nagaraja (MicroGenesis TechSoft)
Atlassian Partner
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

Comments for this post are closed

Community moderators have prevented the ability to post new 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
Contributor
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?

DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events