Commit 5ea57866 authored by Sam Galson's avatar Sam Galson
Browse files

Add staging and demo jobs

parent ed718a20
Pipeline #4457 passed with stages
in 5 minutes and 4 seconds
......@@ -5,6 +5,8 @@ stages:
- build
- test
- review
- staging
- demo
variables:
IMAGE_ORG: inkcoko
......@@ -47,7 +49,7 @@ review:
environment:
name: review/$CI_COMMIT_REF_NAME
# !! kube-lego will fail if domain > 63 chars
url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
url: "http://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
on_stop: stop_review
except:
- master
......@@ -70,3 +72,39 @@ stop_review:
- source deploy.sh
- delete_deployment
- delete_objects_in_environment pvc
push:latest:
image: docker:latest
stage: staging
script:
- if [ -z "$DOCKERHUB_USERNAME" ] || [ -z "$DOCKERHUB_PASSWORD" ]; then echo "Not pushing" && exit 0; fi
- docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
- echo "Ignore warning! Cannot perform an interactive login from a non TTY device"
- docker build -t $IMAGE_ORG/$IMAGE_NAME:latest --label COMMIT_SHA=$CI_COMMIT_SHA .
- docker push $IMAGE_ORG/$IMAGE_NAME:latest
only:
- master
staging:
image: pubsweet/deployer:latest
stage: staging
environment:
name: ink-staging
url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
only:
- master
script:
- source deploy.sh
- create_deployment
demo:
image: pubsweet/deployer:latest
stage: demo
environment:
name: ink-demo
url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
when: manual
script:
- source deploy.sh
- create_deployment
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment