You could set your global environment variables in the go agents itself.

Like for example, you might need the AWS keys to push your build binaries
to S3. Assuming you use the standard S3 tools you will benefit from the
~/.s3cfg or ~/.aws/credentials file available on the agents.

Of course this approach assumes you can have some kind of configuration
management for your agents or if you're running them in a docker, you can
update it and deploy a new version.

I'm not aware of any GoCD specific way to plug in common environment
variables across all environments and pipelines.

On Tue, Sep 19, 2017 at 5:03 PM, Sandro Heinzelmann <[email protected]>
wrote:

> Hi guys,
>
> We have the following high-level setup:
> - Many different projects configure their own pipelines via yaml config.
> They are solely responsible for their builds
> - All projects use the same centralized GoCD server and certain other
> centralized infrastructure like a binary repository for artifact deployment.
> - Most projects run their pipelines in their own GoCD environment (i.e the
> environment you can define on the server) [1]
>
> I'm wondering if there is a good approach to handling *configuration *for
> these centralized part.
>
> A specific example: To deploy to the binary repository, access credentials
> are needed. We don't want the projects to all have to maintain these in
> their own configurations. Rather we would like to provide them to all
> pipelines in a centralized fashion.
>
> Basically, we are looking for something like defining additional standard
> environment variables (e.g. GO_SERVER_URL, etc) that are available
> everywhere, for all environments.
>
> Since there is not a single environment that we could set the env
> variables for, that approach is not that scalable.
>
> Are there any idiomatic ways to solve this in GoCD at this point?
>
> Thanks for any insights & cheers,
> Sandro
>
> [1] The reason we prefer individual environments per project is so
> different projects don't define environment variables that interfere with
> each other or otherwise leak into the builds of other projects.
>
> --
> 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.
>



-- 

Ashwanth Kumar / ashwanthkumar.in

-- 
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