diff --git a/kube/services/jobs/ecr-access-job.yaml b/kube/services/jobs/ecr-access-job.yaml index bf216c783..11979a123 100644 --- a/kube/services/jobs/ecr-access-job.yaml +++ b/kube/services/jobs/ecr-access-job.yaml @@ -44,6 +44,11 @@ spec: name: global key: slack_webhook optional: true + - name: HOSTNAME + valueFrom: + configMapKeyRef: + name: global + key: hostname - name: PAY_MODELS_DYNAMODB_TABLE valueFrom: configMapKeyRef: @@ -70,9 +75,9 @@ spec: if [[ "${SLACK_WEBHOOK}" != 'None' ]]; then if [[ $exitcode == 1 ]]; then - curl -X POST --data-urlencode "payload={\"text\": \"JOBFAIL: ECR access job on ${gen3Env}\"}" "${SLACK_WEBHOOK}" + curl -X POST --data-urlencode "payload={\"text\": \"JOBFAIL: ECR access job on ${HOSTNAME}\"}" "${SLACK_WEBHOOK}" else - curl -X POST --data-urlencode "payload={\"text\": \"SUCCESS: ECR access job on ${gen3Env}\"}" "${SLACK_WEBHOOK}" + curl -X POST --data-urlencode "payload={\"text\": \"SUCCESS: ECR access job on ${HOSTNAME}\"}" "${SLACK_WEBHOOK}" fi fi