.gitlab-ci.yml 5.3 KB
Newer Older
Jamie Hall's avatar
Jamie Hall committed
1
stages:
2
  - docker_login
3
  - ci
4
  - deploy
eric pellegrini's avatar
eric pellegrini committed
5
  - docker_logout
6

7
8
9
10
11
12
13
14
15
docker_login:
  stage: docker_login
  script:
    - docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
  tags:
    - docker
    - sci
    - ubuntu
  
16
17
18
19
############################
# ubuntu trusty  pipeline
############################
ci:ubuntu_trusty:
20
21
  stage: ci
  script:
eric pellegrini's avatar
eric pellegrini committed
22
    - docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_build .
23
24
25
26
27
28
29
30
31
  allow_failure: false
  tags:
    - docker
    - sci
    - ubuntu

deploy:ubuntu_trusty:
  stage: deploy
  script:
eric pellegrini's avatar
eric pellegrini committed
32
    - docker build --force-rm -t deploy_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_deploy .
33
    - chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
34
    - ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh trusty
35
36
  dependencies:
    - ci:ubuntu_trusty
37
38
  allow_failure: false
  only:
39
    - master
40
    - develop
41
42
    - /^release-.*$/
    - /^hotfix-.*$/
43
    - tags
44
    - web
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  when: on_success
  artifacts:
    paths:
    - ./*.deb
  tags:
    - docker
    - sci
    - ubuntu

############################
# ubuntu xenial  pipeline
############################
ci:ubuntu_xenial:
  stage: ci
  script:
eric pellegrini's avatar
eric pellegrini committed
60
    - docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_build .
61
  allow_failure: false
62
63
64
65
66
67
68
69
  tags:
    - docker
    - sci
    - ubuntu

deploy:ubuntu_xenial:
  stage: deploy
  script:
Remi Perenon's avatar
Remi Perenon committed
70
    - docker build --force-rm -t deploy_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_deploy .
71
    - chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
72
    - ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh xenial
73
74
  dependencies:
    - ci:ubuntu_xenial
75
76
  allow_failure: false
  only:
77
78
    - master
    - develop
79
80
    - /^release-.*$/
    - /^hotfix-.*$/
81
    - tags
82
    - web
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
  when: on_success
  artifacts:
    paths:
    - ./*.deb
  tags:
    - docker
    - sci
    - ubuntu

############################
# ubuntu bionic pipeline
############################
ci:ubuntu_bionic:
  stage: ci
  script:
eric pellegrini's avatar
eric pellegrini committed
98
    - docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_build .
99
100
101
102
103
104
105
106
107
  allow_failure: false
  tags:
    - docker
    - sci
    - ubuntu

deploy:ubuntu_bionic:
  stage: deploy
  script:
eric pellegrini's avatar
eric pellegrini committed
108
    - docker build --force-rm -t deploy_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_deploy .
109
    - chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
110
    - ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh bionic
111
112
113
114
115
  dependencies:
    - ci:ubuntu_bionic
  allow_failure: false
  only:
    - master
116
    - develop
117
118
    - /^release-.*$/
    - /^hotfix-.*$/
119
    - tags
120
    - web
121
  when: on_success
122
123
  artifacts:
    paths:
124
    - ${CI_PROJECT_DIR}/*.deb
125
  tags:
eric pellegrini's avatar
eric pellegrini committed
126
    - docker
127
128
    - sci
    - ubuntu
129

130
131
132
133
134
135
############################
# osx high sierra pipeline
############################
ci:osx:
  stage: ci
  script:
eric pellegrini's avatar
eric pellegrini committed
136
    - source ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/definitions.sh
137
    - source ${CI_PROJECT_DIR}/BuildServer/Unix/setup_ci.sh
138
139
140
141
142
    - ${CI_PROJECT_DIR}/BuildServer/Unix/build.sh
    - ${CI_PROJECT_DIR}/BuildServer/Unix/tests.sh
  allow_failure: false
  artifacts:
    paths:
143
    - ${CI_PROJECT_DIR}/build
144
    - ${CI_PROJECT_DIR}/temp
145
    expire_in: 1 hrs
146
147
148
149
150
151
152
  tags:
    - sci
    - osx-10.13

deploy:osx:
  stage: deploy
  script:
eric pellegrini's avatar
eric pellegrini committed
153
    - source ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/definitions.sh
154
    - source ${CI_PROJECT_DIR}/BuildServer/Unix/setup_ci.sh
eric pellegrini's avatar
eric pellegrini committed
155
    - ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/deploy.sh
156
157
158
159
160
161
  dependencies:
    - ci:osx
  allow_failure: false
  only:
    - master
    - develop
162
163
    - /^release-.*$/
    - /^hotfix-.*$/
164
    - tags
165
    - web
166
167
168
  when: on_success
  artifacts:
    paths:
169
     - ${CI_PROJECT_DIR}/*.dmg
170
171
172
173
174
175
176
177
178
179
180
  tags:
    - sci
    - osx-10.13

############################
# windows 10 pipeline
# "call" is mandatory, see https://gitlab.com/gitlab-org/gitlab-runner/issues/1051
############################
ci:windows:
  stage: ci
  script:
181
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\definitions.bat"
182
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\setup_ci.bat"
183
184
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\build.bat"
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\tests.bat"
185
186
187
  allow_failure: false
  artifacts:
    paths:
188
    - "%CI_PROJECT_DIR%\\BuildServer\\Windows\\Build"
Remi Perenon's avatar
Remi Perenon committed
189
    - "%CI_PROJECT_DIR%\\build"
190
    - "%CI_PROJECT_DIR%\\Extensions"
191
    expire_in: 1 hrs
192
193
194
195
196
197
198
  tags:
    - sci
    - windows-10

deploy:windows:
  stage: deploy
  script:
199
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\definitions.bat"
200
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\setup_ci.bat"
201
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\deploy.bat"
202
203
204
205
206
207
  dependencies:
    - ci:windows
  allow_failure: false
  only:
    - master
    - develop
208
209
    - /^release-.*$/
    - /^hotfix-.*$/
210
    - tags
211
    - web
212
213
214
  when: on_success
  artifacts:
    paths:
215
     - "%CI_PROJECT_DIR%\\*.exe"
216
217
218
219
  tags:
    - sci
    - windows-10

eric pellegrini's avatar
eric pellegrini committed
220
docker_logout:
eric pellegrini's avatar
eric pellegrini committed
221
  stage: docker_logout
222
223
  when: always
  script:
224
    - docker logout
225
226
227
228
229
  tags:
    - docker
    - sci
    - ubuntu