-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
96 lines (90 loc) · 2.12 KB
/
.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
stages:
- build
- alt_build
- publish
variables:
DOCKER_REGISTRY: registery.duniter.org
IMAGE_NAME: geconomicus_ci
.fast-build:
stage: build
image: $DOCKER_REGISTRY/$IMAGE_NAME
script:
#- ./update_translation.sh
- ./build.sh
- mv ./rst/build/html public
- ./build_en_US.sh
- mv ./rst/build/html public/en
after_script:
- cat /tmp/sphinx-err-*.log || true
artifacts:
paths:
- public
expire_in: 10 minutes
only:
- master
failsafe-build:
stage: alt_build
#when: on_failure
image: python:3.4
before_script:
- apt-get update
- apt-get install -y zip inkscape imagemagick
- pip install sphinx==1.3
- pip install sphinx-intl
- pip install docutils==0.12
#- identify -list font || true
script:
#- ./update_translation.sh
- ./build.sh
- mv ./rst/build/html public
- ./build_en_US.sh
- mv ./rst/build/html public/en
after_script:
- cat /tmp/sphinx-err-*.log || true
artifacts:
paths:
- public
expire_in: 10 minutes
only:
- master
.docker-for-fast-build:
stage: alt_build
when: on_failure
allow_failure: true
variables:
GIT_STRATEGY: none
image: docker:latest
services:
- docker:dind
script:
- echo 'FROM python:3.4' > Dockerfile
- echo 'RUN apt-get update && apt-get install -y zip inkscape imagemagick' >> Dockerfile
- echo 'RUN pip install sphinx==1.3 sphinx-intl docutils==0.12' >> Dockerfile
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD $DOCKER_REGISTRY
- docker build --pull -t ${DOCKER_REGISTRY}/${IMAGE_NAME} .
- docker push ${DOCKER_REGISTRY}/${IMAGE_NAME}
pages:
stage: publish
#when: always
script:
- ls public
artifacts:
paths:
- public
only:
- master
mirror:
stage: publish
#when: always
image: liaohuqiu/rsync
before_script:
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- >-
[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >
~/.ssh/config
script:
- rsync -az -e ssh ./public/ [email protected]:~/geconomicus
only:
- master