Closed Bug 1356955 Opened 7 years ago Closed 7 years ago

Expose the taskcluster job name as an environment variable

Categories

(Taskcluster :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

See the large comment in bug 1356529. Long story short, I want to use a script in most build jobs that will do things based on information about the job in the taskcluster configuration, and for that, obviously, the job name is necessary.

AFAICT, it's currently not exposed, so let's do that.
Assignee: nobody → mh+mozilla
Blocks: 1356974
Comment on attachment 8858714 [details]
Bug 1356955 - Expose the taskcluster job name as an environment variable.

https://reviewboard.mozilla.org/r/130740/#review133426

::: taskcluster/taskgraph/transforms/task.py:975
(Diff revision 1)
>          ):
>              payload = task_def.get('payload')
>              if payload:
>                  env = payload.setdefault('env', {})
>                  env['MOZ_AUTOMATION'] = '1'
> +                env['MOZ_JOB_NAME'] = task['label']

"job name" and "label" are two different words.  Let's not invent a new name for something that already has a name.
Attachment #8858714 - Flags: review?(dustin) → review-
Comment on attachment 8858714 [details]
Bug 1356955 - Expose the taskcluster job name as an environment variable.

https://reviewboard.mozilla.org/r/130740/#review133428

Whoops, clicked "publish" instead of "Edit Review"

I don't think this is necessary in light of my comments on bug 1356529, but I'm not opposed to it in general -- as long as the environment variable calls a label a LABEL.  How about MOZ_TASK_LABEL?
cf. the discussion around bug 1356529, we're not going to need this.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: