X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ci-management.git;a=blobdiff_plain;f=jjb%2Fakraino-templates%2Fakraino-jjb-kni.yaml;h=1f64bcc872001c591603292cbc8b0c6efe4fb240;hp=b26f33c9c2c53af1b984bde6e82096c5a6523ff6;hb=cbe0c7f9bbfdcc4171a9a69a0390cd720e3d2a2b;hpb=9a26829277b790cf933ae1f20ba6e61c46b0d2d1 diff --git a/jjb/akraino-templates/akraino-jjb-kni.yaml b/jjb/akraino-templates/akraino-jjb-kni.yaml index b26f33c..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,40 +80,14 @@ - 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}' +- kni_common_deploy: &kni_common_deploy + name: kni-common-deploy + <<: *kni_common + archive-artifacts: > + **/*.log parameters: - lf-infra-parameters: @@ -126,29 +95,21 @@ 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}' - - gerrit_trigger_file_paths: - - compare-type: REG_EXP - pattern: 'Makefile' - - compare-type: REG_EXP - 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)$' - + - credentials-binding: + - ssh-user-private-key: + credential-id: kni-secrets + key-file-variable: KNI_KEY_PATH scm: - - lf-infra-gerrit-scm: + - akraino-lf-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' git-url: '{git-url}/{project}.git' refspec: '$GERRIT_REFSPEC' @@ -157,6 +118,45 @@ 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' + +- 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: @@ -177,96 +177,37 @@ - shell: !include-raw-escape: - ../shell/build_kni_binary.sh - publishers: - - lf-infra-publish - - job-template: - id: kni-blueprint-pae-verify-deploy-aws - name: '{project-name}-verify-deploy-aws' + id: kni-installer-publish-openshift-install-libvirt-binary + name: '{project-name}-publish-openshift-install-libvirt-binary' + <<: *kni_common + build-node: centos7-builder-8c-8g - ###################### - # Default parameters # - ###################### + 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 - build-days-to-keep: 30 - build-timeout: 60 +- job-template: + id: kni-verify-deploy-aws + name: 'kni-{project-name}-verify-deploy-aws' 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}' - - 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 + <<: *kni_common_deploy gerrit_trigger_file_paths: - - compare-type: REG_EXP + - compare-type: ANT pattern: 'profiles/production.aws/**' - - compare-type: REG_EXP + - compare-type: ANT pattern: 'sites/testing.aws.edge-sites.net/**' - - compare-type: REG_EXP + - 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: - - 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 - config-file-provider: @@ -275,99 +216,22 @@ target: akraino-secrets/coreos-pull-secret - shell: !include-raw-escape: - ../shell/install_go.sh - - shell: !include-raw-escape: - - ../shell/kni_deploy_aws.sh - - publishers: - - lf-infra-publish + - shell: ./installer/ci/kni_deploy_aws.sh - job-template: - id: kni-blueprint-pae-verify-deploy-libvirt - name: '{project-name}-verify-deploy-libvirt' - - ###################### - # Default parameters # - ###################### - - build-days-to-keep: 30 - build-timeout: 60 + id: kni-verify-deploy-libvirt + name: 'kni-{project-name}-verify-deploy-libvirt' 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: REG_EXP + - compare-type: ANT pattern: 'profiles/testing.libvirt/**' - - compare-type: REG_EXP + - compare-type: ANT pattern: 'sites/testing.virt.edge-sites.net/**' - - compare-type: REG_EXP + - 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)$' - - 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}' - - 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 - builders: - lf-infra-pre-build - config-file-provider: @@ -378,80 +242,51 @@ target: akraino-secrets/ssh-pub-key - shell: !include-raw-escape: - ../shell/install_go.sh - - shell: !include-raw-escape: - - ../shell/kni_deploy_libvirt.sh - - publishers: - - lf-infra-publish + - shell: ./installer/ci/kni_deploy_libvirt.sh - 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}' + id: kni-verify-deploy-baremetal + name: 'kni-{project-name}-verify-deploy-baremetal' + <<: *kni_common_deploy + build-timeout: 120 + build-node: kni-baremetal - gerrit_build_triggers: - - comment-added-contains-event: - comment-contains-value: '^build-binary' + 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: - - lf-infra-gerrit-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 - - 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}' + basedir: 'testing.baremetal.edge-sites.net' + - 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 - - shell: !include-raw-escape: - - ../shell/install_go.sh - - shell: !include-raw-escape: - - ../shell/build_openshift_install_libvirt_binary.sh - - publishers: - - lf-infra-publish + - 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