Commit 1c3adde6 authored by Ahmad Babaei Moghadam's avatar Ahmad Babaei Moghadam 🎯

Init commit: add files

Co-authored-by: David Siecinski's avatarDavid Sieciński <david.siecinski@goldenoakit.pl>
parent 1e989254
Pipeline #52905 skipped
FROM alpine:3.12.0
ENV SERVICE_ENDPOINT="" \
OPSGENIE_HEARTBEAT_API_URL="" \
OPSGENIE_API_KEY="" \
OPSGENIE_HEARTBEAT_NAME=""
RUN apk --update add curl bash
COPY entrypoint.sh /usr/local/bin/
COPY heartbeat.sh /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["heartbeat.sh"]
\ No newline at end of file
#!/bin/bash
set -e
exec "$@"
\ No newline at end of file
#!/bin/bash
set -u
CURL_STATUS=$(curl ${SERVICE_ENDPOINT} >/dev/null 2>&1; echo $?)
if test ${CURL_STATUS} -eq 0; then
curl -X GET "${OPSGENIE_HEARTBEAT_API_URL}/${OPSGENIE_HEARTBEAT_NAME}/ping" \
--header "Authorization: GenieKey ${OPSGENIE_API_KEY}"
fi
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment