From 241166649d1b61d8f9cff774af5d8fb19a862151 Mon Sep 17 00:00:00 2001 From: Ben Lee Date: Thu, 20 May 2021 07:44:12 -0700 Subject: [PATCH] Expose BUILDKITE_STEP_ID and BUILDKITE_STEP_KEY (#26) Adding BUILDKITE_STEP_ID and BUILDKITE_STEP_KEY to the `allowedEnvs` --- lib/job.jsonnet | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/job.jsonnet b/lib/job.jsonnet index 5431705..90a5c86 100644 --- a/lib/job.jsonnet +++ b/lib/job.jsonnet @@ -28,6 +28,8 @@ local allowedEnvs = std.set( 'BUILDKITE_REBUILT_FROM_BUILD_NUMBER', 'BUILDKITE_REPO', 'BUILDKITE_SOURCE', + 'BUILDKITE_STEP_ID', + 'BUILDKITE_STEP_KEY', ] ); @@ -155,6 +157,8 @@ function(jobName, agentEnv={}, stepEnvFile='', patchFunc=identity) patchFunc({ 'buildkite/agent-id': env.BUILDKITE_AGENT_ID, 'buildkite/agent-name': env.BUILDKITE_AGENT_NAME, 'buildkite/job-id': env.BUILDKITE_JOB_ID, + 'buildkite/step-id': env.BUILDKITE_STEP_ID, + 'buildkite/step-key': env.BUILDKITE_STEP_KEY, 'job-name': jobName, },