Integrate xtesting to ONAP pipeline 97/1797/1
authorFatih Degirmenci <fdegir@gmail.com>
Tue, 30 Jul 2019 10:14:02 +0000 (12:14 +0200)
committerFatih Degirmenci <fdegir@gmail.com>
Tue, 30 Jul 2019 10:14:02 +0000 (12:14 +0200)
Change-Id: I4e4fde19b5b8b696185fb6ba3263f65262f2a19a

jjb/cloud-infra/cloud-infra-periodic-onap.yaml
jjb/cloud-infra/onap-deploy.sh [changed mode: 0755->0644]
jjb/cloud-infra/onap-healthcheck.sh
jjb/cloud-infra/onap-macros.yaml
jjb/cloud-infra/oom-healthcheck.sh
jjb/cloud-infra/prepare-for-xtesting.sh [deleted file]

index 0ed68fa30516e1f447f0011870ee23cc6edc44d7..22387dfdc86975b3538a7dfc645acef961320817 100644 (file)
     phase:
       - onap-deploy:
           build-timeout: 150
     phase:
       - onap-deploy:
           build-timeout: 150
+          flavor:
+            - full
       - oom-healthcheck:
           build-timeout: 30
       - oom-healthcheck:
           build-timeout: 30
+          test-type: oom-healthcheck
+          flavor:
+            - full
       - onap-healthcheck:
           build-timeout: 30
       - onap-healthcheck:
           build-timeout: 30
+          test-type: onap-healthcheck
+          flavor:
+            - core
+            - small
+            - medium
+            - full
       - promote-onap:
           build-timeout: 5
       - promote-onap:
           build-timeout: 5
+          flavor:
+            - full
 
     jobs:
       - '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
 
     jobs:
       - '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
-      - '{phase}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
+      - 'xtesting-{phase}-{flavor}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
 
 - job-template:
     name: '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
 
 - job-template:
     name: '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
           condition: SUCCESSFUL
           projects:
             - name: 'onap-deploy-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
           condition: SUCCESSFUL
           projects:
             - name: 'onap-deploy-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
-              current-parameters: true
+              current-parameters: false
               predefined-parameters: |
                 DISTRO=$DISTRO
                 DEPLOY_TYPE=$DEPLOY_TYPE
               predefined-parameters: |
                 DISTRO=$DISTRO
                 DEPLOY_TYPE=$DEPLOY_TYPE
           name: OOM Healthcheck
           condition: SUCCESSFUL
           projects:
           name: OOM Healthcheck
           condition: SUCCESSFUL
           projects:
-            - name: 'oom-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
-              current-parameters: true
+            - name: 'xtesting-oom-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
+              current-parameters: false
               predefined-parameters: |
                 DISTRO=$DISTRO
                 DEPLOY_TYPE=$DEPLOY_TYPE
               predefined-parameters: |
                 DISTRO=$DISTRO
                 DEPLOY_TYPE=$DEPLOY_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 ONAP_VERSION=$ONAP_VERSION
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 ONAP_VERSION=$ONAP_VERSION
-                ONAP_FLAVOR=$ONAP_FLAVOR
+                ONAP_FLAVOR=full
+                TEST_TYPE=oom-healthcheck
                 ENGINE_VERSION=$ENGINE_VERSION
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
                 ENGINE_VERSION=$ENGINE_VERSION
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
               kill-phase-on: NEVER
               abort-all-job: false
       - multijob:
               kill-phase-on: NEVER
               abort-all-job: false
       - multijob:
-          name: ONAP Healthcheck
+          name: ONAP Healthcheck - Core
           condition: SUCCESSFUL
           projects:
           condition: SUCCESSFUL
           projects:
-            - name: 'onap-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
-              current-parameters: true
+            - name: 'xtesting-onap-healthcheck-core-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
+              current-parameters: false
               predefined-parameters: |
                 DISTRO=$DISTRO
                 DEPLOY_TYPE=$DEPLOY_TYPE
               predefined-parameters: |
                 DISTRO=$DISTRO
                 DEPLOY_TYPE=$DEPLOY_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
                 ONAP_VERSION=$ONAP_VERSION
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
                 ONAP_VERSION=$ONAP_VERSION
-                ONAP_FLAVOR=$ONAP_FLAVOR
+                ONAP_FLAVOR=core
+                TEST_TYPE=onap-healthcheck
+                ENGINE_VERSION=$ENGINE_VERSION
+                ENGINE_REFSPEC=$ENGINE_REFSPEC
+                DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
+                DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
+                ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
+                XTESTING_REPO_URL=$XTESTING_REPO_URL
+                ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
+                CLEANUP=$CLEANUP
+              node-parameters: true
+              kill-phase-on: NEVER
+              abort-all-job: false
+          name: ONAP Healthcheck - Small
+          condition: SUCCESSFUL
+          projects:
+            - name: 'xtesting-onap-healthcheck-small-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
+              current-parameters: false
+              predefined-parameters: |
+                DISTRO=$DISTRO
+                DEPLOY_TYPE=$DEPLOY_TYPE
+                PROVISIIONER_TYPE=$PROVISIIONER_TYPE
+                INSTALLER_TYPE=$INSTALLER_TYPE
+                DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
+                ONAP_VERSION=$ONAP_VERSION
+                ONAP_FLAVOR=small
+                TEST_TYPE=onap-healthcheck
+                ENGINE_VERSION=$ENGINE_VERSION
+                ENGINE_REFSPEC=$ENGINE_REFSPEC
+                DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
+                DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
+                ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
+                XTESTING_REPO_URL=$XTESTING_REPO_URL
+                ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
+                CLEANUP=$CLEANUP
+              node-parameters: true
+              kill-phase-on: NEVER
+              abort-all-job: false
+          name: ONAP Healthcheck - Medium
+          condition: SUCCESSFUL
+          projects:
+            - name: 'xtesting-onap-healthcheck-medium-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
+              current-parameters: false
+              predefined-parameters: |
+                DISTRO=$DISTRO
+                DEPLOY_TYPE=$DEPLOY_TYPE
+                PROVISIIONER_TYPE=$PROVISIIONER_TYPE
+                INSTALLER_TYPE=$INSTALLER_TYPE
+                DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
+                ONAP_VERSION=$ONAP_VERSION
+                ONAP_FLAVOR=medium
+                TEST_TYPE=onap-healthcheck
+                ENGINE_VERSION=$ENGINE_VERSION
+                ENGINE_REFSPEC=$ENGINE_REFSPEC
+                DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
+                DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
+                ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
+                XTESTING_REPO_URL=$XTESTING_REPO_URL
+                ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
+                CLEANUP=$CLEANUP
+              node-parameters: true
+              kill-phase-on: NEVER
+              abort-all-job: false
+          name: ONAP Healthcheck - Full
+          condition: SUCCESSFUL
+          projects:
+            - name: 'onap-healthcheck-periodic-full-{distro}-{installer-type}-{type}-{onap-branch}'
+              current-parameters: false
+              predefined-parameters: |
+                DISTRO=$DISTRO
+                DEPLOY_TYPE=$DEPLOY_TYPE
+                PROVISIIONER_TYPE=$PROVISIIONER_TYPE
+                INSTALLER_TYPE=$INSTALLER_TYPE
+                DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
+                ONAP_VERSION=$ONAP_VERSION
+                ONAP_FLAVOR=full
+                TEST_TYPE=onap-healthcheck
                 ENGINE_VERSION=$ENGINE_VERSION
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
                 ENGINE_VERSION=$ENGINE_VERSION
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
           condition: SUCCESSFUL
           projects:
             - name: 'promote-onap-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
           condition: SUCCESSFUL
           projects:
             - name: 'promote-onap-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
-              current-parameters: true
+              current-parameters: false
               predefined-parameters: |
                 DISTRO=$DISTRO
                 DEPLOY_TYPE=$DEPLOY_TYPE
               predefined-parameters: |
                 DISTRO=$DISTRO
                 DEPLOY_TYPE=$DEPLOY_TYPE
               abort-all-job: false
 
 - job-template:
               abort-all-job: false
 
 - job-template:
-    name: '{phase}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
+    name: 'xtesting-{phase}-{flavor}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
 
     disabled: false
 
 
     disabled: false
 
           description: 'ONAP version to deploy'
       - string:
           name: ONAP_FLAVOR
           description: 'ONAP version to deploy'
       - string:
           name: ONAP_FLAVOR
-          default: '{onap-flavor}'
+          default: '{flavor}'
           description: 'ONAP flavor to deploy - could be core, small, medium, full. Also used for xtesting as run_type.'
           description: 'ONAP flavor to deploy - could be core, small, medium, full. Also used for xtesting as run_type.'
+      - string:
+          name: TEST_TYPE
+          default: 'oom-healthcheck'
+          description: 'Test type to run. Could be oom-healthcheck or onap-healthcheck'
       - string:
           name: ENGINE_VERSION
           default: 'master'
       - string:
           name: ENGINE_VERSION
           default: 'master'
old mode 100755 (executable)
new mode 100644 (file)
index 334b714..deaa9ed
@@ -32,8 +32,10 @@ fi
 
 # checkout given engine refspec
 if [[ "$ENGINE_REFSPEC" != "master" ]]; then
 
 # checkout given engine refspec
 if [[ "$ENGINE_REFSPEC" != "master" ]]; then
-  echo "Warning: Checking out $ENGINE_REFSPEC"
-  git fetch -q https://gerrit.nordix.org/infra/engine $ENGINE_REFSPEC && git checkout -q FETCH_HEAD
+  echo "Warning: Checking out engine $ENGINE_REFSPEC"
+  echo "-------------------------------------------------------------------------"
+  git fetch https://gerrit.nordix.org/infra/engine $ENGINE_REFSPEC && git checkout -q FETCH_HEAD
+  echo "-------------------------------------------------------------------------"
 fi
 
 # update scenario version and refspec in engine/envine/var/sdf.yml
 fi
 
 # update scenario version and refspec in engine/envine/var/sdf.yml
index bea59ae86dedee5220c62dc59f09d5b5370b5f34..789e1a5ce994b9e98560f639aaf11a877730580a 100644 (file)
@@ -22,9 +22,12 @@ set -o errexit
 set -o nounset
 
 cd $WORKSPACE
 set -o nounset
 
 cd $WORKSPACE
-echo "Info: Starting ONAP Healthcheck using XTesting"
-echo "-------------------------------------------------------------------------"
-echo "Warning: Not implemented!"
+echo "Info: Starting OOM Healthcheck using XTesting"
 echo "-------------------------------------------------------------------------"
 echo "-------------------------------------------------------------------------"
+echo "Info: Cloning opnfv/xtesting-onap repository"
+cd $HOME && /bin/rm -rf $WORKSPACE
+git clone -q $XTESTING_REPO_URL $WORKSPACE && cd $WORKSPACE
+cp ../inventory.ini inventory/inventory.ini
+$WORKSPACE/xtesting.sh
 
 # vim: set ts=2 sw=2 expandtab:
 
 # vim: set ts=2 sw=2 expandtab:
index 85b5addb3a2a7fd0cb457aeec1615175f95a25ba..1703acc6885073545c62bd996ec0838203f7a329 100644 (file)
 - builder:
     name: 'oom-healthcheck-macro'
     builders:
 - builder:
     name: 'oom-healthcheck-macro'
     builders:
-      - shell:
-          !include-raw: ./prepare-for-xtesting.sh
       - shell:
           !include-raw: ./oom-healthcheck.sh
 
 - builder:
     name: 'onap-healthcheck-macro'
     builders:
       - shell:
           !include-raw: ./oom-healthcheck.sh
 
 - builder:
     name: 'onap-healthcheck-macro'
     builders:
-      - shell:
-          !include-raw: ./prepare-for-xtesting.sh
       - shell:
           !include-raw: ./onap-healthcheck.sh
 
       - shell:
           !include-raw: ./onap-healthcheck.sh
 
index 7d1ec53681986aa18f60a75840b24d9eac98d52f..789e1a5ce994b9e98560f639aaf11a877730580a 100644 (file)
@@ -24,7 +24,10 @@ set -o nounset
 cd $WORKSPACE
 echo "Info: Starting OOM Healthcheck using XTesting"
 echo "-------------------------------------------------------------------------"
 cd $WORKSPACE
 echo "Info: Starting OOM Healthcheck using XTesting"
 echo "-------------------------------------------------------------------------"
-echo "Warning: Not implemented!"
-echo "-------------------------------------------------------------------------"
+echo "Info: Cloning opnfv/xtesting-onap repository"
+cd $HOME && /bin/rm -rf $WORKSPACE
+git clone -q $XTESTING_REPO_URL $WORKSPACE && cd $WORKSPACE
+cp ../inventory.ini inventory/inventory.ini
+$WORKSPACE/xtesting.sh
 
 # vim: set ts=2 sw=2 expandtab:
 
 # vim: set ts=2 sw=2 expandtab:
diff --git a/jjb/cloud-infra/prepare-for-xtesting.sh b/jjb/cloud-infra/prepare-for-xtesting.sh
deleted file mode 100644 (file)
index aaf9195..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 The Nordix Foundation. 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.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-set -o errexit
-set -o nounset
-
-echo "Info: Cloning infra/test repository"
-cd $HOME && /bin/rm -rf $WORKSPACE
-git clone -q $XTESTING_REPO_URL $WORKSPACE
-
-# vim: set ts=2 sw=2 expandtab: