diff options
author | 2018-07-29 21:43:14 +0200 | |
---|---|---|
committer | 2018-07-29 21:43:14 +0200 | |
commit | 8a1816ba790153a89bd2a8c129494db6e99e7e05 (patch) | |
tree | 99a05d8e436cff5b2a1ba693f206ba2f951aacf9 | |
parent | go back to alpine 3.7 until I get around to compiling nsjail for 3.8 (diff) |
add deploy script
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | scripts/deploy.sh | 18 |
2 files changed, 18 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 405725d..7432a5c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,5 +23,3 @@ build: - pipenv install --dev --deploy - pipenv run lint - pipenv run test - - pipenv run buildbox - - pipenv run pushbox diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100644 index 0000000..9d4ec4f --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Build and deploy on master branch +if [[ $CI_COMMIT_REF_SLUG == 'master' ]]; then + echo "Connecting to docker hub" + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + + echo "Building image" + pipenv run buildbox + + echo "Pushing image" + pipenv run pushbox + + # echo "Deploying container" + # curl -H "token: $AUTODEPLOY_TOKEN" $AUTODEPLOY_WEBHOOK +else + echo "Skipping deploy" +fi |