3 # Copyright (c) 2019 Red Hat. All rights reserved.
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may
6 # not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 # 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.
17 - kni_common: &kni_common
20 ######################
21 # Default parameters #
22 ######################
24 build-node: "{build-node}"
25 build-days-to-keep: 30
27 submodule-recursive: true
28 gerrit_trigger_file_paths: "{obj:gerrit_trigger_file_paths}"
34 project-type: freestyle
37 - lf-infra-properties:
38 build-days-to-keep: '{build-days-to-keep}'
41 - lf-infra-parameters:
45 lftools-version: '{lftools-version}'
49 build-timeout: '{build-timeout}'
50 jenkins-ssh-credential: '{jenkins-ssh-credential}'
53 - lf-infra-gerrit-scm:
54 jenkins-ssh-credential: '{jenkins-ssh-credential}'
55 git-url: '{git-url}/{project}.git'
56 refspec: '$GERRIT_REFSPEC'
57 branch: '$GERRIT_BRANCH'
58 submodule-recursive: '{submodule-recursive}'
59 submodule-timeout: '{submodule-timeout}'
60 submodule-disable: false
61 choosing-strategy: default
63 gerrit_verify_triggers:
64 - patchset-created-event:
66 exclude-trivial-rebase: false
67 exclude-no-code-change: false
68 - draft-published-event
69 - comment-added-contains-event:
70 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
74 server-name: '{gerrit-server-name}'
75 trigger-on: '{obj:gerrit_verify_triggers}'
77 - project-compare-type: ANT
78 project-pattern: '{project}'
80 - branch-compare-type: ANT
81 branch-pattern: '**/{branch}'
82 file-paths: '{obj:gerrit_trigger_file_paths}'
86 - kni_common_deploy: &kni_common_deploy
87 name: kni-common-deploy
93 - lf-infra-parameters:
97 lftools-version: '{lftools-version}'
99 name: ARCHIVE_ARTIFACTS
100 default: '{archive-artifacts}'
101 description: Artifacts to archive to the logs server.
105 build-timeout: '{build-timeout}'
106 jenkins-ssh-credential: '{jenkins-ssh-credential}'
107 - credentials-binding:
108 - ssh-user-private-key:
109 credential-id: kni-secrets
110 key-file-variable: KNI_KEY_PATH
112 - akraino-lf-infra-gerrit-scm:
113 jenkins-ssh-credential: '{jenkins-ssh-credential}'
114 git-url: '{git-url}/{project}.git'
115 refspec: '$GERRIT_REFSPEC'
116 branch: '$GERRIT_BRANCH'
117 submodule-recursive: '{submodule-recursive}'
118 submodule-timeout: '{submodule-timeout}'
119 submodule-disable: false
120 choosing-strategy: default
121 basedir: '{project-name}'
122 - akraino-lf-infra-gerrit-scm:
123 jenkins-ssh-credential: '{jenkins-ssh-credential}'
124 git-url: '{git-url}/kni/installer.git'
125 refspec: 'refs/heads/master'
127 submodule-recursive: '{submodule-recursive}'
128 submodule-timeout: '{submodule-timeout}'
129 submodule-disable: false
130 choosing-strategy: default
134 id: kni-installer-verify-installer
135 name: '{project-name}-verify-installer'
136 gerrit_trigger_file_paths:
140 build-node: centos7-builder-2c-1g
144 - shell: !include-raw-escape:
145 - ../shell/install_go.sh
146 - shell: !include-raw-escape:
147 - ../shell/build_kni_installer.sh
150 id: kni-installer-verify-binary
151 name: '{project-name}-verify-binary'
153 build-node: centos7-builder-8c-8g
155 gerrit_trigger_file_paths:
159 pattern: 'cmd/binary.go'
163 server-name: '{gerrit-server-name}'
164 trigger-on: '{obj:gerrit_verify_triggers}'
166 - project-compare-type: ANT
167 project-pattern: '{project}'
169 - branch-compare-type: ANT
170 branch-pattern: '**/{branch}'
171 file-paths: '{obj:gerrit_trigger_file_paths}'
175 - shell: !include-raw-escape:
176 - ../shell/install_go.sh
177 - shell: !include-raw-escape:
178 - ../shell/build_kni_binary.sh
181 id: kni-installer-publish-openshift-install-libvirt-binary
182 name: '{project-name}-publish-openshift-install-libvirt-binary'
184 build-node: centos7-builder-8c-8g
186 gerrit_trigger_file_paths: []
187 gerrit_build_triggers:
188 - comment-added-contains-event:
189 comment-contains-value: '^build-binary'
192 - shell: !include-raw-escape:
193 - ../shell/install_go.sh
194 - shell: !include-raw-escape:
195 - ../shell/build_openshift_install_libvirt_binary.sh
198 id: kni-verify-deploy-aws
199 name: 'kni-{project-name}-verify-deploy-aws'
200 build-node: kni-libvirt
201 <<: *kni_common_deploy
203 gerrit_trigger_file_paths:
205 pattern: 'profiles/production.aws/**'
207 pattern: 'sites/testing.aws.edge-sites.net/**'
213 - config-file-provider:
215 - file-id: kni-coreos-pull-secret
216 target: akraino-secrets/coreos-pull-secret
217 - shell: !include-raw-escape:
218 - ../shell/install_go.sh
219 - shell: ./installer/ci/kni_deploy_aws.sh
222 id: kni-verify-deploy-libvirt
223 name: 'kni-{project-name}-verify-deploy-libvirt'
224 build-node: kni-libvirt
225 <<: *kni_common_deploy
227 gerrit_trigger_file_paths:
229 pattern: 'profiles/testing.libvirt/**'
231 pattern: 'sites/testing.virt.edge-sites.net/**'
237 - config-file-provider:
239 - file-id: kni-coreos-pull-secret
240 target: akraino-secrets/coreos-pull-secret
241 - file-id: kni-ssh-pub-key
242 target: akraino-secrets/ssh-pub-key
243 - shell: !include-raw-escape:
244 - ../shell/install_go.sh
245 - shell: ./installer/ci/kni_deploy_libvirt.sh
248 id: kni-verify-deploy-baremetal
249 name: 'kni-{project-name}-verify-deploy-baremetal'
250 <<: *kni_common_deploy
252 build-node: kni-baremetal
254 gerrit_trigger_file_paths:
256 pattern: 'profiles/production.baremetal/**'
258 pattern: 'sites/testing.baremetal.edge-sites.net/**'
263 - akraino-lf-infra-gerrit-scm:
264 jenkins-ssh-credential: '{jenkins-ssh-credential}'
265 git-url: 'https://github.com/yrobla/testing.baremetal.edge-sites.net'
266 refspec: '$GERRIT_REFSPEC'
267 branch: '$GERRIT_BRANCH'
268 submodule-recursive: '{submodule-recursive}'
269 submodule-timeout: '{submodule-timeout}'
270 submodule-disable: false
271 choosing-strategy: default
272 basedir: 'testing.baremetal.edge-sites.net'
273 - akraino-lf-infra-gerrit-scm:
274 jenkins-ssh-credential: '{jenkins-ssh-credential}'
275 git-url: '{git-url}/kni/installer.git'
276 refspec: 'refs/heads/master'
278 submodule-recursive: '{submodule-recursive}'
279 submodule-timeout: '{submodule-timeout}'
280 submodule-disable: false
281 choosing-strategy: default
286 - config-file-provider:
288 - file-id: kni-coreos-pull-secret
289 target: akraino-secrets/coreos-pull-secret
290 - file-id: kni-ssh-pub-key
291 target: akraino-secrets/ssh-pub-key
292 - shell: sudo -E ./installer/ci/kni_deploy_baremetal.sh