Commit 02830ed6 authored by asajedi's avatar asajedi
Browse files

Merge branch 'setupCICDForLiveServer' into 'master'

Set up CI/CD for live server

See merge request !57
parents 23fc4118 b8a0cddd
Pipeline #255016 failed with stages
in 16 minutes
......@@ -30,6 +30,17 @@ build_image:
only:
- master
build_liveimage:
stage: build
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $IMAGE_TAG .
- docker tag $IMAGE_TAG $CI_REGISTRY_IMAGE:live
- docker push $IMAGE_TAG
- docker push $CI_REGISTRY_IMAGE:live
only:
- tags
deploy_dev:
stage: deploy
environment:
......@@ -40,5 +51,15 @@ deploy_dev:
- scp -r ./solr/* $DEV_SSH_LOGIN:$DEV_SOLR_FILES_PATH
- ssh $DEV_SSH_LOGIN "$DEV_START_SCRIPT"
deploy_live:
stage: deploy
environment:
name: live
only:
- tags
script:
- scp -r ./solr/* $LIVE_SSH_LOGIN:$LIVE_SOLR_FILES_PATH
- ssh $LIVE_SSH_LOGIN "$LIVE_START_SCRIPT"
services:
- docker:dind
Supports Markdown
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