forked from MegaMosquito/achatina
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchecks.mk
26 lines (21 loc) · 925 Bytes
/
checks.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Makefile targets to validate that required environment variables are set
# This file is included in other Makefiles in this project.
check-dockerhubid:
@if [ -z "${DOCKERHUB_ID}" ]; \
then { echo "***** ERROR: \"DOCKERHUB_ID\" is not set!"; exit 1; }; \
else echo " NOTE: Using DockerHubID: \"${DOCKERHUB_ID}\""; \
fi
@sleep 1
check-input-url:
@if [ -z "${INPUT_URL}" ]; \
then echo " Warning: \"INPUT_URL\" is not set! Using default!"; \
fi
@sleep 1
check-kafka-creds:
@if [ -z "${EVENTSTREAMS_BROKER_URLS}" ] || \
[ -z "${EVENTSTREAMS_API_KEY}" ] || \
[ -z "${EVENTSTREAMS_PUB_TOPIC}" ]; \
then echo " Warning: No EventStreams credentials found! Kafka publication is disabled."; \
else echo " NOTE: Publishing to topic: ${EVENTSTREAMS_PUB_TOPIC}"; \
fi
.PHONY: check-dockerhubid check-input-url check-kafka-creds