1
votes

Would anyone know if there is any magic way to define an env variable that could be accessed from all stages of the DevOps build pipeline?

So far, it seems the only thing you can do is to define env variables shared by all jobs inside the same stage.

I understand that each stage run in complete isolation under the cover, but still I was wondering if any trick could be done to define a common env variable for all stages?

Thanks

2

2 Answers

2
votes

Environment variables are per stage. There is currently no way to have the same environment variable across that entire pipeline. You would need to set it on each stage individually.

1
votes

Environment variables are per stage, correct, so if you want one to exist across all stages in a pipeline, you'll need to add it to each stage.

For a list of built-in environment variables and other information, take a look at this documentation page: https://console.ng.bluemix.net/docs/services/DeliveryPipeline/deploy_var.html