ee78ab59f2998215151a6ea77e913568f2639e14
[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: false
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                   disable-strict-forbidden-file-verification: 'true'
92                   forbidden-file-paths:
93                       - compare-type: ANT
94                         pattern: 'docs/**'
95                       - compare-type: ANT
96                         pattern: '.gitignore'
97             readable-message: true
98
99     parameters:
100         - project-parameter:
101             project: '{project}'
102             branch: '{branch}'
103         - 'opnfv-build-centos-defaults'
104         - '{alias}-verify-defaults':
105             gs-pathname: '{gs-pathname}'
106
107     builders:
108         - description-setter:
109             description: "Built on $NODE_NAME"
110         - multijob:
111             name: build
112             condition: SUCCESSFUL
113             projects:
114                 - name: '{alias}-verify-build-{stream}'
115                   current-parameters: false
116                   predefined-parameters: |
117                     BRANCH=$BRANCH
118                     GERRIT_REFSPEC=$GERRIT_REFSPEC
119                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
120                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
121                   node-parameters: false
122                   kill-phase-on: FAILURE
123                   abort-all-job: true
124
125 - job-template:
126     name: '{alias}-verify-{phase}-{stream}'
127
128     disabled: '{obj:disabled}'
129
130     concurrent: true
131
132     properties:
133         - logrotate-default
134         - throttle:
135             enabled: true
136             max-total: 6
137             option: 'project'
138         - build-blocker:
139             use-build-blocker: true
140             blocking-jobs:
141                 - '{alias}-verify-deploy-.*'
142             block-level: 'NODE'
143
144     scm:
145         - git-scm
146
147     wrappers:
148         - ssh-agent-wrapper
149         - timeout:
150             timeout: 360
151             fail: true
152
153     parameters:
154         - project-parameter:
155             project: '{project}'
156             branch: '{branch}'
157         - '{slave-label}-defaults'
158         - '{alias}-verify-defaults':
159             gs-pathname: '{gs-pathname}'
160
161     builders:
162         - description-setter:
163             description: "Built on $NODE_NAME"
164         - '{project}-verify-{phase}-macro'
165
166 #####################################
167 # builder macros
168 #####################################
169 - builder:
170     name: 'daisy-verify-build-macro'
171     builders:
172         - shell:
173             !include-raw: ./daisy4nfv-basic.sh
174         - shell:
175             !include-raw: ./daisy4nfv-build.sh
176         - shell:
177             !include-raw: ./daisy4nfv-workspace-cleanup.sh
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."