Job Information available in Task Containers #6247
Replies: 2 comments 1 reply
-
|
See #3179 |
Beta Was this translation helpful? Give feedback.
-
|
It sounds like the main reason you want access to these env vars is purely to generate a notification. The Concourse-y way to do this is probably to model the notification channel as a resource, and then One possible solution is to create a custom resource type with no-op |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking for a way for a task container to be self-aware of what pipeline/job/task/build it's in, and possibly have that exposed in ENV somehow. This resource implements what I'm looking for https://github.com/SWCE/metadata-resource but it's a flawed approach, in my opinion as the issue we have with it is because resources are shared amongst the jobs and tasks which
getit, the metadata for JOB A is showing up for JOB B etc. and it's a mess.I don't know if it's available on the filesystem somewhere but was wondering if anyone had similar need. We want to avoid hard coding params into every task to tell it what pipeline/job/task it is as I think there might be a more elegant way of determining this.
Why do we need this info?
We have a lot of jobs which run tests and monitor our platform and when those jobs fail they send out an alert. The alert contains the team/pipeline/job name so whoever get's the alert has a pre-generated concourse link to immediately view.
Thanks for the help.
Beta Was this translation helpful? Give feedback.
All reactions