Is there a way to trigger a child plan in Bamboo and pass it information like a version number?

1.2k views Asked by At

We're using Go.Cd and transitioning to Bamboo.

One of the features we use in Go.Cd is value stream maps. This enables triggering another pipeline and passing information (and build artifacts) to the downstream pipeline.

This is valuable when an upstream build has a particular version number, and you want to pass that version number to the downstream build.

I want to replicate this setup in Bamboo (without a plugin).

My question is: Is there a way to trigger a child plan in Bamboo and pass it information like a version number?

1

There are 1 answers

0
hawkeye On

This has three steps.

  1. Use a parent plan/child plan to setup the relationship.

  2. Using the artifacts tab, setup shared artifacts to transfer files of one plan to another.

3a. At the end of the parent build, dump the environment variables to a file

env > env.txt

3b. Setup (using the artifacts tab) an artifact selector that picks this up.

3c. Setup a fetch for this artifact from the shared artifacts in the child plan.

3d. Using the Inject Variables task - read the env.txt file you have transferred over. Now your build number from the original pipeline is now available in this downstream pipeline. (Just like Go.Cd).