From: Fatih Degirmenci Date: Wed, 3 Apr 2019 18:18:28 +0000 (-0700) Subject: Adapt jobs to integrate yardstick X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=429341c4940e4294de7076d8f01f42efa0990856;p=infra%2Fcicd.git Adapt jobs to integrate yardstick Integrating yardstick requires all jobs to be adapted accordingly. - cloud-infra-test.sh: we now started using arguments to set values explicitly. - cloud-infra-periodic-engine.yaml: periodic runs now include yardstick as well. it is ok to run yardstick kubernetes testing but it will probably not work with an openstack deployment due to lower performance of virtual deployments. - cloud-infra-verify-engine.yaml: additional parameters are declared to set variables explictly. - cloud-infra-verify-test.yaml: we now verify changes coming to infra/test repo for both of the test frameworks, functest and yardstick, to ensure changes do not cause problems for any of these. Change-Id: I2ec82bc7c0424ca190dcf51d032eec5e52855062 --- diff --git a/jjb/cloud-infra/cloud-infra-periodic-engine.yaml b/jjb/cloud-infra/cloud-infra-periodic-engine.yaml index 64a2d0de5..9565febda 100644 --- a/jjb/cloud-infra/cloud-infra-periodic-engine.yaml +++ b/jjb/cloud-infra/cloud-infra-periodic-engine.yaml @@ -64,7 +64,8 @@ phase: - deploy - - test + - functest + - yardstick jobs: - 'cloud-infra-periodic-engine-{os}-{type}-{stream}' @@ -108,6 +109,14 @@ name: DIB_OS_ELEMENT default: '{dib_os_element}' description: 'DIB OS Element to use for building the deployment image to provision target nodes with' + - string: + name: DEPLOY_SCENARIO + default: 'k8-calico-nofeature' + description: 'Scenario to deploy and test' + - string: + name: TEST_SUITE + default: 'healthcheck' + description: 'Test suite to run' - string: name: CLEANUP default: 'true' @@ -157,27 +166,40 @@ IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT DIB_OS_RELEASE=$DIB_OS_RELEASE DIB_OS_ELEMENT=$DIB_OS_ELEMENT + DEPLOY_SCENARIO=$DEPLOY_SCENARIO CLEANUP=$CLEANUP git-revision: true node-parameters: true kill-phase-on: FAILURE abort-all-job: true - multijob: - name: test - condition: SUCCESSFUL + name: functest + condition: ALWAYS projects: - - name: 'cloud-infra-periodic-{os}-test-{type}-{stream}' + - name: 'cloud-infra-periodic-{os}-functest-{type}-{stream}' current-parameters: true predefined-parameters: | DISTRIBUTION=$DISTRIBUTION - USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE - IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT - DIB_OS_RELEASE=$DIB_OS_RELEASE - DIB_OS_ELEMENT=$DIB_OS_ELEMENT + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + TEST_SUITE=$TEST_SUITE CLEANUP=$CLEANUP node-parameters: true - kill-phase-on: test - abort-all-job: true + kill-phase-on: NEVER + abort-all-job: false + - multijob: + name: yardstick + condition: ALWAYS + projects: + - name: 'cloud-infra-periodic-{os}-yardstick-{type}-{stream}' + current-parameters: true + predefined-parameters: | + DISTRIBUTION=$DISTRIBUTION + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + TEST_SUITE=$TEST_SUITE + CLEANUP=$CLEANUP + node-parameters: true + kill-phase-on: NEVER + abort-all-job: false - job-template: name: 'cloud-infra-periodic-{os}-{phase}-{type}-{stream}' @@ -213,6 +235,18 @@ name: DIB_OS_ELEMENT default: 'ubuntu-minimal' description: 'DIB OS Element to use for building the deployment image to provision target nodes with. Overriden by upstream job.' + - string: + name: DEPLOY_SCENARIO + default: 'k8-calico-nofeature' + description: 'Scenario to deploy and test' + - string: + name: TEST_FW + default: '{phase}' + description: 'Test framework to use' + - string: + name: TEST_SUITE + default: 'healthcheck' + description: 'Test suite to run' - string: name: TEST_REPO_URL default: 'https://gerrit.nordix.org/infra/test.git' @@ -233,7 +267,7 @@ refspec: '' builders: - - 'cloud-infra-periodic-{phase}-macro' + - 'cloud-infra-periodic-test-macro' # ------------------------------- # builder macros diff --git a/jjb/cloud-infra/cloud-infra-test.sh b/jjb/cloud-infra/cloud-infra-test.sh index 952a7fd15..2b85f0ddb 100644 --- a/jjb/cloud-infra/cloud-infra-test.sh +++ b/jjb/cloud-infra/cloud-infra-test.sh @@ -28,8 +28,8 @@ set -o pipefail # Logic in this script should be kept at minimum and the changes should be pushed into # the cloud infra test test.sh script. -# execute cloud engine test.sh script +# execute cloud engine test.sh script with arguments cd $WORKSPACE -./test/test.sh +./test/test.sh -c -f $TEST_FW -t $TEST_SUITE -s $DEPLOY_SCENARIO # vim: set ts=2 sw=2 expandtab: diff --git a/jjb/cloud-infra/cloud-infra-verify-engine.yaml b/jjb/cloud-infra/cloud-infra-verify-engine.yaml index 922bdfb6b..cf0fcbbd9 100644 --- a/jjb/cloud-infra/cloud-infra-verify-engine.yaml +++ b/jjb/cloud-infra/cloud-infra-verify-engine.yaml @@ -71,7 +71,7 @@ phase: - deploy - - test + - functest jobs: - 'cloud-infra-verify-engine-{os}-{type}-{stream}' @@ -115,6 +115,14 @@ name: DIB_OS_ELEMENT default: '{dib_os_element}' description: 'DIB OS Element to use for building the deployment image to provision target nodes with' + - string: + name: DEPLOY_SCENARIO + default: 'k8-calico-nofeature' + description: 'Scenario to deploy and test' + - string: + name: TEST_SUITE + default: 'healthcheck' + description: 'Test suite to run' - string: name: CLEANUP default: 'true' @@ -177,10 +185,10 @@ kill-phase-on: FAILURE abort-all-job: true - multijob: - name: test + name: functest condition: SUCCESSFUL projects: - - name: 'cloud-infra-verify-{os}-test-{type}-{stream}' + - name: 'cloud-infra-verify-{os}-functest-{type}-{stream}' current-parameters: true predefined-parameters: | DISTRIBUTION=$DISTRIBUTION @@ -188,6 +196,8 @@ IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT DIB_OS_RELEASE=$DIB_OS_RELEASE DIB_OS_ELEMENT=$DIB_OS_ELEMENT + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + TEST_SUITE=$TEST_SUITE CLEANUP=$CLEANUP GERRIT_PROJECT=$GERRIT_PROJECT GERRIT_BRANCH=$GERRIT_BRANCH @@ -195,7 +205,7 @@ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE node-parameters: true - kill-phase-on: test + kill-phase-on: FAILURE abort-all-job: true - job-template: @@ -232,6 +242,18 @@ name: DIB_OS_ELEMENT default: 'ubuntu-minimal' description: 'DIB OS Element to use for building the deployment image to provision target nodes with. Overriden by upstream job.' + - string: + name: DEPLOY_SCENARIO + default: 'k8-calico-nofeature' + description: 'Scenario to deploy and test' + - string: + name: TEST_FW + default: '{phase}' + description: 'Test framework to use' + - string: + name: TEST_SUITE + default: 'healthcheck' + description: 'Test suite to run' - string: name: TEST_REPO_URL default: 'https://gerrit.nordix.org/infra/test.git' @@ -252,7 +274,7 @@ refspec: $GERRIT_REFSPEC builders: - - 'cloud-infra-verify-{phase}-macro' + - 'cloud-infra-verify-test-macro' # ------------------------------- # builder macros diff --git a/jjb/cloud-infra/cloud-infra-verify-test.yaml b/jjb/cloud-infra/cloud-infra-verify-testfw.yaml similarity index 52% rename from jjb/cloud-infra/cloud-infra-verify-test.yaml rename to jjb/cloud-infra/cloud-infra-verify-testfw.yaml index 4c7e16aee..c4c26cdf2 100644 --- a/jjb/cloud-infra/cloud-infra-verify-test.yaml +++ b/jjb/cloud-infra/cloud-infra-verify-testfw.yaml @@ -25,7 +25,7 @@ # # These jobs verify changes that # - implement new features or fix bugs to the playbooks and roles used for utilizing -# open source test frameworks such as opnfv/functest, and opnfv/yardstick +# open source test frameworks such as opnfv/functest and opnfv/yardstick # - bump versions of the open source test frameworks # # These jobs are set to run on slaves with label vpod-test-ubuntu1604. @@ -63,11 +63,18 @@ type: - virtual + phase: + - functest + - yardstick + jobs: - - 'cloud-infra-verify-test-{os}-{type}-{stream}' + - 'cloud-infra-verify-testfw-{os}-{type}-{stream}' + - 'cloud-infra-verify-testfw-{os}-{phase}-{type}-{stream}' - job-template: - name: 'cloud-infra-verify-test-{os}-{type}-{stream}' + name: 'cloud-infra-verify-testfw-{os}-{type}-{stream}' + + project-type: multijob disabled: '{obj:disabled}' @@ -87,20 +94,24 @@ default: '{distribution}' description: 'Distribution to use for configuring target nodes (networking etc.)' - string: - name: TESTFW_NAME - default: 'opnfv/functest' - description: 'Test framework to use' + name: DEPLOY_SCENARIO + default: 'k8-calico-nofeature' + description: 'Scenario to deploy and test' - string: - name: SUITE_NAME + name: TEST_SUITE default: 'healthcheck' - description: 'Test suite to use' + description: 'Test suite to run' + - string: + name: CLEANUP + default: 'true' + description: 'Cleanup leftovers of the previous run' properties: - logrotate - build-blocker: use-build-blocker: true blocking-jobs: - - 'cloud-infra-verify-test-{os}-.*' + - 'cloud-infra-verify-testfw-{os}-.*' block-level: 'NODE' - throttle: max-per-node: 1 @@ -124,6 +135,95 @@ branch: '{branch}' files: '**' + builders: + - multijob: + name: functest + condition: SUCCESSFUL + projects: + - name: 'cloud-infra-verify-testfw-{os}-functest-{type}-{stream}' + current-parameters: true + predefined-parameters: | + DISTRIBUTION=$DISTRIBUTION + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + TEST_SUITE=$TEST_SUITE + CLEANUP=$CLEANUP + GERRIT_PROJECT=$GERRIT_PROJECT + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: yardstick + condition: SUCCESSFUL + projects: + - name: 'cloud-infra-verify-testfw-{os}-yardstick-{type}-{stream}' + current-parameters: true + predefined-parameters: | + DISTRIBUTION=$DISTRIBUTION + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + TEST_SUITE=$TEST_SUITE + CLEANUP=$CLEANUP + GERRIT_PROJECT=$GERRIT_PROJECT + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + +- job-template: + name: 'cloud-infra-verify-testfw-{os}-{phase}-{type}-{stream}' + + disabled: false + + concurrent: true + + properties: + - logrotate + + parameters: + - string: + name: PROJECT + default: $GERRIT_PROJECT + - string: + name: DISTRIBUTION + default: 'ubuntu18' + description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.' + - string: + name: DEPLOY_SCENARIO + default: 'k8-calico-nofeature' + description: 'Scenario to deploy and test' + - string: + name: TEST_FW + default: '{phase}' + description: 'Test framework to use' + - string: + name: TEST_SUITE + default: 'healthcheck' + description: 'Test suite to run' + - string: + name: TEST_REPO_URL + default: 'https://gerrit.nordix.org/infra/test.git' + description: 'URL to Nordix Cloud Infra test repository' + - string: + name: CLEANUP + default: 'false' + + wrappers: + - build-timeout: + timeout: 120 + - fix-workspace-permissions + + scm: + - git-scm-gerrit: + ssh-credentials-id: nordixinfra-nordix-gerrit-ssh + branch: '{branch}' + refspec: $GERRIT_REFSPEC + builders: - 'cloud-infra-verify-testfw-macro'