--- # # Copyright (c) 2019 Red Hat. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. # # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # A builder to ship logs from a bare metal Akraino deploy test node. # Similar to lf-infra-ship-logs without python-tools-install.sh and # job-cost.sh. - builder: name: kni-deploy-ship-logs builders: # Ensure no pre-existing .netrc files are overriding logs config - lf-provide-maven-settings-cleanup - config-file-provider: files: - file-id: "jenkins-log-archives-settings" variable: "SETTINGS_FILE" - lf-infra-create-netrc: server-id: logs - shell: !include-raw: - ../../global-jjb/shell/logs-deploy.sh - shell: !include-raw: - ../../global-jjb/shell/logs-clear-credentials.sh - description-setter: regexp: "(^(Nexus|S3) build logs: .*)" - kni_common: &kni_common name: kni-common ###################### # Default parameters # ###################### build-node: "{build-node}" build-days-to-keep: 30 build-timeout: 60 submodule-recursive: true gerrit_trigger_file_paths: "{obj:gerrit_trigger_file_paths}" ##################### # Job Configuration # ##################### project-type: freestyle node: "{build-node}" properties: - lf-infra-properties: build-days-to-keep: '{build-days-to-keep}' parameters: - lf-infra-parameters: project: '{project}' branch: '{branch}' stream: '{stream}' lftools-version: '{lftools-version}' wrappers: - lf-infra-wrappers: build-timeout: '{build-timeout}' jenkins-ssh-credential: '{jenkins-ssh-credential}' scm: - lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' git-url: '{git-url}/{project}.git' refspec: '$GERRIT_REFSPEC' branch: '$GERRIT_BRANCH' submodule-recursive: '{submodule-recursive}' submodule-timeout: '{submodule-timeout}' submodule-disable: false choosing-strategy: default gerrit_verify_triggers: - patchset-created-event: exclude-drafts: true exclude-trivial-rebase: false exclude-no-code-change: false - draft-published-event - comment-added-contains-event: comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$' triggers: - gerrit: server-name: '{gerrit-server-name}' trigger-on: '{obj:gerrit_verify_triggers}' projects: - project-compare-type: ANT project-pattern: '{project}' branches: - branch-compare-type: ANT branch-pattern: '**/{branch}' file-paths: '{obj:gerrit_trigger_file_paths}' publishers: - lf-infra-publish - kni_common_deploy: &kni_common_deploy name: kni-common-deploy <<: *kni_common archive-artifacts: > **/*.log parameters: - lf-infra-parameters: project: '{project}' branch: '{branch}' stream: '{stream}' lftools-version: '{lftools-version}' - string: name: ARCHIVE_ARTIFACTS default: '{archive-artifacts}' description: Artifacts to archive to the logs server. wrappers: - lf-infra-wrappers: build-timeout: '{build-timeout}' jenkins-ssh-credential: '{jenkins-ssh-credential}' - credentials-binding: - ssh-user-private-key: credential-id: kni-secrets key-file-variable: KNI_KEY_PATH scm: - akraino-lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' git-url: '{git-url}/{project}.git' refspec: '$GERRIT_REFSPEC' branch: '$GERRIT_BRANCH' submodule-recursive: '{submodule-recursive}' submodule-timeout: '{submodule-timeout}' submodule-disable: false choosing-strategy: default basedir: '{project-name}' - akraino-lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' git-url: '{git-url}/kni/installer.git' refspec: 'refs/heads/master' branch: 'master' submodule-recursive: '{submodule-recursive}' submodule-timeout: '{submodule-timeout}' submodule-disable: false choosing-strategy: default basedir: 'installer' publishers: - postbuildscript: builders: - role: BOTH build-on: - ABORTED - FAILURE - NOT_BUILT - SUCCESS - UNSTABLE build-steps: - kni-deploy-ship-logs mark-unstable-if-failed: true - workspace-cleanup: exclude: # Do not clean up *.jenkins-trigger files for jobs that use a # properties file as input for triggering another build. - "**/*.jenkins-trigger" fail-build: false - job-template: id: kni-installer-verify-installer name: '{project-name}-verify-installer' gerrit_trigger_file_paths: - compare-type: ANT pattern: '**' <<: *kni_common build-node: centos7-builder-2c-1g builders: - lf-infra-pre-build - shell: !include-raw-escape: - ../shell/install_go.sh - shell: !include-raw-escape: - ../shell/build_kni_installer.sh - job-template: id: kni-verify-deploy-aws name: 'kni-{project-name}-verify-deploy-aws' build-node: kni-cloud <<: *kni_common_deploy gerrit_trigger_file_paths: - compare-type: ANT pattern: 'profiles/production.aws/**' - compare-type: ANT pattern: 'sites/testing.aws.edge-sites.net/**' - compare-type: ANT pattern: 'base/**' builders: - lf-infra-pre-build - config-file-provider: files: - file-id: kni-coreos-pull-secret target: akraino-secrets/coreos-pull-secret - shell: !include-raw-escape: - ../shell/install_go.sh - shell: ./installer/ci/kni_deploy_aws.sh - job-template: id: kni-verify-deploy-gcp name: 'kni-{project-name}-verify-deploy-gcp' build-node: kni-cloud <<: *kni_common_deploy gerrit_trigger_file_paths: - compare-type: ANT pattern: 'profiles/production.gcp/**' - compare-type: ANT pattern: 'sites/testing.gcp.edge-sites.net/**' - compare-type: ANT pattern: 'base/**' builders: - lf-infra-pre-build - config-file-provider: files: - file-id: kni-coreos-pull-secret target: akraino-secrets/coreos-pull-secret - shell: !include-raw-escape: - ../shell/install_go.sh - shell: ./installer/ci/kni_deploy_gcp.sh - job-template: id: kni-verify-deploy-baremetal name: 'kni-{project-name}-verify-deploy-baremetal' <<: *kni_common_deploy build-timeout: 120 build-node: kni-baremetal gerrit_trigger_file_paths: - compare-type: ANT pattern: 'profiles/production.baremetal/**' - compare-type: ANT pattern: 'sites/testing.baremetal.edge-sites.net/**' - compare-type: ANT pattern: 'base/**' scm: - akraino-lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' git-url: 'https://gerrit.akraino.org/r/kni/blueprint-pae' refspec: '$GERRIT_REFSPEC' branch: '$GERRIT_BRANCH' submodule-recursive: '{submodule-recursive}' submodule-timeout: '{submodule-timeout}' submodule-disable: false choosing-strategy: default basedir: 'kni-blueprint-pae' - akraino-lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' git-url: '{git-url}/kni/installer.git' refspec: 'refs/heads/master' branch: 'master' submodule-recursive: '{submodule-recursive}' submodule-timeout: '{submodule-timeout}' submodule-disable: false choosing-strategy: default basedir: 'installer' builders: - lf-infra-pre-build - config-file-provider: files: - file-id: kni-coreos-pull-secret target: akraino-secrets/coreos-pull-secret - file-id: kni-ssh-pub-key target: akraino-secrets/ssh-pub-key - shell: sudo -E ./installer/ci/kni_deploy_baremetal.sh