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