Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
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

I want to trigger second pipeline from first pipeline if it runs successfully.

Hi Community,

 

Since I am not a pro in writing bitbucket.yml scripts, I need some help and suggestions. 

Scenario: We have a 3rd-party test environment to execute test scripts for the release. We have already setup a separate pipeline for this test environment which runs on schedule or whenever anyone makes changes to source code. The requirement is now to run test pipeline automatically whenever the release pipeline(in the same repo) runs successfully.

Problem: What should be the script(or sequence of git commands) that I should write to update source code(say, a log file) in test branch, so that test pipeline runs from release pipeline? I will add this script as a new "-step" in the release pipeline.

Thanks!

1 answer

1 accepted

0 votes
Answer accepted

Hello @Harshit_Singhal ,

There's no way to call one pipeline from another other than pushing something that triggers it back to the repository. Commands for this would be similar to what you'd do locally: echo (or any other sort of update), git add, git commit, git push. Or you can configure your test pipeline to trigger on tags – in that case you can create and push a Git tag in the end of release pipeline, which would kick off the test pipeline.

However, this might be not the best approach in your case. You can make use of anchors and aliases in YAML and inline your test steps into the release pipeline. That might be preferable as the release pipeline would shown as failed if tests fail after release (this sounds like post-deployment verification tests to me), reflecting the actual status of the release.

Hope this helps.

Cheers,
Daniil

Thankyou @Daniil Penkin , I will try the given approaches. But it is good to know that there is nothing to directly trigger one pipeline from another. Thanks again!

Like Daniil Penkin likes this

Suggest an answer

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

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

480 views 5 4
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