Add ATC_EXTERNAL_URL to env in task step #5573
-
Currently ATC_EXTERNAL_URL url available as part of env within just get step and would be created if you can add this to the task step as well so that we can read the concourse url from env for some of the automation(becomes easy if we manage multiple concourse instances). Any thoughts ?? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I general I'm against exposing information to tasks without having a really good reason for Tasks as a general concept ("functions dependent solely on their inputs") to have a need for it. What are you trying to accomplish by having this value exposed to your tasks? |
Beta Was this translation helpful? Give feedback.
-
I agree with @vito that its probably a bad idea and you should think about why you need the variables in your task. That said, you can use a resource to pull down all the env vars into files then pass them into your task. I've used this one before https://github.com/olhtbr/metadata-resource |
Beta Was this translation helpful? Give feedback.
-
@vito @crsimmons Thanks for your inputs..It make sense. currently we have more than 1 concourse setup and in our automation we are using hard coded concourse url to switch and this was the reason for this ask. Thanks a lot I try with metadata resource .. |
Beta Was this translation helpful? Give feedback.
I agree with @vito that its probably a bad idea and you should think about why you need the variables in your task.
That said, you can use a resource to pull down all the env vars into files then pass them into your task. I've used this one before https://github.com/olhtbr/metadata-resource