Avoid build conflicts in build server
[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}-(merge|verify)-.*'
142                 - '{installer}-daily-.*'
143             block-level: 'NODE'
144
145     scm:
146         - git-scm
147
148     wrappers:
149         - ssh-agent-wrapper
150         - timeout:
151             timeout: 360
152             fail: true
153
154     parameters:
155         - project-parameter:
156             project: '{project}'
157             branch: '{branch}'
158         - '{slave-label}-defaults'
159         - '{alias}-verify-defaults':
160             gs-pathname: '{gs-pathname}'
161
162     builders:
163         - description-setter:
164             description: "Built on $NODE_NAME"
165         - '{project}-verify-{phase}-macro'
166
167 #####################################
168 # builder macros
169 #####################################
170 - builder:
171     name: 'daisy-verify-build-macro'
172     builders:
173         - shell:
174             !include-raw: ./daisy4nfv-basic.sh
175         - shell:
176             !include-raw: ./daisy4nfv-build.sh
177         - shell:
178             !include-raw: ./daisy4nfv-workspace-cleanup.sh
179
180 #####################################
181 # parameter macros
182 #####################################
183 - parameter:
184     name: 'daisy4nfv-verify-defaults'
185     parameters:
186         - string:
187             name: BUILD_DIRECTORY
188             default: $WORKSPACE/build_output
189             description: "Directory where the build artifact will be located upon the completion of the build."
190         - string:
191             name: CACHE_DIRECTORY
192             default: $HOME/opnfv/cache/$INSTALLER_TYPE
193             description: "Directory where the cache to be used during the build is located."
194         - string:
195             name: GS_URL
196             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
197             description: "URL to Google Storage."