c4b0a28809f216e7b676bbce6c55bb3a88fe9242
[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     # NOTE (fdegir): auth-id is taken from Jenkins Global Configuration
30     # by clicking Auth ID button for the desired GitHub Server API URL
31     # Please ensure you are looking at GitHub Pull Request Builder part
32     # of global configuration and not to GitHub Server configuration
33     ghprb-auth-id: 'cdfd2452-a9e2-41a3-8ee6-9058512b4aff'
34     image-name:
35       - ctraffic
36       - ipam
37       - load-balancer
38       - nsp
39       - proxy
40       - target
41       - frontend
42
43     jobs:
44       - 'nordix-nsm-meridio-verify-static-analysis-{stream}'
45       - 'nordix-nsm-meridio-{image-name}-verify-build-{stream}'
46
47 - job-template:
48     name: 'nordix-nsm-meridio-verify-static-analysis-{stream}'
49
50     disabled: '{obj:disabled}'
51
52     concurrent: true
53
54     node: nordix-nsm-build-ubuntu1804
55
56     properties:
57       - github:
58           url: https://github.com/Nordix/Meridio
59
60     parameters:
61       - string:
62           name: GITHUB_ORGANIZATION
63           default: 'Nordix'
64           description: JJB configured parameter to identify GitHub Organization
65       - string:
66           name: PROJECT
67           default: 'meridio'
68           description: JJB configured PROJECT parameter to identify a Nordix GitHub project
69
70     scm:
71       - git:
72           url: 'https://github.com/$GITHUB_ORGANIZATION/$PROJECT.git'
73           branches:
74             - '{branch}'
75           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
76           timeout: 15
77           wipe-workspace: true
78           choosing-strategy: 'default'
79           clean_before: false
80
81     triggers:
82       - github-pull-request:
83           admin-list:
84             - nordixinfra
85             - uablrek
86             - LionelJouin
87             - fdegir
88           auth-id: '{ghprb-auth-id}'
89           github-hooks: true
90           permit-all: true
91           trigger-phrase: '/reverify'
92           only-trigger-phrase: false
93           cron: 'H/5 * * * *'
94           status-context: 'Nordix Jenkins Static Analysis'
95
96     builders:
97       - shell:
98           !include-raw: ./scripts/static-analysis.sh
99
100 - job-template:
101     name: 'nordix-nsm-meridio-{image-name}-verify-build-{stream}'
102
103     disabled: '{obj:disabled}'
104
105     concurrent: true
106
107     node: nordix-nsm-build-ubuntu1804
108
109     properties:
110       - github:
111           url: https://github.com/Nordix/Meridio
112
113     parameters:
114       - string:
115           name: GITHUB_ORGANIZATION
116           default: 'Nordix'
117           description: JJB configured parameter to identify GitHub Organization
118       - string:
119           name: PROJECT
120           default: 'meridio'
121           description: JJB configured PROJECT parameter to identify a Nordix GitHub project
122       - string:
123           name: IMAGE_NAME
124           default: '{image-name}'
125           description: Meridio image to verify build
126       - string:
127           name: IMAGE_VERSION
128           default: 'dev'
129           description: Meridio image version to build with
130       - string:
131           name: IMAGE_REGISTRY
132           default: 'registry.nordix.org/cloud-native/$PROJECT'
133           description: Meridio image version to build with
134       - string:
135           name: BUILD_STEPS
136           default: 'build tag'
137           description: Steps to run during build
138
139     scm:
140       - git:
141           url: 'https://github.com/$GITHUB_ORGANIZATION/$PROJECT.git'
142           branches:
143             - '{branch}'
144           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
145           timeout: 15
146           wipe-workspace: true
147           choosing-strategy: 'default'
148           clean_before: false
149
150     triggers:
151       - github-pull-request:
152           admin-list:
153             - nordixinfra
154             - uablrek
155             - LionelJouin
156             - fdegir
157           auth-id: '{ghprb-auth-id}'
158           github-hooks: true
159           permit-all: true
160           trigger-phrase: '/reverify'
161           only-trigger-phrase: false
162           cron: 'H/5 * * * *'
163           status-context: 'Nordix Jenkins Image Build: {image-name}'
164
165     wrappers:
166       - build-timeout:
167           timeout: 30
168       - nordixinfra-harbor-creds-wrapper
169       - mask-passwords
170
171     builders:
172       - shell:
173           !include-raw: ./scripts/build.sh
174
175 # vim: set ts=2 sw=2 expandtab: