From: Eric Ball Date: Mon, 20 Jan 2020 20:16:14 +0000 (+0000) Subject: Merge "[validation] Disable jobs for tag" X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ci-management.git;a=commitdiff_plain;h=cbe0c7f9bbfdcc4171a9a69a0390cd720e3d2a2b;hp=0646001ff141372c25dda0863f819b31ba40e409 Merge "[validation] Disable jobs for tag" --- diff --git a/jjb/addon-onap/info-addon-onap.yaml b/jjb/addon-onap/info-addon-onap.yaml new file mode 100644 index 0000000..36a48b9 --- /dev/null +++ b/jjb/addon-onap/info-addon-onap.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: addon-onap-info + project-name: addon-onap + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: addon-onap + branch: master diff --git a/jjb/addon-snappy/info-addon-snappy.yaml b/jjb/addon-snappy/info-addon-snappy.yaml new file mode 100644 index 0000000..186939d --- /dev/null +++ b/jjb/addon-snappy/info-addon-snappy.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: addon-snappy-info + project-name: addon-snappy + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: addon-snappy + branch: master diff --git a/jjb/aiedge/info-aiedge.yaml b/jjb/aiedge/info-aiedge.yaml new file mode 100644 index 0000000..6761cc1 --- /dev/null +++ b/jjb/aiedge/info-aiedge.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: aiedge-info + project-name: aiedge + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: aiedge + branch: master diff --git a/jjb/airshipinabottle_deploy/info-airshipinabottle_deploy.yaml b/jjb/airshipinabottle_deploy/info-airshipinabottle_deploy.yaml new file mode 100644 index 0000000..c7ffa94 --- /dev/null +++ b/jjb/airshipinabottle_deploy/info-airshipinabottle_deploy.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: airshipinabottle_deploy-info + project-name: airshipinabottle_deploy + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: airshipinabottle_deploy + branch: master diff --git a/jjb/akraino-templates/akraino-icn-templates.yaml b/jjb/akraino-templates/akraino-icn-templates.yaml new file mode 100644 index 0000000..9b2953c --- /dev/null +++ b/jjb/akraino-templates/akraino-icn-templates.yaml @@ -0,0 +1,133 @@ +--- +# +# Copyright (c) 2019 Intel Corporation. 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. +# + +- daaas_job_boiler_plate: &daaas_job_boiler_plate + name: daaas_job_boiler_plate + archive-artifacts: > + **/*.log + build-days-to-keep: 30 + build-timeout: 60 + stream: master + project-type: freestyle + submodule-recursive: true + concurrent: true + node: "{build-node}" + + properties: + - lf-infra-properties: + build-days-to-keep: "{build-days-to-keep}" + + parameters: + - lf-infra-parameters: + project: "{project}" + stream: "{stream}" + branch: "{branch}" + 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}" + + 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: "gerrit" + + builders: + - shell: "{obj:script}" + + publishers: + - lf-infra-publish + +################# +# JOB TEMPLATES # +################# +- job-template: + # Job template for verify jobs + + name: "{project-name}-{stream}-{type}-verify" + <<: *daaas_job_boiler_plate + + triggers: + - gerrit: + server-name: "{gerrit-server-name}" + trigger-on: + - patchset-created-event: + exclude-drafts: "false" + exclude-trivial-rebase: "false" + exclude-no-code-change: "false" + - draft-published-event + - comment-added-contains-event: + comment-contains-value: "recheck" + - comment-added-contains-event: + comment-contains-value: "reverify" + projects: + - project-compare-type: "ANT" + project-pattern: "{project}" + branches: + - branch-compare-type: "ANT" + branch-pattern: "**/{branch}" + file-paths: + - compare-type: REG_EXP + pattern: ".*/?{path}/.*" + disable-strict-forbidden-file-verification: "true" + forbidden-file-paths: + - compare-type: ANT + pattern: "docs/**" + readable-message: true + +- job-template: + # Job template for merge jobs + + name: "{project-name}-{stream}-{type}-merge" + <<: *daaas_job_boiler_plate + + gerrit_merge_triggers: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: remerge$ + + triggers: + - gerrit: + server-name: "{gerrit-server-name}" + trigger-on: "{obj:gerrit_merge_triggers}" + projects: + - project-compare-type: "ANT" + project-pattern: "{project}" + branches: + - branch-compare-type: "ANT" + branch-pattern: "**/{branch}" + file-paths: + - compare-type: REG_EXP + pattern: ".*/?{path}/.*" + disable-strict-forbidden-file-verification: "true" + forbidden-file-paths: + - compare-type: ANT + pattern: "docs/**" + readable-message: true 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/akraino-templates/akraino-validation-templates.yaml b/jjb/akraino-templates/akraino-validation-templates.yaml index e8c96b4..b34638e 100644 --- a/jjb/akraino-templates/akraino-validation-templates.yaml +++ b/jjb/akraino-templates/akraino-validation-templates.yaml @@ -21,7 +21,7 @@ use-build-blocker: true blocking-jobs: - 'validation-docker-.*' - blocking-level: 'NODE' + block-level: 'NODE' scm: - validation-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' @@ -78,7 +78,7 @@ use-build-blocker: true blocking-jobs: - 'validation-docker-build-.*' - blocking-level: 'NODE' + block-level: 'NODE' scm: - validation-infra-gerrit-scm: jenkins-ssh-credential: '{jenkins-ssh-credential}' diff --git a/jjb/camunda_workflow/info-camunda_workflow.yaml b/jjb/camunda_workflow/info-camunda_workflow.yaml new file mode 100644 index 0000000..675cb75 --- /dev/null +++ b/jjb/camunda_workflow/info-camunda_workflow.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: camunda_workflow-info + project-name: camunda_workflow + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: camunda_workflow + branch: master diff --git a/jjb/chomp/info-chomp.yaml b/jjb/chomp/info-chomp.yaml new file mode 100644 index 0000000..a55c7b2 --- /dev/null +++ b/jjb/chomp/info-chomp.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: chomp-info + project-name: chomp + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: chomp + branch: master diff --git a/jjb/connected-vehicle/info-connected-vehicle.yaml b/jjb/connected-vehicle/info-connected-vehicle.yaml new file mode 100644 index 0000000..9542f10 --- /dev/null +++ b/jjb/connected-vehicle/info-connected-vehicle.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: connected-vehicle-info + project-name: connected-vehicle + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: connected-vehicle + branch: master diff --git a/jjb/eliot/info-eliot.yaml b/jjb/eliot/info-eliot.yaml new file mode 100644 index 0000000..2ac98c3 --- /dev/null +++ b/jjb/eliot/info-eliot.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: eliot-info + project-name: eliot + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: eliot + branch: master diff --git a/jjb/evp/info-evp.yaml b/jjb/evp/info-evp.yaml new file mode 100644 index 0000000..65665cb --- /dev/null +++ b/jjb/evp/info-evp.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: evp-info + project-name: evp + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: evp + branch: master diff --git a/jjb/icn-daaas/icn-daaas.yaml b/jjb/icn/icn-daaas.yaml similarity index 64% rename from jjb/icn-daaas/icn-daaas.yaml rename to jjb/icn/icn-daaas.yaml index 332c4aa..6bbcbd3 100644 --- a/jjb/icn-daaas/icn-daaas.yaml +++ b/jjb/icn/icn-daaas.yaml @@ -19,11 +19,25 @@ name: icn-daaas project: 'icn/daaas' project-name: icn-daaas - build-node: icn-dev + build-node: ubuntu1804-helm-8c-32g stream: - master: branch: master + type: + - golang: + path: microservices + script: |- + #!/bin/bash + cd $WORKSPACE/microservices + make all + - helm: + path: deploy + script: |- + #!/bin/bash + cd $WORKSPACE/deploy + make all jobs: - - akraino-project-stream-verify + - "{project-name}-{stream}-{type}-verify" + - "{project-name}-{stream}-{type}-merge" views: - project-view diff --git a/jjb/icn/info-icn.yaml b/jjb/icn/info-icn.yaml new file mode 100644 index 0000000..8a81a52 --- /dev/null +++ b/jjb/icn/info-icn.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: icn-info + project-name: icn + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: icn + branch: master diff --git a/jjb/iec/iec.yaml b/jjb/iec/iec.yaml index 86752e1..5b8db9f 100644 --- a/jjb/iec/iec.yaml +++ b/jjb/iec/iec.yaml @@ -73,6 +73,33 @@ - 'iec-{iecType}-deploy-{installer}-{deploy_type}-{os}-daily-{stream}' - 'iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}' - 'iec-{iecType}-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}' + - gerrit-sonar: + sonar-project-file: "" + build-node: centos7-builder-2c-1g + sonar-properties: | + # Required metadata + sonar.projectKey=iec + sonar.projectName=iec + sonar.organization=akraino-edge-stack + + #Source + sonar.sources=. + sonar.exclusions=**/*_test.go,**/vendor/** + + # Language + sonar.language=go + + # Encoding + sonar.build.sourceEncoding=UTF-8 + + # Inclusions + sonar.inclusions=**/**.go + + # Test Execution + sonar.tests=. + sonar.test.inclusions=**/*_test.go + sonar.test.exclusions=**/vendor/** + ############## # PARAMETERS # @@ -169,7 +196,7 @@ blocking-jobs: - '.*-fuel-{deploy_type}-.*' - '.*-compass-{deploy_type}-.*' - blocking-level: 'NODE' + block-level: 'NODE' wrappers: - build-name: @@ -246,7 +273,7 @@ - '.*-{iecType}-deploy-{installer}-{deploy_type}-.*' - '.*-{iecType}-destroy-{installer}-{deploy_type}-.*' - '.*-{iecType}-install-.*-{installer}-{deploy_type}-.*' - blocking-level: 'NODE' + block-level: 'NODE' parameters: - lf-infra-parameters: @@ -370,6 +397,7 @@ publishers: *publishers + ######################## # trigger macros ######################## diff --git a/jjb/iec/info-iec.yaml b/jjb/iec/info-iec.yaml new file mode 100644 index 0000000..9046591 --- /dev/null +++ b/jjb/iec/info-iec.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: iec-info + project-name: iec + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: iec + branch: master diff --git a/jjb/kni/info-kni.yaml b/jjb/kni/info-kni.yaml new file mode 100644 index 0000000..f5192ec --- /dev/null +++ b/jjb/kni/info-kni.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: kni-info + project-name: kni + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: kni + branch: master 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 diff --git a/jjb/mec-api-framework/info-mec-api-framework.yaml b/jjb/mec-api-framework/info-mec-api-framework.yaml new file mode 100644 index 0000000..d0feec8 --- /dev/null +++ b/jjb/mec-api-framework/info-mec-api-framework.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: mec-api-framework-info + project-name: mec-api-framework + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: mec-api-framework + branch: master diff --git a/jjb/nc/info-nc.yaml b/jjb/nc/info-nc.yaml new file mode 100644 index 0000000..f5acd74 --- /dev/null +++ b/jjb/nc/info-nc.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: nc-info + project-name: nc + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: nc + branch: master diff --git a/jjb/ovs-dpdk-airship/info-ovs-dpdk-airship.yaml b/jjb/ovs-dpdk-airship/info-ovs-dpdk-airship.yaml new file mode 100644 index 0000000..9757c49 --- /dev/null +++ b/jjb/ovs-dpdk-airship/info-ovs-dpdk-airship.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: ovs-dpdk-airship-info + project-name: ovs-dpdk-airship + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: ovs-dpdk-airship + branch: master diff --git a/jjb/portal/info-portal.yaml b/jjb/portal/info-portal.yaml new file mode 100644 index 0000000..9d04cd9 --- /dev/null +++ b/jjb/portal/info-portal.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: portal-info + project-name: portal + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: portal + branch: master diff --git a/jjb/portal_user_interface/info-portal_user_interface.yaml b/jjb/portal_user_interface/info-portal_user_interface.yaml new file mode 100644 index 0000000..a34ae1e --- /dev/null +++ b/jjb/portal_user_interface/info-portal_user_interface.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: portal_user_interface-info + project-name: portal_user_interface + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: portal_user_interface + branch: master diff --git a/jjb/postgres_db_schema/info-postgres_db_schema.yaml b/jjb/postgres_db_schema/info-postgres_db_schema.yaml new file mode 100644 index 0000000..9d0bc74 --- /dev/null +++ b/jjb/postgres_db_schema/info-postgres_db_schema.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: postgres_db_schema-info + project-name: postgres_db_schema + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: postgres_db_schema + branch: master diff --git a/jjb/rec/info-rec.yaml b/jjb/rec/info-rec.yaml new file mode 100644 index 0000000..b6ddb55 --- /dev/null +++ b/jjb/rec/info-rec.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: rec-info + project-name: rec + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: rec + branch: master diff --git a/jjb/redfish/info-redfish.yaml b/jjb/redfish/info-redfish.yaml new file mode 100644 index 0000000..acd0306 --- /dev/null +++ b/jjb/redfish/info-redfish.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: redfish-info + project-name: redfish + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: redfish + branch: master diff --git a/jjb/regional_controller/info-regional_controller.yaml b/jjb/regional_controller/info-regional_controller.yaml new file mode 100644 index 0000000..5752ef2 --- /dev/null +++ b/jjb/regional_controller/info-regional_controller.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: regional_controller-info + project-name: regional_controller + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: regional_controller + branch: master diff --git a/jjb/remote-server-os-bootstrap/info-remote-server-os-bootstrap.yaml b/jjb/remote-server-os-bootstrap/info-remote-server-os-bootstrap.yaml new file mode 100644 index 0000000..03b2903 --- /dev/null +++ b/jjb/remote-server-os-bootstrap/info-remote-server-os-bootstrap.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: remote-server-os-bootstrap-info + project-name: remote-server-os-bootstrap + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: remote-server-os-bootstrap + branch: master diff --git a/jjb/repo-beta/info-repo-beta.yaml b/jjb/repo-beta/info-repo-beta.yaml new file mode 100644 index 0000000..d83f54f --- /dev/null +++ b/jjb/repo-beta/info-repo-beta.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: repo-beta-info + project-name: repo-beta + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: repo-beta + branch: master diff --git a/jjb/sample_vnf/info-sample_vnf.yaml b/jjb/sample_vnf/info-sample_vnf.yaml new file mode 100644 index 0000000..d9fb428 --- /dev/null +++ b/jjb/sample_vnf/info-sample_vnf.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: sample_vnf-info + project-name: sample_vnf + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: sample_vnf + branch: master diff --git a/jjb/serverless/info-serverless.yaml b/jjb/serverless/info-serverless.yaml new file mode 100644 index 0000000..732d0b2 --- /dev/null +++ b/jjb/serverless/info-serverless.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: serverless-info + project-name: serverless + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: serverless + branch: master diff --git a/jjb/shell/run_bluval.sh b/jjb/shell/run_bluval.sh index c701b0f..cc88171 100755 --- a/jjb/shell/run_bluval.sh +++ b/jjb/shell/run_bluval.sh @@ -10,6 +10,7 @@ set -e set -o errexit set -o pipefail +export PATH=$PATH:/home/jenkins/.local/bin cwd=$(pwd) current_user=$(whoami) @@ -19,6 +20,10 @@ info () { logger -s -t "run_blu_val.info" "$*" } +has_substring() { + [ "$1" != "${2/$1/}" ] +} + change_res_owner() { # change owner of results created by root in container if [ -d "$results_dir" ] @@ -28,8 +33,8 @@ change_res_owner() { } usage() { - echo "usage: $0 -n " >&2 - echo "[-r results dir">&2 + echo "usage: $0" >&2 + echo "[-n ">&2 echo "[-b blueprint definition">&2 echo "[-k k8s config dir">&2 echo "[-j k8s master">&2 @@ -67,7 +72,6 @@ while getopts "j:k:u:s:b:l:r:n:ov:" optchar; do s) ssh_key=${OPTARG} ;; b) blueprint_yaml=${OPTARG} ;; l) blueprint_layer=${OPTARG} ;; - r) results_dir=${OPTARG} ;; n) blueprint_name=${OPTARG} ;; u) sh_user=${OPTARG} ;; o) is_optional="true" ;; @@ -80,6 +84,7 @@ while getopts "j:k:u:s:b:l:r:n:ov:" optchar; do done # Blueprint name is mandatory +blueprint_name=${blueprint_name:-$BLUEPRINT} if [ -z "$blueprint_name" ] then usage @@ -97,7 +102,7 @@ mkdir -p "$k8s_config_dir" # Testing configuration version=${version:-$VERSION} -results_dir=${results_dir:-$cwd/results} +results_dir=$cwd/results k8s_master=${k8s_master:-$K8S_MASTER_IP} ssh_user=${sh_user:-$K8S_SSH_USER} blueprint_layer=${blueprint_layer:-$LAYER} @@ -121,19 +126,14 @@ then fi fi -if [ ! -d "$cwd/validation" ] -then - git clone http://gerrit.akraino.org/r/validation -fi - if [[ -n $blueprint_yaml ]] then - cp "$blueprint_yaml" ./validation/bluval/ + cp "$blueprint_yaml" ./bluval/ fi -volumes_path="$cwd/validation/bluval/volumes.yaml" +volumes_path="$cwd/bluval/volumes.yaml" #update information in volumes yaml -sed -i -e "/kube_config_dir/{n; s@local: ''@local: '$k8s_config_dir'@}" -e "/blueprint_dir/{n; s@local: ''@local: '$cwd/validation/bluval/'@}" -e "/results_dir/{n; s@local: ''@local: '$results_dir'@}" "$volumes_path" +sed -i -e "/kube_config_dir/{n; s@local: ''@local: '$k8s_config_dir'@}" -e "/blueprint_dir/{n; s@local: ''@local: '$cwd/bluval/'@}" -e "/results_dir/{n; s@local: ''@local: '$results_dir'@}" "$volumes_path" if [[ -n $blueprint_layer ]] then @@ -144,16 +144,32 @@ then options+=" -o" fi +printf 'ok / PASS /\nerror / FAIL /\n' > ./bluval/rules.txt + set +e # even if the script fails we need to change the owner of results # shellcheck disable=SC2086 -python3 validation/bluval/blucon.py $options "$blueprint_name" +python3 bluval/blucon.py $options "$blueprint_name" if [ $? -ne 0 ]; then change_res_owner - error "Bluval validation failed!" + error "Bluval validation FAIL " fi - set -e change_res_owner +if has_substring "$NODE_NAME" "snd-" +then + echo "In sandbox the logs are not pushed" +else + TIMESTAMP=$(date +'%Y%m%d-%H%M%S') + NEXUS_URL=https://nexus.akraino.org/ + NEXUS_PATH="${LAB_SILO}/bluval_results/${blueprint_name}/${VERSION}/${TIMESTAMP}" + BUILD_URL="${JENKINS_HOSTNAME}/job/${JOB_NAME}/${BUILD_NUMBER}/" + zip -r results.zip ./results + lftools deploy nexus-zip "$NEXUS_URL" logs "$NEXUS_PATH" results.zip +fi + +rm results.zip +rm -f ~/.netrc + diff --git a/jjb/starlingx/info-starlingx.yaml b/jjb/starlingx/info-starlingx.yaml new file mode 100644 index 0000000..072d4ec --- /dev/null +++ b/jjb/starlingx/info-starlingx.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: starlingx-info + project-name: starlingx + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: starlingx + branch: master diff --git a/jjb/ta/info-ta.yaml b/jjb/ta/info-ta.yaml new file mode 100644 index 0000000..b72d743 --- /dev/null +++ b/jjb/ta/info-ta.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: ta-info + project-name: ta + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: ta + branch: master diff --git a/jjb/tc/info-tc.yaml b/jjb/tc/info-tc.yaml new file mode 100644 index 0000000..7e07c4b --- /dev/null +++ b/jjb/tc/info-tc.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: tc-info + project-name: tc + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: tc + branch: master diff --git a/jjb/test_automation/info-test_automation.yaml b/jjb/test_automation/info-test_automation.yaml new file mode 100644 index 0000000..bc8b29b --- /dev/null +++ b/jjb/test_automation/info-test_automation.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: test_automation-info + project-name: test_automation + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: test_automation + branch: master diff --git a/jjb/umec/info-umec.yaml b/jjb/umec/info-umec.yaml new file mode 100644 index 0000000..190bdee --- /dev/null +++ b/jjb/umec/info-umec.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: umec-info + project-name: umec + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: umec + branch: master diff --git a/jjb/validation/bluval.yaml b/jjb/validation/bluval.yaml index 5933498..b052789 100644 --- a/jjb/validation/bluval.yaml +++ b/jjb/validation/bluval.yaml @@ -66,6 +66,14 @@ name: OPTIONAL default: '' description: 'If set to yes run optional tests' + - string: + name: LAB_SILO + default: '' + description: 'Folder in nexus where the logs are pushed.' + - string: + name: SETTINGS_FILE + default: '/home/jenkins/settings.xml' + description: 'Path to credentials file' - job-template: name: 'bluval-daily-{stream}' @@ -81,7 +89,7 @@ scm: - git: credentials-id: '{jenkins-ssh-credential}' - url: '{git-url}/ci-management.git' + url: '{git-url}/validation.git' refspec: '' branches: - 'refs/heads/{branch}' @@ -93,8 +101,18 @@ timeout: '{submodule-timeout}' choosing-strategy: default - builders: - description-setter: description: "POD: $NODE_NAME" - - shell: ./jjb/shell/run_bluval.sh -n "$BLUEPRINT" + - lf-infra-create-netrc: + server-id: logs + - shell: !include-raw-escape: + - ../shell/run_bluval.sh + + publishers: + - logparser: + use-project-rules: true + parse-rules: "./bluval/rules.txt" + unstable-on-warning: true + fail-on-error: true + show-graphs: false diff --git a/jjb/validation/info-validation.yaml b/jjb/validation/info-validation.yaml new file mode 100644 index 0000000..132229d --- /dev/null +++ b/jjb/validation/info-validation.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: validation-info + project-name: validation + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: validation + branch: master diff --git a/jjb/validation/lab.yaml b/jjb/validation/lab.yaml index 1a00f9b..c163199 100644 --- a/jjb/validation/lab.yaml +++ b/jjb/validation/lab.yaml @@ -60,5 +60,7 @@ builders: - trigger-builds: - project: 'bluval-daily-{stream}' + predefined-parameters: + LAB_SILO={validation_lab} same-node: true current-parameters: true diff --git a/jjb/yaml_builds/info-yaml_builds.yaml b/jjb/yaml_builds/info-yaml_builds.yaml new file mode 100644 index 0000000..0f106b9 --- /dev/null +++ b/jjb/yaml_builds/info-yaml_builds.yaml @@ -0,0 +1,9 @@ +--- +- project: + name: yaml_builds-info + project-name: yaml_builds + build-node: centos7-builder-2c-1g + jobs: + - gerrit-info-yaml-verify + project: yaml_builds + branch: master