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-verify-testfw.yaml b/jjb/cloud-infra/cloud-infra-verify-testfw.yaml
new file mode 100644
index 0000000..c4c26cd
--- /dev/null
+++ b/jjb/cloud-infra/cloud-infra-verify-testfw.yaml
@@ -0,0 +1,240 @@
+---
+#
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2019 Nordix Foundation.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+#--------------------------------------------------------------------------------------
+# The jobs declared in this JJB configuration file are used for verifying patches
+# that are sent to the repositories below
+#   - cloud-infra/test
+#
+# 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
+#   - bump versions of the open source test frameworks
+#
+# These jobs are set to run on slaves with label vpod-test-ubuntu1604.
+# The slaves have
+#   - Ubuntu1604 as the base distro
+#   - nested virtualization
+#   - internet access
+#   - passwordless sudo
+#   - 16 CPUs/32GB RAM/200 GB Disk
+#   - docker, git vim curl wget zip unzip chrony apt-transport-https ca-certificates curl
+#     gnupg-agent software-properties-common docker-ce docker-ce-cli containerd.io openjdk-8-jre
+#
+# The slaves should have a promoted version of a cloud infra scenario deployed on them.
+# Currently k8-calico-nofeature scenario is deployed on the slaves.
+#--------------------------------------------------------------------------------------
+
+- project:
+    name: 'cloud-infra-verify-test'
+
+    project: 'infra/test'
+
+    stream:
+      - 'master':
+          branch: '{stream}'
+          disabled: 'false'
+
+    os:
+      - ubuntu1804:
+          disabled: 'false'
+          distribution: 'ubuntu18'
+      - centos7:
+          disabled: 'true'
+          distribution: 'centos7'
+
+    type:
+      - virtual
+
+    phase:
+      - functest
+      - yardstick
+
+    jobs:
+      - 'cloud-infra-verify-testfw-{os}-{type}-{stream}'
+      - 'cloud-infra-verify-testfw-{os}-{phase}-{type}-{stream}'
+
+- job-template:
+    name: 'cloud-infra-verify-testfw-{os}-{type}-{stream}'
+
+    project-type: multijob
+
+    disabled: '{obj:disabled}'
+
+    concurrent: true
+
+    parameters:
+      - project-parameters:
+          project: '{project}'
+          branch: '{branch}'
+      - nordix-gerrit-parameters
+      - label:
+          name: SLAVE_LABEL
+          default: 'vpod-test-{os}'
+          description: 'Slave label to schedule this job on. These slaves have cloud infra installed on them.'
+      - string:
+          name: DISTRIBUTION
+          default: '{distribution}'
+          description: 'Distribution to use for configuring target nodes (networking etc.)'
+      - 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'
+          description: 'Cleanup leftovers of the previous run'
+
+    properties:
+      - logrotate
+      - build-blocker:
+          use-build-blocker: true
+          blocking-jobs:
+            - 'cloud-infra-verify-testfw-{os}-.*'
+          block-level: 'NODE'
+      - throttle:
+          max-per-node: 1
+          max-total: 3
+          option: project
+
+    wrappers:
+      - build-timeout:
+          timeout: 120
+      - fix-workspace-permissions
+
+    scm:
+      - git-scm-gerrit:
+          ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
+          branch: '{branch}'
+          refspec: $GERRIT_REFSPEC
+
+    triggers:
+      - nordix-gerrit-trigger-patchset-created:
+          project: 'infra\/test'
+          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'
+
+# -------------------------------
+# builder macros
+# -------------------------------
+
+- builder:
+    name: 'cloud-infra-verify-testfw-macro'
+    builders:
+      - shell:
+          !include-raw: ./cloud-infra-test.sh
+
+# vim: set ts=2 sw=2 expandtab: