Scheduled Pipelines runs multiple times on same commit

Gabriel Jean-Louis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 26, 2018

Hi everyone,

I've set up Bitbucket Pipelines for my repositories, I'm using scheduled pipelines to run unit tests and regression tests overnight.

 

The current problem is that the scheduled pipeline runs multiple times for the same commit. This is wasting my minutes and would like to know if there is any known way to stop this from happening.

 

Here's my bitbucket-pipelines.yml:

image: ruby:2.4.0

pipelines:
  custom:
    develop:
      - step:
          script:
- do stuff

Thank You.

3 answers

0 votes
Mark McFadden
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 14, 2022

Gabriel, I know this is an old thread, but did you solve your issue? I am having a similar problem. Thanks!

0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 5, 2018

Adding onto Aneita's response. You can use the Bitbucket REST API as a workaround if this is important functionality for you. But this will be a bit more work to set up (and may not suit your specific use-case).

You can use the build status API to check if another Pipelines has been run against the commit that's currently being tested. At the start of your pipeline you can check this and then stop earlier if there's already a pipeline against that commit.

Build Status API: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/commit/%7Bnode%7D/statuses/build

0 votes
Aneita
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 6, 2018

Hi Gabriel,

 

There currently isn't a way to prevent scheduled pipelines from running on the same commit. We do have an open request to improve this. I encourage you to vote for that issue and add a comment with your use case if it is something that you would like to see. 

 

Thanks,

Aneita

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events