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!
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.