.gitlab-ci.yml: print out /proc/swaps
[metze/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     - cat /proc/swaps
26     - free -h
27   artifacts:
28     expire_in: 1 week
29     when: on_failure
30     paths:
31       - "*.stdout"
32       - "*.stderr"
33       - system-info.txt
34       - /tmp/samba-testbase/*/*/bin/config.log
35   retry:
36     max: 2
37     when:
38       - runner_system_failure
39       - stuck_or_timeout_failure
40   script:
41     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
42     # autobuild name, which means we can define a default template that runs most autobuild jobs
43     - echo "Running cmd script/autobuild.py $CI_JOB_NAME --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase"
44     - script/autobuild.py $CI_JOB_NAME    --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
45
46 others:
47   extends: .shared_template
48   script:
49     - script/autobuild.py ldb              --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
50     - script/autobuild.py pidl             --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
51     - script/autobuild.py replace          --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
52     - script/autobuild.py talloc           --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
53     - script/autobuild.py tdb              --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
54     - script/autobuild.py tevent           --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
55
56 samba:
57   extends: .shared_template
58
59 samba-none-env:
60   extends: .shared_template
61   # this one takes about 1 hours to finish
62
63 samba-nopython:
64   extends: .shared_template
65
66 samba-nopython-py2:
67   extends: .shared_template
68
69 samba-systemkrb5:
70   extends: .shared_template
71
72 samba-xc:
73   extends: .shared_template
74
75 samba-o3:
76   extends: .shared_template
77
78 samba-ad-member:
79   extends: .shared_template
80
81 samba-ad-dc-2:
82   extends: .shared_template
83
84 samba-ad-dc-3:
85   extends: .shared_template
86
87 samba-ad-dc-4:
88   extends: .shared_template
89
90 samba-ad-dc-5:
91   extends: .shared_template
92
93 samba-ad-dc-6:
94   extends: .shared_template
95
96 samba-schemaupgrade:
97   extends: .shared_template
98
99 samba-ad-dc-backup:
100   extends: .shared_template
101
102 samba-libs:
103   extends: .shared_template
104
105 samba-static:
106   extends: .shared_template
107
108 ctdb:
109   extends: .shared_template
110
111 samba-ctdb:
112   extends: .shared_template
113
114 samba-ad-dc-ntvfs:
115   extends: .shared_template
116   # this one takes about 100 mins to finish
117
118
119 .private_template:
120   extends: .shared_template
121   tags:
122     - docker
123     - private
124   only:
125     variables:
126       # These jobs are only run if the gitlab repo has private runners available.
127       # To enable private jobs, you must add the following var and value to
128       # your gitlab repo by navigating to:
129       # settings -> CI/CD -> Environment variables
130       - $SUPPORT_PRIVATE_TEST == "yes"
131
132 samba-fileserver:
133   extends: .private_template
134   # this one takes about 1 hours to finish
135
136 samba-ad-dc-1:
137   extends: .private_template
138
139 samba-nt4:
140   extends: .private_template