Fixing Docker build
This commit is contained in:
parent
8250b4048f
commit
904a6b363d
@ -7,13 +7,11 @@ cd webgoat-server
|
|||||||
|
|
||||||
if [ "${BRANCH}" == "master" ] && [ ! -z "${TRAVIS_TAG}" ]; then
|
if [ "${BRANCH}" == "master" ] && [ ! -z "${TRAVIS_TAG}" ]; then
|
||||||
# If we push a tag to master this will update the LATEST Docker image and tag with the version number
|
# If we push a tag to master this will update the LATEST Docker image and tag with the version number
|
||||||
docker build -f Dockerfile -t $REPO:latest .
|
docker build -f Dockerfile -t $REPO:latest -t $REPO:${TRAVIS_TAG} .
|
||||||
docker tag $REPO:${TRAVIS_TAG}
|
|
||||||
docker push $REPO
|
docker push $REPO
|
||||||
elif [ ! -z "${TRAVIS_TAG}" ]; then
|
elif [ ! -z "${TRAVIS_TAG}" ]; then
|
||||||
# Creating a tag build we push it to Docker with that tag
|
# Creating a tag build we push it to Docker with that tag
|
||||||
docker build -f Dockerfile -t $REPO:${TRAVIS_TAG} .
|
docker build -f Dockerfile -t $REPO:${TRAVIS_TAG} .
|
||||||
docker tag $REPO:${TRAVIS_TAG}
|
|
||||||
docker push $REPO
|
docker push $REPO
|
||||||
elif [ "${BRANCH}" == "develop" ]; then
|
elif [ "${BRANCH}" == "develop" ]; then
|
||||||
docker build -f Dockerfile -t $REPO:snapshot .
|
docker build -f Dockerfile -t $REPO:snapshot .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user