Skip to content

Commit 27a2f2e

Browse files
committed
Store randomized job name in temp file
1 parent 1ec2f3c commit 27a2f2e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

hooks/command

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -euo pipefail
55
basedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
66

77
job_name="${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_NUMBER}-$(head -c 5 /dev/urandom | base32 | tr '[:upper:]' '[:lower:]')"
8+
echo "${job_name}" > /tmp/job_name
89

910
if [[ ${BUILDKITE_TIMEOUT:-"false"} == "false" ]]; then
1011
BUILDKITE_TIMEOUT=600

hooks/pre-exit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -euo pipefail
44

5-
job_name="${BUILDKITE_PIPELINE_SLUG}-${BUILDKITE_BUILD_NUMBER}-$(head -c 5 /dev/urandom | base32 | tr '[:upper:]' '[:lower:]')"
5+
job_name="$(cat /tmp/job_name)"
66

77
echo "--- :kubernetes: Cleanup"
88

0 commit comments

Comments
 (0)