From: Yolanda Robla Date: Wed, 20 Nov 2019 16:16:55 +0000 (+0100) Subject: Add new job to deploy kni on baremetal X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=c39f0ed34177f1cfd5c8f7b4b42d3e05224ce7db;p=ci-management.git Add new job to deploy kni on baremetal This commit add jobs for the kni blueprints to be ran using the baremetal profile Signed-off-by: Yolanda Robla Change-Id: I8449bbad86f6297717b508a2b608359e56f2aac5 --- diff --git a/jjb/akraino-templates/akraino-jjb-kni.yaml b/jjb/akraino-templates/akraino-jjb-kni.yaml index 2be2952..1f64bcc 100644 --- a/jjb/akraino-templates/akraino-jjb-kni.yaml +++ b/jjb/akraino-templates/akraino-jjb-kni.yaml @@ -14,26 +14,25 @@ # See the License for the specific language governing permissions and # limitations under the License. # -- job-template: - id: kni-installer-verify-installer - name: '{project-name}-verify-installer' +- kni_common: &kni_common + name: kni-common ###################### # Default parameters # ###################### - build-node: centos7-builder-2c-1g + 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}' - + node: "{build-node}" properties: - lf-infra-properties: build-days-to-keep: '{build-days-to-keep}' @@ -50,10 +49,6 @@ build-timeout: '{build-timeout}' jenkins-ssh-credential: '{jenkins-ssh-credential}' - gerrit_trigger_file_paths: - - compare-type: ANT - pattern: '**' - scm: - lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' @@ -85,125 +80,12 @@ - branch-compare-type: ANT branch-pattern: '**/{branch}' file-paths: '{obj:gerrit_trigger_file_paths}' - - builders: - - lf-infra-pre-build - - shell: !include-raw-escape: - - ../shell/install_go.sh - - shell: !include-raw-escape: - - ../shell/build_kni_installer.sh - publishers: - lf-infra-publish -- job-template: - id: kni-installer-verify-binary - name: '{project-name}-verify-binary' - - ###################### - # Default parameters # - ###################### - - build-days-to-keep: 30 - build-timeout: 60 - build-node: centos7-builder-8c-8g - submodule-recursive: true - - ##################### - # 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}' - - gerrit_trigger_file_paths: - - compare-type: ANT - pattern: 'Makefile' - - compare-type: ANT - pattern: 'cmd/binary.go' - - gerrit_verify_triggers: - - patchset-created-event: - execlude-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)$' - - 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 - - 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}' - - builders: - - lf-infra-pre-build - - shell: !include-raw-escape: - - ../shell/install_go.sh - - shell: !include-raw-escape: - - ../shell/build_kni_binary.sh - - publishers: - - lf-infra-publish - -- job-template: - id: kni-verify-deploy-aws - name: 'kni-{project-name}-verify-deploy-aws' - - ###################### - # Default parameters # - ###################### - - build-days-to-keep: 30 - build-timeout: 60 - build-node: kni-libvirt - submodule-recursive: true - - ##################### - # Job Configuration # - ##################### - - project-type: freestyle - node: '{build-node}' - - properties: - - lf-infra-properties: - build-days-to-keep: '{build-days-to-keep}' - +- kni_common_deploy: &kni_common_deploy + name: kni-common-deploy + <<: *kni_common archive-artifacts: > **/*.log @@ -226,24 +108,6 @@ - ssh-user-private-key: credential-id: kni-secrets key-file-variable: KNI_KEY_PATH - - 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/**' - - 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)$' - scm: - akraino-lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' @@ -265,6 +129,35 @@ submodule-disable: false choosing-strategy: default basedir: 'installer' + +- 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-installer-verify-binary + name: '{project-name}-verify-binary' + <<: *kni_common + build-node: centos7-builder-8c-8g + + gerrit_trigger_file_paths: + - compare-type: ANT + pattern: 'Makefile' + - compare-type: ANT + pattern: 'cmd/binary.go' + triggers: - gerrit: server-name: '{gerrit-server-name}' @@ -277,6 +170,44 @@ branch-pattern: '**/{branch}' file-paths: '{obj:gerrit_trigger_file_paths}' + builders: + - lf-infra-pre-build + - shell: !include-raw-escape: + - ../shell/install_go.sh + - shell: !include-raw-escape: + - ../shell/build_kni_binary.sh + +- job-template: + id: kni-installer-publish-openshift-install-libvirt-binary + name: '{project-name}-publish-openshift-install-libvirt-binary' + <<: *kni_common + build-node: centos7-builder-8c-8g + + gerrit_trigger_file_paths: [] + gerrit_build_triggers: + - comment-added-contains-event: + comment-contains-value: '^build-binary' + builders: + - lf-infra-pre-build + - shell: !include-raw-escape: + - ../shell/install_go.sh + - shell: !include-raw-escape: + - ../shell/build_openshift_install_libvirt_binary.sh + +- job-template: + id: kni-verify-deploy-aws + name: 'kni-{project-name}-verify-deploy-aws' + build-node: kni-libvirt + <<: *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: @@ -287,55 +218,11 @@ - ../shell/install_go.sh - shell: ./installer/ci/kni_deploy_aws.sh - publishers: - - lf-infra-publish - - job-template: id: kni-verify-deploy-libvirt name: 'kni-{project-name}-verify-deploy-libvirt' - - ###################### - # Default parameters # - ###################### - - build-days-to-keep: 30 - build-timeout: 60 build-node: kni-libvirt - submodule-recursive: true - - ##################### - # 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}' - - string: - name: ARCHIVE_ARTIFACTS - default: '{archive-artifacts}' - description: Artifacts to archive to the logs server. - - archive-artifacts: > - **/*.log - - 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 + <<: *kni_common_deploy gerrit_trigger_file_paths: - compare-type: ANT @@ -345,38 +232,44 @@ - compare-type: ANT pattern: 'base/**' - 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)$' + 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: !include-raw-escape: + - ../shell/install_go.sh + - shell: ./installer/ci/kni_deploy_libvirt.sh - 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}' +- 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: '{git-url}/{project}.git' + git-url: 'https://github.com/yrobla/testing.baremetal.edge-sites.net' refspec: '$GERRIT_REFSPEC' branch: '$GERRIT_BRANCH' submodule-recursive: '{submodule-recursive}' submodule-timeout: '{submodule-timeout}' submodule-disable: false choosing-strategy: default - basedir: '{project-name}' + basedir: 'testing.baremetal.edge-sites.net' - akraino-lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' git-url: '{git-url}/kni/installer.git' @@ -387,6 +280,7 @@ submodule-disable: false choosing-strategy: default basedir: 'installer' + builders: - lf-infra-pre-build - config-file-provider: @@ -395,81 +289,4 @@ target: akraino-secrets/coreos-pull-secret - file-id: kni-ssh-pub-key target: akraino-secrets/ssh-pub-key - - shell: !include-raw-escape: - - ../shell/install_go.sh - - shell: ./installer/ci/kni_deploy_libvirt.sh - - publishers: - - lf-infra-publish - -- job-template: - id: kni-installer-publish-openshift-install-libvirt-binary - name: '{project-name}-publish-openshift-install-libvirt-binary' - - ###################### - # Default parameters # - ###################### - - build-days-to-keep: 200 - build-timeout: 60 - build-node: centos7-builder-8c-8g - submodule-recursive: true - - ##################### - # 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}' - - gerrit_build_triggers: - - comment-added-contains-event: - comment-contains-value: '^build-binary' - - 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 - - triggers: - - gerrit: - server-name: '{gerrit-server-name}' - trigger-on: '{obj:gerrit_build_triggers}' - projects: - - project-compare-type: ANT - project-pattern: '{project}' - branches: - - branch-compare-type: ANT - branch-pattern: '**/{branch}' - - builders: - - lf-infra-pre-build - - shell: !include-raw-escape: - - ../shell/install_go.sh - - shell: !include-raw-escape: - - ../shell/build_openshift_install_libvirt_binary.sh - - publishers: - - lf-infra-publish + - shell: sudo -E ./installer/ci/kni_deploy_baremetal.sh diff --git a/jjb/kni/kni_installer.yaml b/jjb/kni/kni_installer.yaml index f3b41ff..82da1bd 100644 --- a/jjb/kni/kni_installer.yaml +++ b/jjb/kni/kni_installer.yaml @@ -19,6 +19,7 @@ jobs: - kni-verify-deploy-aws - kni-verify-deploy-libvirt + - kni-verify-deploy-baremetal - project: name: kni-blueprint-basic-3-masters @@ -29,3 +30,4 @@ jobs: - kni-verify-deploy-aws - kni-verify-deploy-libvirt + - kni-verify-deploy-baremetal