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

Skip build step after PR fast forward merge

Jan Nylund January 25, 2019

Sometimes we got some slow running builds, that are built before PR can be merged. In the case of a fast forward merge, the git hash will be the same for next build started from master. 

 

Normally this is not a problem, but in rare cases I would really like to bypass a few build steps if they have already been performed. 

 

Any luck? The only thing I can think of is to keep an external key value db to keep track of this.

1 answer

0 votes
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 29, 2019

Hi @Jan Nylund,

According to one of our Bamboo developers, an implementation to solve this issue would require a deep rework at Bamboo side. He shared also that it would be also hard to achieve this if you intend to work on a custom plugin for that task.

Jan Nylund January 29, 2019

Hey @Daniel Santos

 

I know this is a corner case, but technically, it's pretty straight forward, all I need is a key value storage.

Use example.

- After successful test and build, I store git hash + build params + timestamp.

- Before build, I check the key value storage for git hash + build params + timestamp. If there is a recent success I bypass the step.

 

My use case for this is a corner case, and related to long running tests that bamboo is just watching. For now I think the most reasonable solution is that I build it outside of Bamboo and check the status with curl or similar. (short timeout so in case it's not available it just defaults to build).

 

I could probably build a Bamboo plugin that provides a rest api endpoint in Bamboo master for this key value storage and then check that each time a build is triggered... (I assume)

Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 29, 2019

When you say bypass you mean that no build would be run for the commits already processed in a branch, right?

The master branch, in this case, would miss part of the builds and would have all of them only when a new commit (different hash) is built if I understood you correctly.

  • Have you tried to avoid the fast forward merge?
  • Would this help?

Do you want to open a feature request for this and share your thoughts on our issue tracker?

This is how you can do if you want to share your thoughts there:

  1. Go to https://jira.atlassian.com/issues
  2. Log in with your Atlassian id.
  3. Click the Create button in the top of the page.
  4. Select Bamboo (BAM) on Project field.
  5. Select Suggestion on Issue Type field.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events