Commit 7783d556 authored by Matija Obreza's avatar Matija Obreza
Browse files

Update sandbox and production services with CI

parent 4cf75d0a
variables:
IMAGE_VERSION: "0.1-SNAPSHOT"
IMAGE_VERSION: "0.1"
DOCKER_HOST: "genesys1.swarm.genesys-pgr.org"
ARTIFACTS: "target/app"
......@@ -189,7 +189,37 @@ deploy to sandbox:
- DOCKER_CMD=docker
script:
# Actions
- ${DOCKER_CMD} service update --image ${CI_REGISTRY_IMAGE}:${IMAGE_VERSION} genesysuidemo_frontend
- echo "Deploying ${CI_REGISTRY_IMAGE}:${IMAGE_VERSION} to sandbox"
- ${DOCKER_CMD} service update --image ${CI_REGISTRY_IMAGE}:${IMAGE_VERSION} genesysui_sandbox
environment:
name: sandbox
url: https://genesys.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} genesysui_production
environment:
name: beta
url: https://beta.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