Forums

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

Conditional Steps Behavior

xicond February 10, 2022

I'm wandering the conditional steps behavior, 
when a commit failed on a pipeline, does another next commit will true on the change-set

Let say:

Change-set detect on File A

  • commit 1: change File A, but Fail
  • commit 2: change File B to fix it

Does commit 2 pipeline detected as true in conditional change-set ?

 

1 answer

1 accepted

0 votes
Answer accepted
Norbert Csupka
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 15, 2022

Hi @xicond 

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

Basically how Changesets works is that Changesets allows steps to be executed only when a condition or rule is satisfied. Currently, the only condition supported is changesets. Use changesets to execute a step only if one of the modified files matches the expression in includePaths. Changesets condition only checks whether if a file has been changed with a commit or not.

Please let me know if my explanation was clear, we're here to help.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

xicond February 21, 2022

Hi @Norbert Csupka 

Thanks for the reply, 

I already know the ChangesetsincludePaths
But my query is, if there're 2 or more commits, and I did pull-requests hook in pipelines, could it be process all commits diff in the pull requests for the Changesets, instead of just each commit, because I could be missed/fail on previous commit, then the step need to retry

Regards,

~xicond

Norbert Csupka
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 21, 2022

Hi @xicond 

Thank you for your reply and for your explanation. 

In a pull-request pipeline, all commits are taken into account, and if you provide an includePath list of patterns, a step will be executed when at least one commit change matches one of the conditions

Please see: https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/#condition

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events