Setting and Passing variable to a downstream pipeline

515 views
Skip to first unread message

Doug Farmer

unread,
Nov 12, 2015, 4:53:47 PM11/12/15
to go-cd
Hi,

Anyone know how set within a script (shell) pass the variable/parameter from one pipeline to another? The scenario is something list this; pipeline A builds the product and creates the package with a given name which is generated within a shell script. Pipepline B has a shell script which takes the name of that artifact and the environment and deploys it. My issue is that from all the docs I've read nothing clearly outlines how best to handle this scenario. Hoping someone with more experience than me (~3 weeks) can help. 

Thanks!

Doug

Fredrik Wendt

unread,
Nov 12, 2015, 6:21:19 PM11/12/15
to go...@googlegroups.com
One way to accomplish this, is by passing along a simple "variable.sh" artifact which you create in pipeline A. The you can easily fetch this from the A pipeline, and source/read it in your B pipeline's script.

You may also try using pipeline properties for this, but I've found that much harder to get right.
http://support.thoughtworks.com/entries/23754976-Pass-variables-to-other-pipelines

/ Fredrik

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
+46 702 778511
Reply all
Reply to author
Forward
0 new messages