Skip to content

Commit

Permalink
£rd try
Browse files Browse the repository at this point in the history
  • Loading branch information
keirbadger committed Apr 29, 2024
1 parent 2ab92ff commit e821d88
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions files/notify_updates
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ if [ -z "${AMI_BUILD_JOB_NAME}" ]; then
exit 1
fi

if [ "${AMI_BUILD_JOB_NAME}" == '%AMI_BUILD_JOB_NAME%' ]; then
echo 'AMI_BUILD_JOB_NAME contains placeholder, ignoring' >&1
exit 0
fi

if [ -z "${STATELESS_INSTANCE}" ]; then
echo 'STATELESS_INSTANCE should be set to 0 or 1' >&1
fi
Expand Down
6 changes: 6 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
minute: '0'
job: "/usr/local/bin/notify_updates &>> /var/log/notify_updates.log"

- name: Jenkins job name for API
community.general.cronvar:
name: AMI_BUILD_JOB_NAME
value: "%AMI_BUILD_JOB_NAME%"
cron_file: notify_updates

- name: Datadog API token
community.general.cronvar:
name: DATADOG_API_TOKEN
Expand Down

0 comments on commit e821d88

Please sign in to comment.