aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christopher Baklid <[email protected]>2018-07-29 21:43:14 +0200
committerGravatar Christopher Baklid <[email protected]>2018-07-29 21:43:14 +0200
commit8a1816ba790153a89bd2a8c129494db6e99e7e05 (patch)
tree99a05d8e436cff5b2a1ba693f206ba2f951aacf9
parentgo back to alpine 3.7 until I get around to compiling nsjail for 3.8 (diff)
add deploy script
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--scripts/deploy.sh18
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