Commit 0a0f8457 authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch '397-update-ci-for-production' into 'master'

Resolve "Update CI for production"

Closes #397

See merge request !313
parents b6b93682 39a96f7f
Pipeline #7055 passed with stages
in 6 minutes and 7 seconds
variables:
IMAGE_VERSION: "2.0-SNAPSHOT"
IMAGE_VERSION: "2.0"
DOCKER_HOST: "genesys1.swarm.genesys-pgr.org"
ARTIFACTS: "target/app"
......@@ -185,7 +185,35 @@ deploy to sandbox:
- DOCKER_CMD=docker
script:
# Actions
- ${DOCKER_CMD} service update --image ${CI_REGISTRY_IMAGE}:${IMAGE_VERSION} catalog-sandbox_frontend
- ${DOCKER_CMD} service update --image ${CI_REGISTRY_IMAGE}:${IMAGE_VERSION} catalogui_sandbox
environment:
name: sandbox
url: https://catalog.demo.genesys-pgr.org
deploy to production:
stage: deploy
image: docker:latest
dependencies:
only:
- /^production-.*/
when: manual
variables:
GIT_STRATEGY: none
before_script:
# Address the swarm
- export DOCKER_HOST=swarm.genesys-pgr.org
# Configuration
- TLS_PATH=~/.docker/${DOCKER_HOST}/certs && mkdir -p ${TLS_PATH}
- echo "${DOCKER_TLS_CA}" > ${TLS_PATH}/ca.pem
- echo "${DOCKER_TLS_KEY}" > ${TLS_PATH}/key.pem
- echo "${DOCKER_TLS_CERT}" > ${TLS_PATH}/cert.pem
- export DOCKER_TLS_VERIFY=1
- export DOCKER_CERT_PATH=${TLS_PATH}
- DOCKER_CMD=docker
script:
# Actions
- echo "Deploying ${CI_REGISTRY_IMAGE}:${IMAGE_VERSION}-${CI_COMMIT_REF_SLUG} to production"
- ${DOCKER_CMD} service update --image ${CI_REGISTRY_IMAGE}:${IMAGE_VERSION}-${CI_COMMIT_REF_SLUG} catalogui_production
environment:
name: catalog
url: https://catalog.genesys-pgr.org
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