.gitlab-ci.yml: add retries on runner_system_failure/stuck_or_timeout_failure
[mdw/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   SAMBA_BUILD_IMAGES_PROJECT: samba-team/samba
6   SAMBA_BUILD: latest
7   GIT_STRATEGY: fetch
8   GIT_DEPTH: "3"
9
10 .shared_template:
11   image: $CI_REGISTRY/$SAMBA_BUILD_IMAGES_PROJECT:$SAMBA_BUILD
12   stage: build
13   tags:
14     - docker
15     - shared
16   before_script:
17     - uname -a
18     - lsb_release -a
19     - echo "Build starting (preparing swap)..."
20     - if [ $(df -m / --output=avail | tail -n1) -gt 10240 ]; then
21         sudo dd if=/dev/zero of=/samba-swap bs=1M count=6144;
22         sudo mkswap /samba-swap;
23         sudo swapon /samba-swap;
24       fi
25     - mount
26     - df -h
27     - free -h
28   artifacts:
29     expire_in: 1 week
30     when: on_failure
31     paths:
32       - "*.stdout"
33       - "*.stderr"
34       - system-info.txt
35       - /tmp/samba-testbase/*/*/bin/config.log
36   retry:
37     max: 2
38     when:
39       - runner_system_failure
40       - stuck_or_timeout_failure
41
42 samba_none_env:
43   extends: .shared_template
44   script:
45     # this one takes about 1 hours to finish
46     - script/autobuild.py samba-none-env    --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
47
48 samba_none_env_py2:
49   extends: .shared_template
50   script:
51     # this one takes about 1 hours to finish
52     - script/autobuild.py samba-none-env-py2    --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
53
54 samba_nopython:
55   extends: .shared_template
56   script:
57     - script/autobuild.py samba-nopython   --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
58
59 samba_systemkrb5:
60   extends: .shared_template
61   script:
62     - script/autobuild.py samba-systemkrb5 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
63
64 samba_xc:
65   extends: .shared_template
66   script:
67     - script/autobuild.py samba-xc         --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
68
69 samba_o3:
70   extends: .shared_template
71   script:
72     - script/autobuild.py samba-o3         --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
73
74 samba_ad_dc_2:
75   extends: .shared_template
76   script:
77     # this one takes about 1 hours to finish
78     - script/autobuild.py samba-ad-dc-2     --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
79
80 samba_ad_dc_backup:
81   extends: .shared_template
82   script:
83     - script/autobuild.py samba-ad-dc-backup    --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
84
85 samba_ad_dc_2_py2:
86   extends: .shared_template
87   script:
88     # this one takes about 1 hours to finish
89     - script/autobuild.py samba-ad-dc-2-py2     --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
90
91 samba_libs:
92   extends: .shared_template
93   script:
94     - script/autobuild.py samba-libs       --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
95
96 samba_libs_py2:
97   extends: .shared_template
98   script:
99     - script/autobuild.py samba-libs-py2       --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
100
101 samba_static:
102   extends: .shared_template
103   script:
104     - script/autobuild.py samba-static     --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
105
106 ctdb:
107   extends: .shared_template
108   script:
109     - script/autobuild.py ctdb       --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
110
111 samba_ctdb:
112   extends: .shared_template
113   script:
114     - script/autobuild.py samba-ctdb             --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
115
116 others:
117   extends: .shared_template
118   script:
119     - script/autobuild.py ldb              --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
120     - script/autobuild.py pidl             --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
121     - script/autobuild.py replace          --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
122     - script/autobuild.py talloc           --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
123     - script/autobuild.py tdb              --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
124     - script/autobuild.py tevent           --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
125
126 samba_buildpy2_only:
127   extends: .shared_template
128   script:
129     - python script/autobuild.py samba-buildpy2-only             --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
130
131 samba_ad_dc_ntvfs:
132   extends: .shared_template
133   script:
134     # this one takes about 100 mins to finish
135     - script/autobuild.py samba-ad-dc-ntvfs --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
136
137 samba_ad_dc_ntvfs_py2:
138   extends: .shared_template
139   script:
140     - script/autobuild.py samba-ad-dc-ntvfs-py2 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase