Merge "infra: bifrost: Upload build logs to artifacts.opnfv.org"
[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         - bifrost-artifacts-upload
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'
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'
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
223
224 - builder:
225     name: bifrost-artifacts-upload
226     builders:
227         - shell:
228             !include-raw: ./bifrost-upload-logs.sh