~armagetronad-dev/armagetronad/0.4-armagetronad

« back to all changes in this revision

Viewing changes to .gitlab-ci.yml

  • Committer: Manuel Moos
  • Date: 2021-01-23 11:57:18 UTC
  • mfrom: (1452.4.204 master)
  • Revision ID: z-man@users.sf.net-20210123115718-fszew82jbkr6totz
Merge from legacy_0.2.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
  # https://docs.gitlab.com/ee/ci/docker/using_docker_build.html
5
5
  #DOCKER_TLS_CERTDIR: "/certs"
6
6
  #DOCKER_HOST: ""
 
7
  HAS_ARMADEPLOY: "false"
7
8
 
8
9
services:
9
10
  # required for shared runners, does not hurt for our runner (just some diagnostic complaints)
249
250
  tags:
250
251
   - armagetronad_deploy
251
252
  rules:
 
253
  - if: $HAS_ARMADEPLOY != "true"
 
254
    when: never
252
255
  - if: $CI_MERGE_REQUEST_ID
253
256
    when: never
254
257
  - if: $CI_COMMIT_REF_PROTECTED == "true"
271
274
  rules:
272
275
  - if: $CI_MERGE_REQUEST_ID
273
276
    when: never
274
 
  - if: '$CI_COMMIT_REF_PROTECTED == "false"'
 
277
  - if: $CI_COMMIT_REF_PROTECTED == "false"
275
278
    when: never
276
279
  - if: '$CI_COMMIT_REF_PROTECTED == "true" && $CI_COMMIT_TAG'
277
280
    when: manual
291
294
  tags:
292
295
   - armagetronad_deploy
293
296
  rules:
294
 
   - if: $CI_MERGE_REQUEST_ID
295
 
     when: never
296
 
   - if: '$CI_COMMIT_REF_PROTECTED == "true"'
297
 
     when: on_success
298
 
   - when: never
 
297
  - if: $HAS_ARMADEPLOY != "true"
 
298
    when: never
 
299
  - if: $CI_MERGE_REQUEST_ID
 
300
    when: never
 
301
  - if: $CI_COMMIT_REF_PROTECTED == "true"
 
302
    when: on_success
 
303
  - when: never
299
304
  before_script:
300
305
    - ./docker/scripts/fix_gits.sh || exit $?
301
306
    - ./docker/deploy/prepare_deploy.sh || exit $?
302
307
  script:
 
308
    # test whether we're current
303
309
    - docker/scripts/obsolete.sh || exit 0
304
310
 
305
311
    # build
332
338
  rules:
333
339
   - if: $CI_MERGE_REQUEST_ID
334
340
     when: never
335
 
   - if: '$CI_COMMIT_REF_PROTECTED == "true"'
 
341
   - if: $CI_COMMIT_REF_PROTECTED == "true"
336
342
     when: on_success
337
343
   - when: never
338
344
  after_script:
352
358
  rules:
353
359
   - if: $CI_MERGE_REQUEST_ID
354
360
     when: never
355
 
   - if: '$CI_COMMIT_REF_PROTECTED == "true"'
 
361
   - if: $CI_COMMIT_REF_PROTECTED == "true"
356
362
     when: on_success
357
363
   - when: never
358
364
  after_script:
365
371
    - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY 2>&1 | grep -v WARNING\|credential || exit $?
366
372
    - make -C gitlab_build/docker/build unstaged_deploy_docker.tag || exit $?
367
373
 
 
374
# deploy build to Gitlab
 
375
deploy_gitlab:
 
376
  stage: deploy
 
377
  dependencies:
 
378
   - build_prepare
 
379
   - build_collect
 
380
  rules:
 
381
   - if: $CI_MERGE_REQUEST_ID
 
382
     when: never
 
383
   - if: $CI_COMMIT_REF_PROTECTED == "true"
 
384
     when: on_success
 
385
   - when: never
 
386
  script:
 
387
    # test whether we're current
 
388
    - docker/scripts/obsolete.sh || exit 0
 
389
 
 
390
    # deploy
 
391
    - make -C gitlab_build/docker/build unstaged_deploy_gitlab || exit $?
 
392
 
368
393
# post-build tests
369
394
post_test:
370
395
  stage: build_collect