-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
echo "===========================================================" | ||
echo "== stream-loader/hooks/build" | ||
echo "== Building with file: $DOCKERFILE_PATH" | ||
echo "== Environment variables:" | ||
env | sort | awk -F= '{ print "== ", $0}' | ||
echo "===========================================================" | ||
|
||
# Build with data. | ||
|
||
if [ ${DOCKERFILE_PATH} == "Dockerfile-with-data" ]; then | ||
|
||
# Build from staging with data. | ||
|
||
if [ -z ${SENZING_APT_REPOSITORY_URL} ]; then | ||
echo "Build from staging with data." | ||
docker build \ | ||
--build-arg SENZING_ACCEPT_EULA=${SENZING_ACCEPT_EULA} \ | ||
--build-arg SENZING_APT_REPOSITORY_URL=${SENZING_APT_REPOSITORY_URL} \ | ||
--file ${DOCKERFILE_PATH} \ | ||
--tag ${IMAGE_NAME} \ | ||
. | ||
|
||
# Default build with data. | ||
|
||
else | ||
echo "Build from production with data." | ||
docker build \ | ||
--build-arg SENZING_ACCEPT_EULA=${SENZING_ACCEPT_EULA} \ | ||
--file ${DOCKERFILE_PATH} \ | ||
--tag ${IMAGE_NAME} \ | ||
. | ||
fi | ||
|
||
# Default build with no data. | ||
|
||
else | ||
echo "Build from production." | ||
docker build \ | ||
--file ${DOCKERFILE_PATH} \ | ||
--tag ${IMAGE_NAME} \ | ||
. | ||
fi |