Commit 562f6831 authored by Andreas Böttger's avatar Andreas Böttger 😬

Add new file

parent 8d17fe10
variables:
REVIEW_IMAGE: docker.rz.tu-harburg.de:5000/docker/jekyll
DOCKER_CONTAINER_NAME: ${CI_PROJECT_PATH_SLUG}-${CI_ENVIRONMENT_SLUG}
stages:
- review
- deploy
review:start:
stage: review
script:
- pwd
- sudo docker run --detach --rm --env VIRTUAL_HOST=${CI_ENVIRONMENT_SLUG} --name ${DOCKER_CONTAINER_NAME} ${REVIEW_IMAGE}:latest || true
- sudo docker cp . ${DOCKER_CONTAINER_NAME}:/opt/app
- sudo docker exec ${DOCKER_CONTAINER_NAME} bundle install --gemfile=/opt/app/Gemfile
#when: manual
environment:
name: review/${CI_COMMIT_REF_NAME}
url: http://${CI_ENVIRONMENT_SLUG}.collaborating.tuhh.de
on_stop: review:stop
only:
- branches
tags:
- development
- ssg
except:
- master
review:stop:
stage: review
variables:
GIT_STRATEGY: none
script:
- sudo docker stop ${DOCKER_CONTAINER_NAME}
when: manual
environment:
name: review/${CI_COMMIT_REF_NAME}
action: stop
only:
- branches
tags:
- development
- ssg
except:
- master
#deploy:
# stage: deploy
# only:
# - master
# tags:
# - production
# script:
# - pwd
# - sshpass -p "$SSH_PASSWD" ssh -p "$SSH_PORT" $SSH_USER@$HOST_NAME "mkdir -p /usr/share/nginx/html/production"
# - sshpass -p "$SSH_PASSWD" scp -P "$SSH_PORT" -r _site/* $SSH_USER@$HOST_NAME:/usr/share/nginx/html/production
# environment:
# name: production
# url: https://$PROXY_HOST_NAME/$CI_PROJECT_PATH/
\ No newline at end of file
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