Skip to content

Commit bf317c6

Browse files
committed
Added socket and vars for Job API (thanks @jradtilbrook)
1 parent 41ca069 commit bf317c6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

commands/run.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@ if [[ -n "${BUILDKITE_AGENT_BINARY_PATH:-}" ]] ; then
223223
)
224224
fi
225225

226+
if [[ -n "${BUILDKITE_AGENT_JOB_API_SOCKET:-}" ]] ; then
227+
args+=(
228+
"--env" "BUILDKITE_AGENT_JOB_API_SOCKET"
229+
"--env" "BUILDKITE_AGENT_JOB_API_TOKEN"
230+
"--volume" "$BUILDKITE_AGENT_JOB_API_SOCKET:$BUILDKITE_AGENT_JOB_API_SOCKET"
231+
)
232+
fi
233+
226234
# Parse extra env vars and add them to the docker args
227235
while IFS='=' read -r name _ ; do
228236
if [[ $name =~ ^(BUILDKITE_PLUGIN_DOCKER_ENVIRONMENT_[0-9]+) ]] ; then

0 commit comments

Comments
 (0)