Merge "jjb: infra: bifrost-verify.sh: Replace 'exit' with 'return'"
[releng.git] / jjb / infra / 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             vm-disk: '30'
42             vm-memory: '4096'
43             vm-cpu: '2'
44 #--------------------------------
45 # type
46 #--------------------------------
47     type:
48         - virtual
49 #--------------------------------
50 # jobs
51 #--------------------------------
52     jobs:
53         - '{project}-bifrost-verify-{distro}-{type}-{stream}'
54
55 #--------------------------------
56 # VM defaults
57 #--------------------------------
58 - defaults:
59     name: vm_defaults
60     vm-disk: '100'
61     vm-memory: '8192'
62     vm-cpu: '4'
63
64 #--------------------------------
65 # job templates
66 #--------------------------------
67 - job-template:
68     name: '{project}-bifrost-verify-{distro}-{type}-{stream}'
69
70     disabled: '{obj:disabled}'
71
72     defaults: vm_defaults
73
74     concurrent: false
75
76     properties:
77         - logrotate-default
78         - build-blocker:
79             use-build-blocker: true
80             blocking-jobs:
81                 - '.*-bifrost-verify.*-{type}'
82             block-level: 'NODE'
83
84     parameters:
85         - string:
86             name: PROJECT
87             default: '{project}'
88         - string:
89             name: PROJECT_REPO
90             default: '{project-repo}'
91         - string:
92             name: CLONE_LOCATION
93             default: '{clone-location}'
94         - string:
95             name: DISTRO
96             default: '{distro}'
97         - string:
98             name: DIB_OS_RELEASE
99             default: '{dib-os-release}'
100         - string:
101             name: DIB_OS_ELEMENT
102             default: '{dib-os-element}'
103         - string:
104             name: EXTRA_DIB_ELEMENTS
105             default: '{extra-dib-elements}'
106         - string:
107             name: DIB_OS_PACKAGES
108             default: '{dib-os-packages}'
109         - string:
110             name: VM_DISK
111             default: '{vm-disk}'
112         - string:
113             name: VM_MEMORY
114             default: '{vm-memory}'
115         - string:
116             name: VM_CPU
117             default: '{vm-cpu}'
118         - string:
119             name: CLEAN_DIB_IMAGES
120             default: 'true'
121         - label:
122             name: SLAVE_LABEL
123             default: 'infra-{type}-{distro}'
124         - string:
125             name: BIFROST_LOG_URL
126             default: 'http://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER/$JOB_NAME'
127
128     scm:
129         - git:
130             url: '$PROJECT_REPO'
131             refspec: '$GERRIT_REFSPEC'
132             branches:
133                 - 'origin/$GERRIT_BRANCH'
134             skip-tag: true
135             choosing-strategy: 'gerrit'
136             timeout: 10
137             wipe-workspace: true
138
139     triggers:
140         - '{project}-gerrit-trigger':
141             branch: '{branch}'
142
143     builders:
144         - bifrost-set-name
145         - bifrost-build
146
147     publishers:
148         - email:
149             recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com zhang.jun3g@zte.com.cn
150 #--------------------------------
151 # trigger macros
152 #--------------------------------
153 - trigger:
154     name: 'openstack-gerrit-trigger'
155     triggers:
156         - gerrit:
157             server-name: 'review.openstack.org'
158             escape-quotes: true
159             trigger-on:
160                 - patchset-created-event:
161                     exclude-drafts: 'false'
162                     exclude-trivial-rebase: 'false'
163                     exclude-no-code-change: 'false'
164                 - comment-added-contains-event:
165                     comment-contains-value: 'recheck'
166             custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html'
167             silent-start: true
168             projects:
169               - project-compare-type: 'PLAIN'
170                 project-pattern: 'openstack/bifrost'
171                 branches:
172                   - branch-compare-type: 'ANT'
173                     branch-pattern: '**/{branch}'
174                 forbidden-file-paths:
175                   - compare-type: ANT
176                     pattern: 'doc/**'
177                   - compare-type: ANT
178                     pattern: 'releasenotes/**'
179             readable-message: true
180 - trigger:
181     name: 'opnfv-gerrit-trigger'
182     triggers:
183         - gerrit:
184             server-name: 'gerrit.opnfv.org'
185             trigger-on:
186                 - patchset-created-event:
187                     exclude-drafts: 'false'
188                     exclude-trivial-rebase: 'false'
189                     exclude-no-code-change: 'false'
190                 - draft-published-event
191                 - comment-added-contains-event:
192                     comment-contains-value: 'recheck'
193                 - comment-added-contains-event:
194                     comment-contains-value: 'reverify'
195             custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html'
196             projects:
197               - project-compare-type: 'ANT'
198                 project-pattern: 'releng'
199                 branches:
200                   - branch-compare-type: 'ANT'
201                     branch-pattern: '**/{branch}'
202                 file-paths:
203                   - compare-type: ANT
204                     pattern: 'prototypes/bifrost/**'
205                   - compare-type: ANT
206                     pattern: 'jjb/infra/**'
207             readable-message: true
208
209 #---------------------------
210 # builder macros
211 #---------------------------
212 - builder:
213     name: bifrost-set-name
214     builders:
215         - description-setter:
216             description: "Built on $NODE_NAME"
217
218 - builder:
219     name: bifrost-build
220     builders:
221         - shell:
222             !include-raw: ./bifrost-verify.sh