Forums

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

How to cancel/not execute Bitbucket Pipelines builds based on a condition?

Alejandro Cotilla November 5, 2018 edited

I want to update my yml file to ignore commits from certain users. Is this possible? Is there a similar solution? Ideally I wouldn't even want to trigger the build in the first place.

Pseudo code example of yml file (ignore syntax, I'm just showcasing what I'm trying to do)

user = git show -s --format='%ae' $BITBUCKET_COMMIT
unwantedUser = "person@mail.com"

pipelines:
tags:
'**' && user != unwantedUser:
- step:
script:
(...)

 

What would be the actual syntax to achieve that?

1 answer

0 votes
Alejandro Cotilla November 5, 2018

I ended up including the [skip ci] string in my commit messages to avoid triggering the pipeline.

https://stackoverflow.com/a/53162706/1792699

Patrick Nelson
Contributor
October 15, 2021

Thanks for taking a moment to answer your own question!

Like Alejandro Cotilla likes this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, compass, developer experience, devex, platform engineering, internal developer platform, component catalog, atlassian learning, productivity tools, developer productivity, software architecture, compass webinar, engineering teams

Discover how Compass drives DevEx and productivity at Atlassian 🏃🏻‍♂️

Learn why Compass was built to tackle dev experience at scale. See how Atlassian uses it to boost visibility, reduce cognitive load, and drive consistency—plus tips to get started and customize your IDP for stronger team engagement.

Join the webinar ✨
AUG Leaders

Atlassian Community Events