.gitlab-ci.yml 5.51 KB
Newer Older
Jamie Hall's avatar
Jamie Hall committed
1
stages:
2
  - ci
3
  - deploy
4
  - clean
5

6
7
8
9
############################
# ubuntu trusty  pipeline
############################
ci:ubuntu_trusty:
10
11
  stage: ci
  script:
eric pellegrini's avatar
eric pellegrini committed
12
    - 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 .
13
14
15
16
17
18
19
20
21
  allow_failure: false
  tags:
    - docker
    - sci
    - ubuntu

deploy:ubuntu_trusty:
  stage: deploy
  script:
eric pellegrini's avatar
eric pellegrini committed
22
    - docker build --force-rm -t deploy_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_deploy .
23
    - chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
24
    - ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh trusty
25
26
  dependencies:
    - ci:ubuntu_trusty
27
28
  allow_failure: false
  only:
29
    - master
30
    - develop
31
32
    - /^release-.*$/
    - /^hotfix-.*$/
33
    - web
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  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
49
    - 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 .
50
  allow_failure: false
51
52
53
54
55
56
57
58
  tags:
    - docker
    - sci
    - ubuntu

deploy:ubuntu_xenial:
  stage: deploy
  script:
eric pellegrini's avatar
eric pellegrini committed
59
    - docker build --force-rm -t deploy_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_deploy .
60
    - chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
61
    - ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh xenial
62
63
  dependencies:
    - ci:ubuntu_xenial
64
65
  allow_failure: false
  only:
66
67
    - master
    - develop
68
69
    - /^release-.*$/
    - /^hotfix-.*$/
70
    - web
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
  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
86
    - 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 .
87
88
89
90
91
92
93
94
95
  allow_failure: false
  tags:
    - docker
    - sci
    - ubuntu

deploy:ubuntu_bionic:
  stage: deploy
  script:
eric pellegrini's avatar
eric pellegrini committed
96
    - docker build --force-rm -t deploy_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_deploy .
97
    - chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
98
    - ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh bionic
99
100
101
102
103
  dependencies:
    - ci:ubuntu_bionic
  allow_failure: false
  only:
    - master
104
    - develop
105
106
    - /^release-.*$/
    - /^hotfix-.*$/
107
    - web
108
  when: on_success
109
110
  artifacts:
    paths:
111
    - ${CI_PROJECT_DIR}/*.deb
112
  tags:
eric pellegrini's avatar
eric pellegrini committed
113
    - docker
114
115
    - sci
    - ubuntu
116

117
118
119
120
121
122
123
124
125
126
127
128
129
130
############################
# osx high sierra pipeline
############################
ci:osx:
  stage: ci
  script:
    - source ${CI_PROJECT_DIR}/BuildServer/Unix/definitions_macos.sh
    - source ${CI_PROJECT_DIR}/BuildServer/Unix/version.sh
    - ${CI_PROJECT_DIR}/BuildServer/Unix/build.sh
    - ${CI_PROJECT_DIR}/BuildServer/Unix/tests.sh
  allow_failure: false
  artifacts:
    paths:
    - ${CI_PROJECT_DIR}/BuildServer/Unix/Build_macOS
131
    expire_in: 1 hrs
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
  tags:
    - sci
    - osx-10.13

deploy:osx:
  stage: deploy
  script:
    - source ${CI_PROJECT_DIR}/BuildServer/Unix/definitions_macos.sh
    - source ${CI_PROJECT_DIR}/BuildServer/Unix/version.sh
    - ${CI_PROJECT_DIR}/BuildServer/Unix/deploy_macos.sh
  dependencies:
    - ci:osx
  allow_failure: false
  only:
    - master
    - develop
148
149
    - /^release-.*$/
    - /^hotfix-.*$/
150
    - web
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
  when: on_success
  artifacts:
    paths:
     - ${CI_PROJECT_DIR}/BuildServer/*.dmg
  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:
166
167
168
169
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\definitions.bat"
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\version.bat"
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\build.bat"
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\tests.bat"
170
171
172
  allow_failure: false
  artifacts:
    paths:
173
    - "%CI_PROJECT_DIR%\\BuildServer\\Windows\\Build"
174
    expire_in: 1 hrs
175
176
177
178
179
180
181
  tags:
    - sci
    - windows-10

deploy:windows:
  stage: deploy
  script:
182
183
184
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\definitions.bat"
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\version.bat"
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\deploy.bat"
185
186
187
188
189
190
  dependencies:
    - ci:windows
  allow_failure: false
  only:
    - master
    - develop
191
192
    - /^release-.*$/
    - /^hotfix-.*$/
193
    - web
194
195
196
  when: on_success
  artifacts:
    paths:
197
     - "%CI_PROJECT_DIR%\\BuildServer\\*.exe"
198
199
200
201
  tags:
    - sci
    - windows-10

Remi Perenon's avatar
Remi Perenon committed
202
clean:docker:
203
204
205
  stage: clean
  when: always
  script:
Remi Perenon's avatar
Remi Perenon committed
206
    - chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/clean.sh
207
    - ${CI_PROJECT_DIR}/BuildServer/Docker/clean.sh
208
209
210
211
212
  tags:
    - docker
    - sci
    - ubuntu

Remi Perenon's avatar
Remi Perenon committed
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
clean:osx:
  stage: clean
  when: always
  script:
    - source ${CI_PROJECT_DIR}/BuildServer/Unix/definitions_macos.sh
    - ${CI_PROJECT_DIR}/BuildServer/Unix/clean.sh
  tags:
    - sci
    - osx-10.13
    
clean:windows:
  stage: clean
  when: always
  script:
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\definitions.bat"
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\clean.bat"
  tags:
    - sci
    - windows-10