Improve docker build to use hooks
This commit is contained in:
15
hooks/build
Executable file
15
hooks/build
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
VERSION=master
|
||||
|
||||
if [ "$SOURCE_BRANCH" != "" ]; then
|
||||
VERSION=$SOURCE_BRANCH
|
||||
|
||||
if [ "$SOURCE_BRANCH" == "latest" ]; then
|
||||
VERSION=master
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Building $VERSION"
|
||||
|
||||
docker build --build-arg VERSION=$VERSION -t $IMAGE_NAME .
|
||||
Reference in New Issue
Block a user