nsm: Create basic verify and periodic jobs
[infra/cicd.git] / jjb / nsm / nordix-nsm-meridio-verify.yaml
1 ---
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2021 Nordix Foundation.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19
20 - project:
21     name: 'nsm-meridio-verify'
22
23     project: 'nsm-meridio-verify'
24
25     stream:
26       - 'master':
27           branch: '${{ghprbActualCommit}}'
28
29     image-name:
30       - ctraffic
31       - ipam
32       - load-balancer
33       - nsp
34       - proxy
35       - target
36
37     jobs:
38       - 'nordix-nsm-meridio-verify-static-analysis-{stream}'
39       - 'nordix-nsm-meridio-{image-name}-verify-build-{stream}'
40
41 - job-template:
42     name: 'nordix-nsm-meridio-verify-static-analysis-{stream}'
43
44     disabled: '{obj:disabled}'
45
46     concurrent: true
47
48     node: nordix-nsm-build-ubuntu1804
49
50     properties:
51       - github:
52           url: https://github.com/Nordix/Meridio.git
53
54     parameters:
55       - string:
56           name: GITHUB_ORGANIZATION
57           default: 'Nordix'
58           description: JJB configured parameter to identify GitHub Organization
59       - string:
60           name: PROJECT
61           default: 'meridio'
62           description: JJB configured PROJECT parameter to identify a Nordix GitHub project
63
64     scm:
65       - git:
66           url: 'https://github.com/$GITHUB_ORGANIZATION/$PROJECT.git'
67           branches:
68             - '{branch}'
69           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
70           timeout: 15
71           wipe-workspace: true
72           choosing-strategy: 'default'
73           clean_before: false
74
75     triggers:
76       - github-pull-request:
77           admin-list:
78             - nordixinfra
79             - uablrek
80             - LionelJouin
81             - fdegir
82           auth-id: 'nordix-nsm-github-token'
83           github-hooks: true
84           permit-all: true
85           trigger-phrase: '/reverify'
86           only-trigger-phrase: false
87           cron: 'H/5 * * * *'
88           status-context: 'Nordix Jenkins'
89
90     builders:
91       - shell:
92           !include-raw: ./scripts/static-analysis.sh
93
94 - job-template:
95     name: 'nordix-nsm-meridio-{image-name}-verify-build-{stream}'
96
97     disabled: '{obj:disabled}'
98
99     concurrent: true
100
101     node: nordix-nsm-build-ubuntu1804
102
103     properties:
104       - github:
105           url: https://github.com/Nordix/Meridio.git
106
107     parameters:
108       - string:
109           name: GITHUB_ORGANIZATION
110           default: 'Nordix'
111           description: JJB configured parameter to identify GitHub Organization
112       - string:
113           name: PROJECT
114           default: 'meridio'
115           description: JJB configured PROJECT parameter to identify a Nordix GitHub project
116       - string:
117           name: IMAGE_NAME
118           default: '{image-name}'
119           description: Meridio image to verify build
120       - string:
121           name: IMAGE_VERSION
122           default: 'dev'
123           description: Meridio image version to build with
124       - string:
125           name: IMAGE_REGISTRY
126           default: 'registry.nordix.org/cloud-native/$PROJECT'
127           description: Meridio image version to build with
128       - string:
129           name: BUILD_STEPS
130           default: 'build tag'
131           description: Steps to run during build
132
133     scm:
134       - git:
135           url: 'https://github.com/$GITHUB_ORGANIZATION/$PROJECT.git'
136           branches:
137             - '{branch}'
138           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
139           timeout: 15
140           wipe-workspace: true
141           choosing-strategy: 'default'
142           clean_before: false
143
144     triggers:
145       - github-pull-request:
146           admin-list:
147             - nordixinfra
148             - uablrek
149             - LionelJouin
150             - fdegir
151           auth-id: 'nordix-nsm-github-token'
152           github-hooks: true
153           permit-all: true
154           trigger-phrase: '/reverify'
155           only-trigger-phrase: false
156           cron: 'H/5 * * * *'
157           status-context: 'Nordix Jenkins'
158
159     wrappers:
160       - build-timeout:
161           timeout: 10
162       - nordixinfra-harbor-creds-wrapper
163       - mask-passwords
164
165     builders:
166       - shell:
167           !include-raw: ./scripts/build.sh
168
169 # vim: set ts=2 sw=2 expandtab: