Added docker image building as a deployment step for travis

This commit is contained in:
Alejandro Celaya
2020-03-19 20:04:21 +01:00
parent f57f6b7745
commit 18d125430d
3 changed files with 25 additions and 17 deletions

14
scripts/docker/build Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
set -e
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# If a tag exists, build both that tag and stable
if [[ -z $TRAVIS_TAG ]]; then
docker build --build-arg VERSION=${TRAVIS_TAG#?} -t shlinkio/shlink-web-client:${TRAVIS_TAG#?} -t shlinkio/shlink-web-client:stable .
docker push shlinkio/shlink-web-client:${TRAVIS_TAG#?}
docker push shlinkio/shlink-web-client:stable
fi
docker build -t shlinkio/shlink-web-client:latest .
docker push shlinkio/shlink-web-client:latest