Hi,

On Monday, 20 June 2016 08:20:54 UTC+2, David Binney wrote:
>
> I am attempting to build a new pipeline and make it very modular and 
> re-usable. I would like some feedback to tell me if i am going completely 
> down the wrong path or if there are better ways to do it, so feel free to 
> offer suggestions. Anyway, i have two initial stages, the first 
> "prepare-app" which just pulls all the prefixed env vars from the pipeline 
> config and then puts them into an apache vhost file ready to be deployed. 
> The next stage "apache setup" will take that file and push it to the 
> servers for "development pipeline" in this case. 
>
> Atm, the switch between "1, prepare-app" and "2, apache-setup" will 
> override the previously created and configured vhost file. So, i was 
> thinking that i can use artefacts to pull the prepared-vhost into my stage 
> 2 apache setup, and do this for anything i want to re-use i.e a tarred 
> version of the codebase. So, I guess a few questions would be : 
>
> 1. how do i reference the path to the artefacts in code using go-cd 
> environment variables
> 2. is this how i should be doing it? 
>
>
You should indeed be using artifacts, so the "apache-setup" could use the 
"vhosts" file captured in a previous step.

You can put #{placeholders} into the configuration of a fetchartifact task, 
so when the "apache-setup" stage comes from a template, you can use a 
parameter to specify where exactly this artifact should come from -- either 
a previous stage in the same template, or even from another upstream 
pipeline. See 
https://docs.go.cd/16.3.0/configuration/managing_dependencies.html for how 
that works.

I hope that answers your questions; if not, maybe try to rephrase them.

Best regards,
Moritz
-- 
https://deploybook.com/

>  
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to