David K. Bainbridge | 9add040 | 2018-02-07 23:24:28 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | echo "=> Using custom build hook to add build arguments" |
| 4 | echo "=> set DEBUG=true to see debug information" |
| 5 | |
| 6 | if [ "$DEBUG" == "true" ]; then |
| 7 | env | sort |
| 8 | fi |
| 9 | |
Jonathan Hart | b5676e1 | 2018-03-16 14:02:59 -0700 | [diff] [blame^] | 10 | TAG=${CACHE_TAG:-latest} |
| 11 | |
David K. Bainbridge | 9add040 | 2018-02-07 23:24:28 -0800 | [diff] [blame] | 12 | cd /src/${BUILD_CODE}${BUILD_PATH} |
| 13 | |
| 14 | if [ "$DEBUG" == "true" ]; then |
Jonathan Hart | b5676e1 | 2018-03-16 14:02:59 -0700 | [diff] [blame^] | 15 | echo docker build --build-arg REPOSITORY=$REPOSITORY --build-arg REGISTRY=$REGISTRY --build-arg TAG=$TAG -t $IMAGE_NAME -f $DOCKERFILE_PATH . |
David K. Bainbridge | 9add040 | 2018-02-07 23:24:28 -0800 | [diff] [blame] | 16 | fi |
| 17 | |
Jonathan Hart | b5676e1 | 2018-03-16 14:02:59 -0700 | [diff] [blame^] | 18 | docker build --build-arg REPOSITORY=$REPOSITORY --build-arg REGISTRY=$REGISTRY --build-arg TAG=$TAG -t $IMAGE_NAME -f $DOCKERFILE_PATH . |