Permalink
Browse files

Build release when tag is set

  • Loading branch information...
nbaars committed Jun 20, 2018
1 parent 14dbd47 commit bc84e8f207daa7afe307a982ae1fc6a0a1891fa7
Showing with 2 additions and 8 deletions.
  1. +0 −2 .travis.yml
  2. +2 −6 scripts/deploy-webgoat.sh
View
@@ -28,7 +28,6 @@ deploy:
on:
repo: WebGoat/WebGoat
tags: true
branch: master
- provider: releases
skip_cleanup: true
overwrite: true
@@ -40,7 +39,6 @@ deploy:
on:
repo: WebGoat/WebGoat
tags: true
branch: master
env:
global:
#Docker login
@@ -6,7 +6,7 @@ export REPO=webgoat/webgoat-8.0
cd webgoat-server
ls target/
if [ "${BRANCH}" == "master" ] && [ ! -z "${TRAVIS_TAG}" ]; then
if [ ! -z "${TRAVIS_TAG}" ]; then
# If we push a tag to master this will update the LATEST Docker image and tag with the version number
docker build --build-arg webgoat_version=${TRAVIS_TAG:1} -f Dockerfile -t $REPO:latest -t $REPO:${TRAVIS_TAG} .
docker push $REPO
@@ -27,14 +27,10 @@ cd ..
cd webwolf
ls target/
if [ "${BRANCH}" == "master" ] && [ ! -z "${TRAVIS_TAG}" ]; then
if [ ! -z "${TRAVIS_TAG}" ]; then
# If we push a tag to master this will update the LATEST Docker image and tag with the version number
docker build --build-arg webwolf_version=${TRAVIS_TAG:1} -f Dockerfile -t $REPO:latest -t $REPO:${TRAVIS_TAG} .
docker push $REPO
elif [ ! -z "${TRAVIS_TAG}" ]; then
# Creating a tag build we push it to Docker with that tag
docker build --build-arg webwolf_version=${TRAVIS_TAG:1} -f Dockerfile -t $REPO:${TRAVIS_TAG} -t $REPO:latest .
docker push $REPO
else
echo "Skipping releasing to DockerHub because it is a build of branch ${BRANCH}"
fi

0 comments on commit bc84e8f

Please sign in to comment.