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