Commit 449ab7da authored by Tommy Svendsen's avatar Tommy Svendsen
Browse files

DEICH-3487 adding deployment script to start prod deploy

parent 793ea28d
......@@ -28,6 +28,7 @@
- deploy-test
- sanity
- deploy-stage
- deploy-prod
#Building
......@@ -204,7 +205,9 @@
#Deploy test
.devtest:
stage: deploy-test
environment: test
environment:
name: test
url: https://deichman.test.obib.no
variables:
SSH_USER: $DEPLOY_USER
SSH_SERVERS: $DEVTEST_SERVER
......@@ -373,7 +376,9 @@
.staging:
stage: deploy-stage
environment: stage
environment:
name: stage
url: https://deichman.staging.obib.no
variables:
SSH_USER: $DEPLOY_USER
SSH_KNOWN_HOSTS: $STAGING_HOSTS
......@@ -393,6 +398,32 @@
# - ./transitionIssues.sh stage
- *after
.production:
stage: deploy-prod
environment:
name: prod
url: https://deichman.beta.deichman.no
variables:
SSH_USER: $DEPLOY_USER
SSH_KNOWN_HOSTS: $PRODUCTION_HOSTS
SSH_SERVERS: "${PRODUCTION_SERVERS}"
SSH_KEY: $DEPLOY_KEY
SSH_VOTING_SERVER: ${PRODUCTION_VOTING_SERVER}
DEPLOY_VARIANT: "-initdb-noncluster"
deploy-production:
extends:
- .staging
- .deploy-scp
# only:
# refs:
# - tags
when: manual
after_script:
# - ./transitionIssues.sh stage
- *after
#Automated tests
koha-api-tests:
variables:
......
......@@ -121,7 +121,7 @@ remote-deploy: | check-ssh_user check-ssh_servers check-TAG
do\
ssh $(ssh_user)@$$server "mkdir -p ./deployments/$(TAG)/deichman && rm -rf ./deployments/$(TAG)/config && cp -rf \$$DEPLOYMENT_CONFIG_LOCATION/ ./deployments/$(TAG)/config"; \
scp docker-compose.yml $(ssh_user)@$$server:deployments/$(TAG)/ ; \
ssh $(ssh_user)@$$server "cd deployments/$(TAG)/deichman && TAG=$(TAG) DEPLOYMENT_CONFIG_LOCATION=./config docker-compose --env-file=../config/.env -f ../docker-compose.yml -f ../config/docker-compose.yml config > docker-compose.yml && docker-compose pull && docker-compose up -d $(CONTAINER)"; \
ssh $(ssh_user)@$$server "cd deployments/$(TAG)/deichman && TAG=$(TAG) DEPLOYMENT_CONFIG_LOCATION=./config docker-compose --env-file=../config/.env -f ../docker-compose.yml -f ../config/docker-compose$(DEPLOY_VARIANT).yml config > docker-compose.yml && docker-compose pull && docker-compose up -d $(CONTAINER)"; \
done
remote-deploy-voting: | check-ssh_user check-TAG
......
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