forked from sogno-platform/pintura
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
40 lines (36 loc) · 869 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
variables:
DOCKER_TAG: ${CI_COMMIT_REF_NAME}
DOCKER_IMAGE: rwthacs/pintura
before_script:
- git submodule sync --recursive
- git submodule update --init --recursive
stages:
- test
- build
- deploy
build:docker:
stage: build
script:
- docker build -t ${DOCKER_IMAGE}:${DOCKER_TAG} .
tags:
- shell
deploy:docker:
stage: deploy
script:
- docker push ${DOCKER_IMAGE}:${DOCKER_TAG}
- eval $(ssh-agent -s)
- echo "${SSH_DEPLOY_KEY}" | perl -p -e 's/&&&&&&&&/\n/g' | ssh-add - > /dev/null
- ssh -l ubuntu -o "StrictHostKeyChecking=no" "${VM_IP}" "cd pintura &&
git checkout master &&
git pull &&
./stop_docker.sh &&
docker system prune -f &&
make docker &&
make start"
dependencies:
- build:docker
tags:
- shell
only:
refs:
- master