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     builders:
139         - bifrost-set-name
140         - bifrost-build
141         - bifrost-artifacts-upload
142
143     publishers:
144         - email:
145             recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com zhang.jun3g@zte.com.cn
146 #--------------------------------
147 # trigger macros
148 #--------------------------------
149 - trigger:
150     name: 'openstack-gerrit-trigger'
151     triggers:
152         - gerrit:
153             server-name: 'review.openstack.org'
154             escape-quotes: true
155             trigger-on:
156                 - patchset-created-event:
157                     exclude-drafts: 'false'
158                     exclude-trivial-rebase: 'false'
159                     exclude-no-code-change: 'false'
160                 - comment-added-contains-event:
161                     comment-contains-value: 'recheck'
162             custom-url: '* $JOB_NAME $BIFROST_LOG_URL'
163             silent-start: true
164             projects:
165               - project-compare-type: 'PLAIN'
166                 project-pattern: 'openstack/bifrost'
167                 branches:
168                   - branch-compare-type: 'ANT'
169                     branch-pattern: '**/{branch}'
170                 forbidden-file-paths:
171                   - compare-type: ANT
172                     pattern: 'doc/**'
173                   - compare-type: ANT
174                     pattern: 'releasenotes/**'
175             readable-message: true
176 - trigger:
177     name: 'opnfv-gerrit-trigger'
178     triggers:
179         - gerrit:
180             server-name: 'gerrit.opnfv.org'
181             trigger-on:
182                 - patchset-created-event:
183                     exclude-drafts: 'false'
184                     exclude-trivial-rebase: 'false'
185                     exclude-no-code-change: 'false'
186                 - draft-published-event
187                 - comment-added-contains-event:
188                     comment-contains-value: 'recheck'
189                 - comment-added-contains-event:
190                     comment-contains-value: 'reverify'
191             custom-url: '* $JOB_NAME $BIFROST_LOG_URL'
192             projects:
193               - project-compare-type: 'ANT'
194                 project-pattern: 'releng'
195                 branches:
196                   - branch-compare-type: 'ANT'
197                     branch-pattern: '**/{branch}'
198                 file-paths:
199                   - compare-type: ANT
200                     pattern: 'prototypes/bifrost/**'
201                   - compare-type: ANT
202                     pattern: 'jjb/infra/**'
203             readable-message: true
204
205 #---------------------------
206 # builder macros
207 #---------------------------
208 - builder:
209     name: bifrost-set-name
210     builders:
211         - description-setter:
212             description: "Built on $NODE_NAME"
213
214 - builder:
215     name: bifrost-build
216     builders:
217         - shell:
218             !include-raw: ./bifrost-verify.sh
219
220 - builder:
221     name: bifrost-artifacts-upload
222     builders:
223         - shell:
224             !include-raw: ./bifrost-upload-logs.sh