pyldb: avoid segfault when adding an element with no name
[sfrench/samba-autobuild/.git] / .gitlab-ci.yml
1 # see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
2
3 stages:
4   - images
5   - build
6
7 variables:
8   GIT_STRATEGY: fetch
9   GIT_DEPTH: "3"
10   #
11   # we run autobuild.py inside a samba CI docker image located on gitlab's registry
12   # overwrite this variable if you want use your own image registry.
13   #
14   # Or better ask for access to the shared development repository, see
15   # https://wiki.samba.org/index.php/Samba_CI_on_gitlab#Getting_Access
16   #
17   SAMBA_CI_CONTAINER_REGISTRY: registry.gitlab.com/samba-team/devel/samba
18   #
19   # Set this to the contents of bootstrap/sha1sum.txt
20   # which is generated by bootstrap/template.py --render
21   #
22   SAMBA_CI_CONTAINER_TAG: 8606e89b0ce6a916fa881549a6cebf6eed528157
23   #
24   # The following images are available
25   # Please see the samba-o3 sections at the end of this file!
26   # We should run that for each available image
27   #
28   SAMBA_CI_CONTAINER_IMAGE_ubuntu1804: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1804:${SAMBA_CI_CONTAINER_TAG}
29   SAMBA_CI_CONTAINER_IMAGE_ubuntu1604: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1604:${SAMBA_CI_CONTAINER_TAG}
30   SAMBA_CI_CONTAINER_IMAGE_ubuntu1404: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1404:${SAMBA_CI_CONTAINER_TAG}
31   SAMBA_CI_CONTAINER_IMAGE_debian9: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-debian9:${SAMBA_CI_CONTAINER_TAG}
32   SAMBA_CI_CONTAINER_IMAGE_opensuse150: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-opensuse150:${SAMBA_CI_CONTAINER_TAG}
33
34 include:
35   # The image creation details are specified in a separate file
36   # See bootstrap/README.md for details
37   - 'bootstrap/.gitlab-ci.yml'
38
39 .shared_template:
40   variables:
41     AUTOBUILD_JOB_NAME: $CI_JOB_NAME
42   # We use the ubuntu1404 image as default as
43   # it matches what we have on sn-devel-144.
44   image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1404
45   stage: build
46   tags:
47     - docker
48     - shared
49   before_script:
50     - uname -a
51     - lsb_release -a
52     - cat /etc/os-release
53     - mount
54     - df -h
55     - cat /proc/swaps
56     - free -h
57       # See bootstrap/.gitlab-ci.yml how to generate a new image
58     - echo "SAMBA_CI_CONTAINER_REGISTRY[${SAMBA_CI_CONTAINER_REGISTRY}]"
59     - echo "SAMBA_CI_CONTAINER_TAG[${SAMBA_CI_CONTAINER_TAG}]"
60     - bootstrap/template.py --sha1sum > /tmp/sha1sum-template.txt
61     - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-template.txt
62     - echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt
63     - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt
64     - diff -u bootstrap/sha1sum.txt /sha1sum.txt
65   after_script:
66     - mount
67     - df -h
68     - cat /proc/swaps
69     - free -h
70   artifacts:
71     expire_in: 1 week
72     when: on_failure
73     paths:
74       - "*.stdout"
75       - "*.stderr"
76       - system-info.txt
77       - /tmp/samba-testbase/*/*/bin/config.log
78   retry:
79     max: 2
80     when:
81       - runner_system_failure
82       - stuck_or_timeout_failure
83   script:
84     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
85     # autobuild name, which means we can define a default template that runs most autobuild jobs
86     - echo "Running cmd script/autobuild.py $AUTOBUILD_JOB_NAME --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase"
87     - script/autobuild.py $AUTOBUILD_JOB_NAME    --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
88
89 others:
90   extends: .shared_template
91   script:
92     - script/autobuild.py ldb              --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
93     - script/autobuild.py pidl             --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
94     - script/autobuild.py replace          --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
95     - script/autobuild.py talloc           --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
96     - script/autobuild.py tdb              --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
97     - script/autobuild.py tevent           --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
98
99 samba:
100   extends: .shared_template
101
102 samba-none-env:
103   extends: .shared_template
104
105 samba-nopython:
106   extends: .shared_template
107
108 samba-nopython-py2:
109   extends: .shared_template
110
111 samba-systemkrb5:
112   extends: .shared_template
113
114 samba-xc:
115   extends: .shared_template
116
117 samba-ad-member:
118   extends: .shared_template
119
120 samba-ad-dc-2:
121   extends: .shared_template
122
123 samba-ad-dc-3:
124   extends: .shared_template
125
126 samba-ad-dc-4:
127   extends: .shared_template
128
129 samba-ad-dc-5:
130   extends: .shared_template
131
132 samba-ad-dc-6:
133   extends: .shared_template
134
135 samba-ad-dc-backup:
136   extends: .shared_template
137
138 samba-libs:
139   extends: .shared_template
140
141 samba-static:
142   extends: .shared_template
143
144 ctdb:
145   extends: .shared_template
146
147 samba-ctdb:
148   extends: .shared_template
149
150 samba-ad-dc-ntvfs:
151   extends: .shared_template
152
153 .private_template:
154   extends: .shared_template
155   tags:
156     - docker
157     - private
158     - samba-ci-private
159   only:
160     variables:
161       # These jobs are only run if the gitlab repo has private runners available.
162       # To enable private jobs, you must add the following var and value to
163       # your gitlab repo by navigating to:
164       # settings -> CI/CD -> Environment variables
165       - $SUPPORT_PRIVATE_TEST == "yes"
166
167 samba-fileserver:
168   extends: .private_template
169
170 samba-ad-dc-1:
171   extends: .private_template
172
173 samba-nt4:
174   extends: .private_template
175
176 samba-schemaupgrade:
177   extends: .private_template
178
179 #
180 # We build samba-o3 on all supported distributions
181 #
182
183 .samba-o3-template:
184   extends: .shared_template
185   variables:
186     AUTOBUILD_JOB_NAME: samba-o3
187
188 ubuntu1804-samba-o3:
189   extends: .samba-o3-template
190   image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1804
191
192 ubuntu1604-samba-o3:
193   extends: .samba-o3-template
194   image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1604
195
196 ubuntu1404-samba-o3:
197   extends: .samba-o3-template
198   image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1404
199
200 debian9-samba-o3:
201   extends: .samba-o3-template
202   image: $SAMBA_CI_CONTAINER_IMAGE_debian9
203
204 opensuse150-samba-o3:
205   extends: .samba-o3-template
206   image: $SAMBA_CI_CONTAINER_IMAGE_opensuse150
207
208 #
209 # Keep the samba-o3 sections at the end ...
210 #