xci: Introduce XCI_LOOP variable to control what to do properly
[releng.git] / jjb / xci / bifrost-verify-jobs.yml
1 - project:
2     name: 'openstack-bifrost-verify'
3 #--------------------------------
4 # branches
5 #--------------------------------
6     stream:
7         - master:
8             branch: '{stream}'
9 #--------------------------------
10 # projects
11 #--------------------------------
12     project:
13         - 'openstack':
14             project-repo: 'https://git.openstack.org/openstack/bifrost'
15             clone-location: '/opt/bifrost'
16         - 'opnfv':
17             project-repo: 'https://gerrit.opnfv.org/gerrit/releng'
18             clone-location: '/opt/releng'
19 #--------------------------------
20 # distros
21 #--------------------------------
22     distro:
23         - 'trusty':
24             disabled: false
25             dib-os-release: 'trusty'
26             dib-os-element: 'ubuntu-minimal'
27             dib-os-packages: 'vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl'
28             extra-dib-elements: 'openssh-server'
29         - 'centos7':
30             disabled: false
31             dib-os-release: '7'
32             dib-os-element: 'centos7'
33             dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
34             extra-dib-elements: 'openssh-server'
35         - 'suse':
36             disabled: false
37             dib-os-release: '42.2'
38             dib-os-element: 'opensuse-minimal'
39             dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl'
40             extra-dib-elements: 'openssh-server'
41 #--------------------------------
42 # type
43 #--------------------------------
44     type:
45         - virtual
46 #--------------------------------
47 # jobs
48 #--------------------------------
49     jobs:
50         - '{project}-bifrost-verify-{distro}-{type}-{stream}'
51
52 #--------------------------------
53 # VM defaults
54 #--------------------------------
55 - defaults:
56     name: verify_vm_defaults
57     test-vm-num-nodes: '3'
58     test-vm-node-names: 'opnfv controller00 compute00'
59     vm-domain-type: 'kvm'
60     vm-cpu: '2'
61     vm-disk: '30'
62     vm-memory-size: '4096'
63     vm-disk-cache: 'unsafe'
64
65 #--------------------------------
66 # job templates
67 #--------------------------------
68 - job-template:
69     name: '{project}-bifrost-verify-{distro}-{type}-{stream}'
70
71     disabled: '{obj:disabled}'
72
73     defaults: verify_vm_defaults
74
75     concurrent: false
76
77     properties:
78         - logrotate-default
79         - build-blocker:
80             use-build-blocker: true
81             blocking-jobs:
82                 - '.*-bifrost-verify.*-{type}'
83             block-level: 'NODE'
84
85     parameters:
86         - string:
87             name: PROJECT
88             default: '{project}'
89         - string:
90             name: PROJECT_REPO
91             default: '{project-repo}'
92         - string:
93             name: CLONE_LOCATION
94             default: '{clone-location}'
95         - string:
96             name: DISTRO
97             default: '{distro}'
98         - string:
99             name: DIB_OS_RELEASE
100             default: '{dib-os-release}'
101         - string:
102             name: DIB_OS_ELEMENT
103             default: '{dib-os-element}'
104         - string:
105             name: EXTRA_DIB_ELEMENTS
106             default: '{extra-dib-elements}'
107         - string:
108             name: DIB_OS_PACKAGES
109             default: '{dib-os-packages}'
110         - string:
111             name: TEST_VM_NUM_NODES
112             default: '{test-vm-num-nodes}'
113         - string:
114             name: TEST_VM_NODE_NAMES
115             default: '{test-vm-node-names}'
116         - string:
117             name: VM_DOMAIN_TYPE
118             default: '{vm-domain-type}'
119         - string:
120             name: VM_CPU
121             default: '{vm-cpu}'
122         - string:
123             name: VM_DISK
124             default: '{vm-disk}'
125         - string:
126             name: VM_MEMORY_SIZE
127             default: '{vm-memory-size}'
128         - string:
129             name: VM_DISK_CACHE
130             default: '{vm-disk-cache}'
131         - string:
132             name: CLEAN_DIB_IMAGES
133             default: 'true'
134         - label:
135             name: SLAVE_LABEL
136             default: 'infra-{type}-{distro}'
137         - string:
138             name: BIFROST_LOG_URL
139             default: 'http://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER/$JOB_NAME'
140         - string:
141             name: ANSIBLE_VERBOSITY
142             default: '-vvvv'
143         - string:
144             name: XCI_LOOP
145             default: 'verify'
146
147     scm:
148         - git:
149             url: '$PROJECT_REPO'
150             refspec: '$GERRIT_REFSPEC'
151             branches:
152                 - 'origin/$BRANCH'
153             skip-tag: true
154             choosing-strategy: 'gerrit'
155             timeout: 10
156             wipe-workspace: true
157
158     triggers:
159         - '{project}-gerrit-trigger':
160             branch: '{branch}'
161
162     builders:
163         - bifrost-set-name
164         - bifrost-build
165
166     wrappers:
167         - fix-workspace-permissions
168
169     publishers:
170         - email:
171             recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com
172 #--------------------------------
173 # trigger macros
174 #--------------------------------
175 - trigger:
176     name: 'openstack-gerrit-trigger'
177     triggers:
178         - gerrit:
179             server-name: 'review.openstack.org'
180             escape-quotes: true
181             trigger-on:
182                 - patchset-created-event:
183                     exclude-drafts: 'false'
184                     exclude-trivial-rebase: 'false'
185                     exclude-no-code-change: 'false'
186                 - comment-added-contains-event:
187                     comment-contains-value: 'recheck'
188             custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html'
189             silent-start: true
190             projects:
191               - project-compare-type: 'PLAIN'
192                 project-pattern: 'openstack/bifrost'
193                 branches:
194                   - branch-compare-type: 'ANT'
195                     branch-pattern: '**/{branch}'
196                 disable-strict-forbidden-file-verification: 'true'
197                 forbidden-file-paths:
198                   - compare-type: ANT
199                     pattern: 'doc/**'
200                   - compare-type: ANT
201                     pattern: 'releasenotes/**'
202                 disable-strict-forbidden-file-verification: 'true'
203             readable-message: true
204 - trigger:
205     name: 'opnfv-gerrit-trigger'
206     triggers:
207         - gerrit:
208             server-name: 'gerrit.opnfv.org'
209             trigger-on:
210                 - patchset-created-event:
211                     exclude-drafts: 'false'
212                     exclude-trivial-rebase: 'false'
213                     exclude-no-code-change: 'false'
214                 - draft-published-event
215                 - comment-added-contains-event:
216                     comment-contains-value: 'recheck'
217                 - comment-added-contains-event:
218                     comment-contains-value: 'reverify'
219             custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html'
220             projects:
221               - project-compare-type: 'ANT'
222                 project-pattern: 'releng'
223                 branches:
224                   - branch-compare-type: 'ANT'
225                     branch-pattern: '**/{branch}'
226                 file-paths:
227                   - compare-type: ANT
228                     pattern: 'prototypes/bifrost/**'
229             readable-message: true
230
231 #---------------------------
232 # builder macros
233 #---------------------------
234 - builder:
235     name: bifrost-set-name
236     builders:
237         - description-setter:
238             description: "Built on $NODE_NAME"
239
240 - builder:
241     name: bifrost-build
242     builders:
243         - shell:
244             !include-raw: ./bifrost-verify.sh