d4edb7442f9b05f3f93f5ccb579463d7b7798cbf
[infra/cicd.git] / jjb / nolabs / nolabs-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'
23
24     project: 'nolabs'
25
26     stream:
27       - 'master':
28           branch: '{stream}'
29
30     jobs:
31       - 'nolabs-verify-{stream}'
32       - 'nolabs-merge-{stream}'
33
34 - job-template:
35     name: 'nolabs-verify-{stream}'
36
37     concurrent: false
38
39     parameters:
40       - project-parameters:
41           project: '{project}'
42           branch: '{branch}'
43       - nordix-gerrit-parameters
44       - label:
45           name: SLAVE_LABEL
46           default: 'nolabs'
47           description: 'Slave label to schedule this job on.'
48
49     properties:
50       - logrotate
51       - build-blocker:
52           use-build-blocker: true
53           blocking-jobs:
54             - 'nolabs-.*'
55           block-level: 'NODE'
56       - throttle:
57           max-per-node: 1
58           max-total: 1
59           option: project
60
61     wrappers:
62       - build-timeout:
63           timeout: 10
64       - fix-workspace-permissions
65
66     scm:
67       - git-scm-gerrit:
68           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
69           branch: '{branch}'
70           refspec: $GERRIT_REFSPEC
71           wipe_workspace: true
72           clean_before: false
73
74     triggers:
75       - gerrit:
76           server-name: 'Nordix Gerrit'
77           trigger-on:
78             - patchset-created-event:
79                 exclude-drafts: 'false'
80                 exclude-trivial-rebase: 'false'
81                 exclude-no-code-change: 'false'
82             - draft-published-event
83             - comment-added-contains-event:
84                 comment-contains-value: 'recheck'
85             - comment-added-contains-event:
86                 comment-contains-value: 'reverify'
87           projects:
88             - project-compare-type: 'REG_EXP'
89               project-pattern: 'nolabs'
90               branches:
91                 - branch-compare-type: 'ANT'
92                   branch-pattern: '**/{branch}'
93               file-paths:
94                 - compare-type: 'ANT'
95                   pattern: '**'
96
97     builders:
98       - shell:
99           !include-raw-escape: ./verify.sh
100
101 - job-template:
102     name: 'nolabs-merge-{stream}'
103
104     concurrent: false
105
106     parameters:
107       - project-parameters:
108           project: '{project}'
109           branch: '{branch}'
110       - nordix-gerrit-parameters
111       - label:
112           name: SLAVE_LABEL
113           default: 'nolabs'
114           description: 'Slave label to schedule this job on.'
115
116     properties:
117       - logrotate
118       - build-blocker:
119           use-build-blocker: true
120           blocking-jobs:
121             - 'nolabs-.*'
122           block-level: 'NODE'
123       - throttle:
124           max-per-node: 1
125           max-total: 1
126           option: project
127
128     wrappers:
129       - build-timeout:
130           timeout: 10
131       - fix-workspace-permissions
132
133     scm:
134       - git-scm:
135           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
136           branch: '{branch}'
137           refspec: ''
138           wipe_workspace: true
139           clean_before: false
140
141     triggers:
142       - nordix-gerrit-trigger-change-merged:
143           project: '{project}'
144           branch: '{branch}'
145           files: 'jjb/**'
146
147     wrappers:
148       - nordixinfra-jjb-creds-wrapper
149
150     builders:
151       - shell:
152           !include-raw-escape: ./merge.sh
153
154 # vim: set ts=2 sw=2 expandtab: