532f37bf9950e649ed91af8a09989796dd43de88
[infra/cicd.git] / jjb / nolabs / nolabs-verify-merge-jobs.yaml
1 ---
2 #
3 # ============LICENSE_START=======================================================
4 #  Copyright (C) 2019 Nordix Foundation.
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
20
21 - project:
22     name: 'nolabs-verify-merge'
23
24     project: 'nolabs'
25
26     stream:
27       - 'master':
28           branch: '{stream}'
29
30     jobs:
31       - 'nolabs-verify-{stream}':
32           slave-label: nolabs-dev
33       - 'nolabs-merge-{stream}':
34           slave-label: nolabs-prod
35
36 - job-template:
37     name: 'nolabs-verify-{stream}'
38
39     concurrent: false
40
41     parameters:
42       - project-parameters:
43           project: '{project}'
44           branch: '{branch}'
45       - nordix-gerrit-parameters
46       - label:
47           name: SLAVE_LABEL
48           default: '{slave-label}'
49           description: 'Slave label to schedule this job on.'
50
51     properties:
52       - logrotate
53       - build-blocker:
54           use-build-blocker: true
55           blocking-jobs:
56             - 'nolabs-.*'
57           block-level: 'NODE'
58       - throttle:
59           max-per-node: 1
60           max-total: 1
61           option: project
62
63     wrappers:
64       - build-timeout:
65           timeout: 10
66       - fix-workspace-permissions
67
68     scm:
69       - git-scm-gerrit:
70           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
71           branch: '{branch}'
72           refspec: $GERRIT_REFSPEC
73           wipe_workspace: true
74           clean_before: false
75
76     triggers:
77       - gerrit:
78           server-name: 'Nordix Gerrit'
79           trigger-on:
80             - patchset-created-event:
81                 exclude-drafts: 'false'
82                 exclude-trivial-rebase: 'false'
83                 exclude-no-code-change: 'false'
84             - draft-published-event
85             - comment-added-contains-event:
86                 comment-contains-value: 'recheck'
87             - comment-added-contains-event:
88                 comment-contains-value: 'reverify'
89           projects:
90             - project-compare-type: 'REG_EXP'
91               project-pattern: 'nolabs/website'
92               branches:
93                 - branch-compare-type: 'ANT'
94                   branch-pattern: '**/{branch}'
95               disable-strict-forbidden-file-verification: 'false'
96               forbidden-file-paths:
97                 - compare-type: ANT
98                   pattern: '.gitignore'
99                 - compare-type: ANT
100                   pattern: '.gitreview'
101
102     builders:
103       - shell: |
104           #!/bin/bash
105           echo "To be implemented"
106
107 - job-template:
108     name: 'nolabs-merge-{stream}'
109
110     concurrent: false
111
112     parameters:
113       - project-parameters:
114           project: '{project}'
115           branch: '{branch}'
116       - nordix-gerrit-parameters
117       - label:
118           name: SLAVE_LABEL
119           default: '{slave-label}'
120           description: 'Slave label to schedule this job on.'
121
122     properties:
123       - logrotate
124       - build-blocker:
125           use-build-blocker: true
126           blocking-jobs:
127             - 'nolabs-.*'
128           block-level: 'NODE'
129       - throttle:
130           max-per-node: 1
131           max-total: 1
132           option: project
133
134     wrappers:
135       - build-timeout:
136           timeout: 10
137       - fix-workspace-permissions
138
139     scm:
140       - git-scm:
141           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
142           branch: '{branch}'
143           refspec: ''
144           wipe_workspace: true
145           clean_before: false
146
147     triggers:
148       - gerrit:
149           server-name: 'Nordix Gerrit'
150           trigger-on:
151             - change-merged-event
152             - comment-added-contains-event:
153                 comment-contains-value: 'remerge'
154           projects:
155             - project-compare-type: 'ANT'
156               project-pattern: 'nolabs/website'
157               branches:
158                 - branch-compare-type: 'ANT'
159                   branch-pattern: '**/{branch}'
160               disable-strict-forbidden-file-verification: 'false'
161               forbidden-file-paths:
162                 - compare-type: ANT
163                   pattern: '.gitignore'
164                 - compare-type: ANT
165                   pattern: '.gitreview'
166
167     builders:
168       - shell: |
169           #!/bin/bash
170           echo "To be implemented"
171
172 # vim: set ts=2 sw=2 expandtab: