Adapt jobs to integrate yardstick 67/867/5
authorFatih Degirmenci <fdegir@gmail.com>
Wed, 3 Apr 2019 18:18:28 +0000 (11:18 -0700)
committerFatih Degirmenci <fdegir@gmail.com>
Wed, 3 Apr 2019 20:56:45 +0000 (13:56 -0700)
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

jjb/cloud-infra/cloud-infra-periodic-engine.yaml
jjb/cloud-infra/cloud-infra-test.sh
jjb/cloud-infra/cloud-infra-verify-engine.yaml
jjb/cloud-infra/cloud-infra-verify-testfw.yaml [moved from jjb/cloud-infra/cloud-infra-verify-test.yaml with 52% similarity]

index 64a2d0de56095f7960905a056a4d031d702a1c5f..9565febda867c02b6bb7519a45a29fff52768309 100644 (file)
@@ -64,7 +64,8 @@
 
     phase:
       - deploy
-      - test
+      - functest
+      - yardstick
 
     jobs:
       - 'cloud-infra-periodic-engine-{os}-{type}-{stream}'
           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'
                 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}'
           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'
           refspec: ''
 
     builders:
-      - 'cloud-infra-periodic-{phase}-macro'
+      - 'cloud-infra-periodic-test-macro'
 
 # -------------------------------
 # builder macros
index 952a7fd15571d827136c45de825b08dff3af973e..2b85f0ddbd81f93dd55de6d73d0a3d88657fe678 100644 (file)
@@ -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:
index 922bdfb6b93116897dcdfd8af24b7eaa44e6371c..cf0fcbbd9c1c65c991215291e72a2418245408d3 100644 (file)
@@ -71,7 +71,7 @@
 
     phase:
       - deploy
-      - test
+      - functest
 
     jobs:
       - 'cloud-infra-verify-engine-{os}-{type}-{stream}'
           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'
               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
                 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
                 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:
           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'
           refspec: $GERRIT_REFSPEC
 
     builders:
-      - 'cloud-infra-verify-{phase}-macro'
+      - 'cloud-infra-verify-test-macro'
 
 # -------------------------------
 # builder macros
similarity index 52%
rename from jjb/cloud-infra/cloud-infra-verify-test.yaml
rename to jjb/cloud-infra/cloud-infra-verify-testfw.yaml
index 4c7e16aee336ebe7568114a758d014479fa641cd..c4c26cdf25a4d997bcaf83624cfb9508bcd8c30c 100644 (file)
@@ -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.
     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}'
 
           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
           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'