Missed Team ’24? Catch up on announcements here.

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

How to prevent building if no change is detected?

殷乐 September 21, 2020

I wonder how to prevent building if no change is detected, meaning that no new commit is detected and a duplicated package will be built.

The plan shall fail immediately or notify the user if such condition is met.

1 answer

1 accepted

1 vote
Answer accepted
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2020

You can use plan variables to compare if there're commits between builds

${bamboo.planRepository.1.revision} != ${bamboo.planRepository.1.previousRevision}
殷乐 September 22, 2020

So I can depend on this condition in script in the plan?

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2020

yes

殷乐 September 22, 2020

I wonder whether the previous revision is last successful build or just simply last build regardless of building result. Can I still depend on the condition if last build failed?

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2020

It's value from previous build, regardless of its state

殷乐 September 23, 2020

Then how can I check whether last build is successful? in case I need to rebuild when build failed.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events