define default parameters for daisy
[releng.git] / jjb / daisy4nfv / daisy4nfv-verify-jobs.yml
1 - project:
2     name: 'daisy4nfv-verify-jobs'
3     project: 'daisy'
4     installer: 'daisy'
5 ##########################################################
6 # use alias to keep the jobs'name existed alread unchanged
7 ##########################################################
8     alias: 'daisy4nfv'
9
10 #####################################
11 # branch definitions
12 #####################################
13     stream:
14         - master:
15             branch: '{stream}'
16             gs-pathname: ''
17             disabled: false
18         - danube:
19             branch: 'stable/{stream}'
20             gs-pathname: '/{stream}'
21             disabled: false
22 #####################################
23 # patch verification phases
24 #####################################
25     phase:
26         - unit:
27             slave-label: 'opnfv-build'
28         - build:
29             slave-label: 'opnfv-build-centos'
30 #####################################
31 # jobs
32 #####################################
33     jobs:
34         - '{alias}-verify-{stream}'
35         - '{alias}-verify-{phase}-{stream}'
36 #####################################
37 # job templates
38 #####################################
39 - job-template:
40     name: '{alias}-verify-{stream}'
41     project-type: multijob
42     disabled: false
43     concurrent: true
44     properties:
45         - logrotate-default
46         - throttle:
47             enabled: true
48             max-total: 4
49             option: 'project'
50     scm:
51         - git-scm
52     wrappers:
53         - ssh-agent-wrapper
54         - timeout:
55             timeout: 360
56             fail: true
57     triggers:
58         - gerrit:
59             server-name: 'gerrit.opnfv.org'
60             trigger-on:
61                 - patchset-created-event:
62                     exclude-drafts: 'false'
63                     exclude-trivial-rebase: 'false'
64                     exclude-no-code-change: 'false'
65                 - draft-published-event
66                 - comment-added-contains-event:
67                     comment-contains-value: 'recheck'
68                 - comment-added-contains-event:
69                     comment-contains-value: 'reverify'
70             projects:
71                 - project-compare-type: 'ANT'
72                   project-pattern: '{project}'
73                   branches:
74                       - branch-compare-type: 'ANT'
75                         branch-pattern: '**/{branch}'
76                   file-paths:
77                       - compare-type: ANT
78                         pattern: 'ci/**'
79                       - compare-type: ANT
80                         pattern: 'code/**'
81                       - compare-type: ANT
82                         pattern: 'deploy/**'
83                   disable-strict-forbidden-file-verification: 'true'
84                   forbidden-file-paths:
85                       - compare-type: ANT
86                         pattern: 'docs/**'
87                       - compare-type: ANT
88                         pattern: '.gitignore'
89             readable-message: true
90
91     parameters:
92         - project-parameter:
93             project: '{project}'
94             branch: '{branch}'
95         - 'opnfv-build-centos-defaults'
96         - '{alias}-verify-defaults':
97             gs-pathname: '{gs-pathname}'
98
99     builders:
100         - description-setter:
101             description: "Built on $NODE_NAME"
102         - multijob:
103             name: unit
104             condition: SUCCESSFUL
105             projects:
106                 - name: '{alias}-verify-{name}-{stream}'
107                   current-parameters: true
108                   node-parameters: false
109                   kill-phase-on: FAILURE
110                   abort-all-job: true
111         - multijob:
112             name: build
113             condition: SUCCESSFUL
114             projects:
115                 - name: '{alias}-verify-build-{stream}'
116                   current-parameters: false
117                   predefined-parameters: |
118                     BRANCH=$BRANCH
119                     GERRIT_REFSPEC=$GERRIT_REFSPEC
120                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
121                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
122                   node-parameters: false
123                   kill-phase-on: FAILURE
124                   abort-all-job: true
125
126 - job-template:
127     name: '{alias}-verify-{phase}-{stream}'
128     disabled: '{obj:disabled}'
129     concurrent: true
130     properties:
131         - logrotate-default
132         - throttle:
133             enabled: true
134             max-total: 6
135             option: 'project'
136     scm:
137         - git-scm
138     wrappers:
139         - ssh-agent-wrapper
140         - timeout:
141             timeout: 360
142             fail: true
143     parameters:
144         - project-parameter:
145             project: '{project}'
146             branch: '{branch}'
147         - '{installer}-defaults'
148         - '{slave-label}-defaults'
149         - '{alias}-verify-defaults':
150             gs-pathname: '{gs-pathname}'
151     builders:
152         - description-setter:
153             description: "Built on $NODE_NAME"
154         - '{project}-verify-{phase}-macro'
155
156 #####################################
157 # builder macros
158 #####################################
159 - builder:
160     name: 'daisy-verify-build-macro'
161     builders:
162         - shell:
163             !include-raw: ./daisy4nfv-basic.sh
164         - shell:
165             !include-raw: ./daisy4nfv-build.sh
166         - shell:
167             !include-raw: ./daisy4nfv-workspace-cleanup.sh
168
169 - builder:
170     name: daisy-verify-unit-macro
171     builders:
172         - shell: |
173             #!/bin/bash
174             set -o errexit
175             set -o pipefail
176             set -o xtrace
177             tox -e py27
178
179 #####################################
180 # parameter macros
181 #####################################
182 - parameter:
183     name: 'daisy4nfv-verify-defaults'
184     parameters:
185         - string:
186             name: BUILD_DIRECTORY
187             default: $WORKSPACE/build_output
188             description: "Directory where the build artifact will be located upon the completion of the build."
189         - string:
190             name: CACHE_DIRECTORY
191             default: $HOME/opnfv/cache/$INSTALLER_TYPE
192             description: "Directory where the cache to be used during the build is located."
193         - string:
194             name: GS_URL
195             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
196             description: "URL to Google Storage."