forked from DIRACGrid/DIRAC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
66 lines (62 loc) · 1.76 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
stages:
- build_images
- run_tests
build_compose_image:
stage: build_images
tags:
- docker-image-build
variables:
TO: ${CI_REGISTRY_IMAGE}/docker-compose:latest
DOCKER_FILE: tests/CI/Docker/docker-compose/Dockerfile
script: "echo" # unused but this line is required by GitLab CI
only:
- schedules
build_slc6-dirac_image:
stage: build_images
tags:
- docker-image-build
variables:
FROM: cern/slc6-base:latest
TO: ${CI_REGISTRY_IMAGE}/slc6-dirac:latest
# Reuse the CC7 Dockerfile with FROM and RUNIT_RPM changed
DOCKER_FILE: tests/CI/Docker/cc7-dirac/Dockerfile
BUILD_ARG: RUNIT_RPM=runit-2.1.2-1.el6.x86_64.rpm
script: "echo" # unused but this line is required by GitLab CI
only:
- schedules
build_cc7-dirac_image:
stage: build_images
tags:
- docker-image-build
variables:
TO: ${CI_REGISTRY_IMAGE}/cc7-dirac:latest
DOCKER_FILE: tests/CI/Docker/cc7-dirac/Dockerfile
script: "echo" # unused but this line is required by GitLab CI
only:
- schedules
test:
stage: run_tests
image: ${CI_REGISTRY_IMAGE}/docker-compose:latest
tags:
- docker-privileged
services:
- name: docker:18-dind
variables:
COMPOSE_HTTP_TIMEOUT: "360"
before_script:
- "echo ${CI_REGISTRY_PASSWORD} | docker login -u ${CI_REGISTRY_USER} ${CI_REGISTRY} --password-stdin"
# GitLab only clones the current reference but testing requires other branches
- git fetch --all
script:
- "bash tests/CI/run_docker_setup.sh"
after_script:
- "bash -c 'source tests/CI/utils.sh && getLogs'"
artifacts:
name: "logs_$CI_JOB_NAME"
paths:
- log_server_install.txt
- log_server_tests.txt
- log_client_install.txt
- log_client_tests.txt
expire_in: 1 week
when: always