On 18.07.2014 19:04, Marius Ciotlos wrote:
> We are using Pipeline parameters instead of Environment variables.
> It depends what you are trying to achieve, but for our needs we define a
> Template which relies on #{VARIABLE} which is defined at pipeline level
> as a Pipeline parameter.
>
> We do needed environment variable, we're relaying a lot on
> GO_PIPELINE_LABEL to extract app version and tell Chef which application
> version to deploy by pushing it to Chef Server using knife.
>
> Do you have a specific use case you're trying to achieve? The only valid
> use case for me was to use a pre-existing script that relies on a
> command line parameter that is already available in GO as Environment
> variable. In this case what we've done is create a wrapper script that
> we deploy automatically on all our agents and use it as the base command
> and do the transformation.
Hey,
thanks for the answer. I have an existing deploy script that relays on
an environment variable called VERSION to figure out which version it
should deploy. I can't change the script itself because it is used by
other teams as well.
I finally "solved" the problem by using a wrapper script which does
nothing more than:
export VERSION=${GO_PIPELINE_LABEL}
/bin/bash -x path/to/deploy_script.sh
Michael