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.
18 # A builder to ship logs from a bare metal Akraino deploy test node.
19 # Similar to lf-infra-ship-logs without python-tools-install.sh and
22 name: kni-deploy-ship-logs
24 # Ensure no pre-existing .netrc files are overriding logs config
25 - lf-provide-maven-settings-cleanup
26 - config-file-provider:
28 - file-id: "jenkins-log-archives-settings"
29 variable: "SETTINGS_FILE"
30 - lf-infra-create-netrc:
32 - shell: !include-raw:
33 - ../../global-jjb/shell/logs-deploy.sh
34 - shell: !include-raw:
35 - ../../global-jjb/shell/logs-clear-credentials.sh
37 regexp: "(^(Nexus|S3) build logs: .*)"
39 - kni_common: &kni_common
42 ######################
43 # Default parameters #
44 ######################
46 build-node: "{build-node}"
47 build-days-to-keep: 30
49 submodule-recursive: true
50 gerrit_trigger_file_paths: "{obj:gerrit_trigger_file_paths}"
56 project-type: freestyle
59 - lf-infra-properties:
60 build-days-to-keep: '{build-days-to-keep}'
63 - lf-infra-parameters:
67 lftools-version: '{lftools-version}'
71 build-timeout: '{build-timeout}'
72 jenkins-ssh-credential: '{jenkins-ssh-credential}'
75 - lf-infra-gerrit-scm:
76 jenkins-ssh-credential: '{jenkins-ssh-credential}'
77 git-url: '{git-url}/{project}.git'
78 refspec: '$GERRIT_REFSPEC'
79 branch: '$GERRIT_BRANCH'
80 submodule-recursive: '{submodule-recursive}'
81 submodule-timeout: '{submodule-timeout}'
82 submodule-disable: false
83 choosing-strategy: default
85 gerrit_verify_triggers:
86 - patchset-created-event:
88 exclude-trivial-rebase: false
89 exclude-no-code-change: false
90 - draft-published-event
91 - comment-added-contains-event:
92 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
96 server-name: '{gerrit-server-name}'
97 trigger-on: '{obj:gerrit_verify_triggers}'
99 - project-compare-type: ANT
100 project-pattern: '{project}'
102 - branch-compare-type: ANT
103 branch-pattern: '**/{branch}'
104 file-paths: '{obj:gerrit_trigger_file_paths}'
108 - kni_common_deploy: &kni_common_deploy
109 name: kni-common-deploy
115 - lf-infra-parameters:
119 lftools-version: '{lftools-version}'
121 name: ARCHIVE_ARTIFACTS
122 default: '{archive-artifacts}'
123 description: Artifacts to archive to the logs server.
127 build-timeout: '{build-timeout}'
128 jenkins-ssh-credential: '{jenkins-ssh-credential}'
129 - credentials-binding:
130 - ssh-user-private-key:
131 credential-id: kni-secrets
132 key-file-variable: KNI_KEY_PATH
134 - akraino-lf-infra-gerrit-scm:
135 jenkins-ssh-credential: '{jenkins-ssh-credential}'
136 git-url: '{git-url}/{project}.git'
137 refspec: '$GERRIT_REFSPEC'
138 branch: '$GERRIT_BRANCH'
139 submodule-recursive: '{submodule-recursive}'
140 submodule-timeout: '{submodule-timeout}'
141 submodule-disable: false
142 choosing-strategy: default
143 basedir: '{project-name}'
144 - akraino-lf-infra-gerrit-scm:
145 jenkins-ssh-credential: '{jenkins-ssh-credential}'
146 git-url: '{git-url}/kni/installer.git'
147 refspec: 'refs/heads/master'
149 submodule-recursive: '{submodule-recursive}'
150 submodule-timeout: '{submodule-timeout}'
151 submodule-disable: false
152 choosing-strategy: default
166 - kni-deploy-ship-logs
167 mark-unstable-if-failed: true
170 # Do not clean up *.jenkins-trigger files for jobs that use a
171 # properties file as input for triggering another build.
172 - "**/*.jenkins-trigger"
176 id: kni-installer-verify-installer
177 name: '{project-name}-verify-installer'
178 gerrit_trigger_file_paths:
182 build-node: centos7-builder-2c-1g
186 - shell: !include-raw-escape:
187 - ../shell/install_go.sh
188 - shell: !include-raw-escape:
189 - ../shell/build_kni_installer.sh
192 id: kni-verify-deploy-aws
193 name: 'kni-{project-name}-verify-deploy-aws'
194 build-node: kni-cloud
195 <<: *kni_common_deploy
197 gerrit_trigger_file_paths:
199 pattern: 'profiles/production.aws/**'
201 pattern: 'sites/testing.aws.edge-sites.net/**'
207 - config-file-provider:
209 - file-id: kni-coreos-pull-secret
210 target: akraino-secrets/coreos-pull-secret
211 - shell: !include-raw-escape:
212 - ../shell/install_go.sh
213 - shell: ./installer/ci/kni_deploy_aws.sh
216 id: kni-verify-deploy-gcp
217 name: 'kni-{project-name}-verify-deploy-gcp'
218 build-node: kni-cloud
219 <<: *kni_common_deploy
221 gerrit_trigger_file_paths:
223 pattern: 'profiles/production.gcp/**'
225 pattern: 'sites/testing.gcp.edge-sites.net/**'
231 - config-file-provider:
233 - file-id: kni-coreos-pull-secret
234 target: akraino-secrets/coreos-pull-secret
235 - shell: !include-raw-escape:
236 - ../shell/install_go.sh
237 - shell: ./installer/ci/kni_deploy_gcp.sh
240 id: kni-verify-deploy-baremetal
241 name: 'kni-{project-name}-verify-deploy-baremetal'
242 <<: *kni_common_deploy
244 build-node: kni-baremetal
246 gerrit_trigger_file_paths:
248 pattern: 'profiles/production.baremetal/**'
250 pattern: 'sites/testing.baremetal.edge-sites.net/**'
255 - akraino-lf-infra-gerrit-scm:
256 jenkins-ssh-credential: '{jenkins-ssh-credential}'
257 git-url: 'https://gerrit.akraino.org/r/kni/blueprint-pae'
258 refspec: '$GERRIT_REFSPEC'
259 branch: '$GERRIT_BRANCH'
260 submodule-recursive: '{submodule-recursive}'
261 submodule-timeout: '{submodule-timeout}'
262 submodule-disable: false
263 choosing-strategy: default
264 basedir: 'kni-blueprint-pae'
265 - akraino-lf-infra-gerrit-scm:
266 jenkins-ssh-credential: '{jenkins-ssh-credential}'
267 git-url: '{git-url}/kni/installer.git'
268 refspec: 'refs/heads/master'
270 submodule-recursive: '{submodule-recursive}'
271 submodule-timeout: '{submodule-timeout}'
272 submodule-disable: false
273 choosing-strategy: default
278 - config-file-provider:
280 - file-id: kni-coreos-pull-secret
281 target: akraino-secrets/coreos-pull-secret
282 - file-id: kni-ssh-pub-key
283 target: akraino-secrets/ssh-pub-key
284 - shell: sudo -E ./installer/ci/kni_deploy_baremetal.sh