b39f7864257e779f9e73928f6bec56af11ab8dbb
[metze/samba/wip.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_GITLAB_CI_REGISTRY: registry.gitlab.com
6   SAMBA_BUILD_IMAGES_PROJECT: samba-team/samba
7   SAMBA_BUILD: latest
8   GIT_STRATEGY: fetch
9   GIT_DEPTH: "3"
10
11 .shared_template:
12   image: $SAMBA_BUILD_GITLAB_CI_REGISTRY/$SAMBA_BUILD_IMAGES_PROJECT:$SAMBA_BUILD
13   stage: build
14   tags:
15     - docker
16     - shared
17   before_script:
18     - uname -a
19     - lsb_release -a
20     - echo "Build starting (preparing swap)..."
21     - if [ $(df -m / --output=avail | tail -n1) -gt 10240 ]; then
22         sudo dd if=/dev/zero of=/samba-swap bs=1M count=6144;
23         sudo mkswap /samba-swap;
24         sudo swapon /samba-swap;
25       fi
26     - mount
27     - df -h
28     - free -h
29   artifacts:
30     expire_in: 1 week
31     when: on_failure
32     paths:
33       - "*.stdout"
34       - "*.stderr"
35       - system-info.txt
36       - /tmp/samba-testbase/*/*/bin/config.log
37   retry:
38     max: 2
39     when:
40       - runner_system_failure
41       - stuck_or_timeout_failure
42   script:
43     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
44     # autobuild name, which means we can define a default template that runs most autobuild jobs
45     - echo "Running cmd script/autobuild.py $CI_JOB_NAME --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase"
46     - script/autobuild.py $CI_JOB_NAME    --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
47
48 others:
49   extends: .shared_template
50   script:
51     - script/autobuild.py ldb              --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
52     - script/autobuild.py pidl             --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
53     - script/autobuild.py replace          --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
54     - script/autobuild.py talloc           --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
55     - script/autobuild.py tdb              --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
56     - script/autobuild.py tevent           --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
57
58 samba-none-env:
59   extends: .shared_template
60   # this one takes about 1 hours to finish
61
62 samba-none-env-py2:
63   extends: .shared_template
64   # this one takes about 1 hours to finish
65
66 samba-nopython:
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-dc-2:
79   extends: .shared_template
80   # this one takes about 1 hours to finish
81
82 samba-ad-dc-backup:
83   extends: .shared_template
84
85 samba-ad-dc-2-py2:
86   extends: .shared_template
87   # this one takes about 1 hours to finish
88
89 samba-libs:
90   extends: .shared_template
91
92 samba-libs-py2:
93   extends: .shared_template
94
95 samba-static:
96   extends: .shared_template
97
98 ctdb:
99   extends: .shared_template
100
101 samba-ctdb:
102   extends: .shared_template
103
104 samba-buildpy2-only:
105   extends: .shared_template
106
107 samba-ad-dc-ntvfs:
108   extends: .shared_template
109   # this one takes about 100 mins to finish
110
111 samba-ad-dc-ntvfs-py2:
112   extends: .shared_template