Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Should trigger-pipeline pipe complete if pipeline has a manual deployment step

I have been successfully using the atlassian/trigger-pipeline:4.0.2 pipe to trigger and run multiple pipelines, waiting for success or failure.  I have a "master build" that runs a list of pipelines in several other repos.  My steps invoking the trigger specify WAIT: 'true'

The default pipelines are being triggered and typically take 1-3 minutes to run to completion.   This has all been working fine.

I recently added a manual deployment step to some of the pipelines.  Now the trigger-pipeline steps for the repos where I've added the manual deployment step to those pipelines never get's back a successful completion.  The following lines repeat forever, even though I can verify the triggered pipeline has successfully completed:

INFO: Attempt number 22: Getting build info.
INFO: Attempt number 22: Build number 10 for MyBuild is IN_PROGRESS,
waiting for pipeline to finish...

The pipelines without the added deployment steps continue to work, but those with the manual deployment steps do not.  Should this pipe support waiting for pipelines with manual deployment steps?  For example, triggering the pipeline with this step never comes back as successful:

pipelines:
default:
- step:
caches:
- gradle
script:
- ./gradlew build
artifacts:
- dist/*.jar
- step:
name: Deploy to test
deployment: Test
trigger: manual
script:
- /deploy.sh

I am only expecting that the ./gradlew build step needs to complete successfully, and in this case the pipeline shows a status of Successful in the UI. However the trigger-pipeline pipe waits forever.  I tried updating to use atlassian/trigger-pipeline:4.0.3 but that didn't help.  

Looking at the api made to check status in the source code, if I make the api call

/repositories/{account}/{repo}/pipelines/{build_number}

for the completed pipeline with the manual deployment step, it returns:

"state": {"name": "IN_PROGRESS", "type": "pipeline_state_in_progress", 
"stage": {"name": "PAUSED", "type": "pipeline_state_in_progress_paused"}}

 I can't move the manual deployment step to another pipeline because it needs access to the artifact produced in the prior step.  

2 answers

1 accepted

1 vote
Answer accepted

Hi @Jay Seletz ,

new version of the pipe atlassian/trigger-pipeline:4.0.5 with fix is released!

Thanks, works great!

0 votes

Hey @Jay Seletz , thanks for such a detailed issue report. As it turns out, there is a bug in the current version of the trigger-pipeline. As a temporary workaround I suggest setting WAIT parameter to 'false' so the source build doesn't wait for the downstream with the manual step. We'll fix the bug asap and will notify you here.

As a side note, your upstream pipeline should continue to run when you trigger the manual step in your downstream build, but I guess this is not something that helps you.

Thanks @Alexander Zhukov - I actually do need to wait.  I have forked the trigger-pipeline and implemented a workaround to optionally allow paused pipelines to be considered successfully run if waiting.  I look forward to being able to revert back to the official version once it's fixed, thanks!

Great! @Jay Seletz you're also welcome to contribute to the trigger-pipeline by creating a pull request with the changes to our trigger-pipeline repository. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

991 views 20 11
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you