.gitlab-ci.yml: print out /etc/os-release
[garming/samba-autobuild/.git] / .gitlab-ci.yml
1 # see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
2
3
4 variables:
5   # we run autobuild.py inside a samba CI docker image located on gitlab's registry
6   SAMBA_CI_CONTAINER_REGISTRY: registry.gitlab.com
7   SAMBA_CI_CONTAINER_NAME: samba-team/samba
8   SAMBA_CI_CONTAINER_TAG: latest
9   SAMBA_CI_CONTAINER_IMAGE: $SAMBA_CI_CONTAINER_REGISTRY/$SAMBA_CI_CONTAINER_NAME:$SAMBA_CI_CONTAINER_TAG
10   GIT_STRATEGY: fetch
11   GIT_DEPTH: "3"
12
13 .shared_template:
14   image: $SAMBA_CI_CONTAINER_IMAGE
15   stage: build
16   tags:
17     - docker
18     - shared
19   before_script:
20     - uname -a
21     - lsb_release -a
22     - cat /etc/os-release
23     - mount
24     - df -h
25     - free -h
26   artifacts:
27     expire_in: 1 week
28     when: on_failure
29     paths:
30       - "*.stdout"
31       - "*.stderr"
32       - system-info.txt
33       - /tmp/samba-testbase/*/*/bin/config.log
34   retry:
35     max: 2
36     when:
37       - runner_system_failure
38       - stuck_or_timeout_failure
39   script:
40     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
41     # autobuild name, which means we can define a default template that runs most autobuild jobs
42     - echo "Running cmd script/autobuild.py $CI_JOB_NAME --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase"
43     - script/autobuild.py $CI_JOB_NAME    --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
44
45 others:
46   extends: .shared_template
47   script:
48     - script/autobuild.py ldb              --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
49     - script/autobuild.py pidl             --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
50     - script/autobuild.py replace          --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
51     - script/autobuild.py talloc           --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
52     - script/autobuild.py tdb              --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
53     - script/autobuild.py tevent           --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
54
55 samba:
56   extends: .shared_template
57
58 samba-none-env:
59   extends: .shared_template
60   # this one takes about 1 hours to finish
61
62 samba-nopython:
63   extends: .shared_template
64
65 samba-nopython-py2:
66   extends: .shared_template
67
68 samba-systemkrb5:
69   extends: .shared_template
70
71 samba-xc:
72   extends: .shared_template
73
74 samba-o3:
75   extends: .shared_template
76
77 samba-ad-member:
78   extends: .shared_template
79
80 samba-ad-dc-2:
81   extends: .shared_template
82
83 samba-ad-dc-3:
84   extends: .shared_template
85
86 samba-ad-dc-4:
87   extends: .shared_template
88
89 samba-ad-dc-5:
90   extends: .shared_template
91
92 samba-ad-dc-6:
93   extends: .shared_template
94
95 samba-schemaupgrade:
96   extends: .shared_template
97
98 samba-ad-dc-backup:
99   extends: .shared_template
100
101 samba-libs:
102   extends: .shared_template
103
104 samba-static:
105   extends: .shared_template
106
107 ctdb:
108   extends: .shared_template
109
110 samba-ctdb:
111   extends: .shared_template
112
113 samba-ad-dc-ntvfs:
114   extends: .shared_template
115   # this one takes about 100 mins to finish
116
117
118 .private_template:
119   extends: .shared_template
120   tags:
121     - docker
122     - private
123   only:
124     variables:
125       # These jobs are only run if the gitlab repo has private runners available.
126       # To enable private jobs, you must add the following var and value to
127       # your gitlab repo by navigating to:
128       # settings -> CI/CD -> Environment variables
129       - $SUPPORT_PRIVATE_TEST == "yes"
130
131 samba-fileserver:
132   extends: .private_template
133   # this one takes about 1 hours to finish
134
135 samba-ad-dc-1:
136   extends: .private_template
137
138 samba-nt4:
139   extends: .private_template