Passing environment variables to downstream is a little tricky. If you consider the following situation:
git -> A -> C
| ^
+>B +
and A-1 is triggered off of git-1, B-1 is triggered with git-1 and B-2 is trigerred with git-2. Now, if C is trigerred with A-1 and B-2 then what version is of git should be exposed as enviornment variable?
--
In your case, what you can do is add pipeline A as material for pipeline C to get value published as env. var. I understand its not easy but thats an option.
What you are currently doing (writing to file) and passing it as artifact is good one. The ambiguity i mentioned is resolved by the path specified by fetch artifact path.
I will get back to you if i have better suggestions.
I would venture that the environment variable name could be created to map the pathway the value took through the stream.
Also, by directly making A a material of C, a successful build of A would trigger C, no? And if we only want C to kick off after a successful build of B that could be a bad race condition. Does anyone know how GoCD handles such a thing?
We're passing the artifact file - it seems to be working. It's growing on me - feels less hackish as we continue using it.-Ed
On Saturday, September 20, 2014 7:40:08 AM UTC-4, srinivas upadhya wrote:Passing environment variables to downstream is a little tricky. If you consider the following situation:
git -> A -> C
| ^
+>B +and A-1 is triggered off of git-1, B-1 is triggered with git-1 and B-2 is trigerred with git-2. Now, if C is trigerred with A-1 and B-2 then what version is of git should be exposed as enviornment variable?
--
In your case, what you can do is add pipeline A as material for pipeline C to get value published as env. var. I understand its not easy but thats an option.
What you are currently doing (writing to file) and passing it as artifact is good one. The ambiguity i mentioned is resolved by the path specified by fetch artifact path.
I will get back to you if i have better suggestions.
--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.