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