If you are using GitLab outside of the ILL, then you will need to use HTTPS and not SSH for clone/push/pull operations. If you are using the VPN, then SSH will work normally.

.gitlab-ci.yml 5.39 KB
Newer Older
Jamie Hall's avatar
Jamie Hall committed
1
stages:
2
  - docker_login
3
  - ci
4
  - deploy
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:
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:
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
    - /^build-.*$/
44
    - tags
45
    - web
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
  when: on_success
  artifacts:
    paths:
    - ./*.deb
  tags:
    - docker
    - sci
    - ubuntu

############################
# ubuntu xenial  pipeline
############################
ci:ubuntu_xenial:
  stage: ci
  script:
61
    - 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 .
62
  allow_failure: false
63 64 65 66 67 68 69 70
  tags:
    - docker
    - sci
    - ubuntu

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

############################
# ubuntu bionic pipeline
############################
ci:ubuntu_bionic:
  stage: ci
  script:
100
    - 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 .
101 102 103 104 105 106 107 108 109
  allow_failure: false
  tags:
    - docker
    - sci
    - ubuntu

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

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

deploy:osx:
  stage: deploy
  script:
156
    - source ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/definitions.sh
157
    - source ${CI_PROJECT_DIR}/BuildServer/Unix/setup_ci.sh
158
    - ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/deploy.sh
159 160 161 162 163 164
  dependencies:
    - ci:osx
  allow_failure: false
  only:
    - master
    - develop
165 166
    - /^release-.*$/
    - /^hotfix-.*$/
167
    - /^build-.*$/
168
    - tags
169
    - web
170 171 172
  when: on_success
  artifacts:
    paths:
173
     - ${CI_PROJECT_DIR}/*.dmg
174 175 176 177 178 179 180 181 182 183 184
  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:
185
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\definitions.bat"
186
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\setup_ci.bat"
187 188
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\build.bat"
    - call "%CI_PROJECT_DIR%\\BuildServer\\Windows\\tests.bat"
189 190 191
  allow_failure: false
  artifacts:
    paths:
192
    - "%CI_PROJECT_DIR%\\BuildServer\\Windows\\Build"
Remi Perenon's avatar
Remi Perenon committed
193
    - "%CI_PROJECT_DIR%\\build"
194
    - "%CI_PROJECT_DIR%\\Extensions"
195
    expire_in: 1 hrs
196 197 198 199 200 201 202
  tags:
    - sci
    - windows-10

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

225
docker_logout:
226
  stage: docker_logout
227 228
  when: always
  script:
229
    - docker logout
230 231 232 233 234
  tags:
    - docker
    - sci
    - ubuntu