This change request adds support for ONAP testing in release jobs.
- xTesting framework is used for executing tests
- Healthcheck and Infra-healthcheck testsuites added
Signed-off-by: eprasad <prasad.mukhedkar@est.tech>
Change-Id: I04ba63addcf952f8ef9a57b329754e7e8a57bb5f
Signed-off-by: eprasad <prasad.mukhedkar@est.tech>
builders:
- shell:
!include-raw: ./scripts/promote.sh
+
+- builder:
+ name: 'xtesting-infra-healthcheck-macro'
+ builders:
+ - shell:
+ !include-raw: ./scripts/xtesting-infra-healthcheck.sh
+
+- builder:
+ name: 'xtesting-healthcheck-macro'
+ builders:
+ - shell:
+ !include-raw: ./scripts/xtesting-healthcheck.sh
- offline:
disabled: false
execution-mode: offline-deployment
- # just deploy phase for now and ONAP testing isn't defined yet
+
phase:
- deploy
+ - test
type:
- 'onap-release-{environment-type}-deploy-test-{distro}-{cloud}-{type}-{stream}'
- 'onap-release-{environment-type}-deploy-{distro}-{cloud}-{type}-{stream}'
- 'onap-release-{environment-type}-deployk8s-{distro}-{cloud}-{type}-{stream}'
+ - 'onap-release-{environment-type}-xtesting-infra-healthcheck-{distro}-{cloud}-{type}-{stream}'
+ - 'onap-release-{environment-type}-xtesting-healthcheck-{distro}-{cloud}-{type}-{stream}'
- job-template:
name: 'onap-release-{environment-type}-deploy-test-{distro}-{cloud}-{type}-{stream}'
name: USE_PREBUILT_DEPLOYMENT_IMAGE
default: 'true'
description: 'Use prebuilt deployment image while running as part of CI/CD'
- - string:
- name: TEST_REPO_URL
- default: 'https://gerrit.nordix.org/infra/test.git'
- description: 'URL to clone the test repo from'
- - string:
- name: TEST_FW
- default: 'functest'
- description: 'Test framework to use'
- - string:
- name: TEST_SUITE
- default: 'healthcheck'
- description: 'Test suite to run'
- - string:
- name: YARDSTICK_DISPATCHER
- default: 'file'
- description: 'Dispatcher to use for Yardstick reporting'
- string:
name: DELETE_STACK
default: 'false'
node-parameters: true
kill-phase-on: FAILURE
abort-all-job: false
+ - multijob:
+ name: xTesting for infra-healthcheck and healthcheck
+ condition: ALWAYS
+ projects:
+ - name: 'onap-release-{environment-type}-xtesting-infra-healthcheck-{distro}-{cloud}-{type}-{stream}'
+ current-parameters: true
+ git-revision: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: false
+ - name: 'onap-release-{environment-type}-xtesting-healthcheck-{distro}-{cloud}-{type}-{stream}'
+ current-parameters: true
+ git-revision: true
+ node-parameters: true
+ kill-phase-on: FAILURE
+ abort-all-job: false
publishers:
- postbuildscript:
builders:
- 'wait-pkg-mgr-macro'
- 'download-deploy-artifact-macro'
- 'deploy-macro'
+
+- job-template:
+ name: 'onap-release-{environment-type}-xtesting-infra-healthcheck-{distro}-{cloud}-{type}-{stream}'
+
+ disabled: '{obj:disabled}'
+
+ parameters:
+ - string:
+ name: EXECUTION_MODE
+ default: '{execution-mode}'
+ description: 'Execution mode'
+ - string:
+ name: TEST_REPO_URL
+ default: 'https://gerrit.nordix.org/infra/test.git'
+ description: 'URL to clone the test repo from'
+ - string:
+ name: TEST_FW
+ default: 'xtesting'
+ description: 'Test framework to use'
+ - string:
+ name: TEST_SUITE
+ default: 'infra-healthcheck'
+ description: 'Test suite to run'
+
+
+ properties:
+ - logrotate
+ - throttle:
+ max-per-node: 1
+ max-total: 3
+ option: project
+ wrappers:
+ - build-timeout:
+ timeout: 600
+ - mask-passwords
+ - fix-workspace-permissions
+
+ builders:
+ - 'xtesting-infra-healthcheck-macro'
+
+- job-template:
+ name: 'onap-release-{environment-type}-xtesting-healthcheck-{distro}-{cloud}-{type}-{stream}'
+
+ disabled: '{obj:disabled}'
+
+ parameters:
+ - string:
+ name: EXECUTION_MODE
+ default: '{execution-mode}'
+ description: 'Execution mode'
+ - string:
+ name: TEST_REPO_URL
+ default: 'https://gerrit.nordix.org/infra/test.git'
+ description: 'URL to clone the test repo from'
+ - string:
+ name: TEST_FW
+ default: 'xtesting'
+ description: 'Test framework to use'
+ - string:
+ name: TEST_SUITE
+ default: 'healthcheck'
+ description: 'Test suite to run'
+
+ properties:
+ - logrotate
+ - throttle:
+ max-per-node: 1
+ max-total: 3
+ option: project
+ wrappers:
+ - build-timeout:
+ timeout: 600
+ - mask-passwords
+ - fix-workspace-permissions
+
+ builders:
+ - 'xtesting-healthcheck-macro'
--- /dev/null
+#!/bin/bash
+
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 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 pipefail
+
+echo "Info : Cloning infra/test repository"
+cd $HOME && /bin/rm -rf $WORKSPACE
+git clone -q $TEST_REPO_URL $WORKSPACE
+
+# NOTE (eprasad): we need to override execution mode variable coming from change.properties file
+if [[ "$CI_LOOP" != "release" ]]; then
+ export EXECUTION_MODE=$(echo "$EXECUTION_MODE" | sed 's/deployment/test/g')
+else
+ export EXECUTION_MODE=online-test
+fi
+
+cd $WORKSPACE/test
+./test.sh -s "$STACK_TYPE" -b "$BRANCH" -c "$DEPLOY_SCENARIO" -f "$TEST_FW" -t "$TEST_SUITE" \
+ -o /tmp/openrc -i /tmp/inventory.ini -y -v
+
+# vim: set ts=2 sw=2 expandtab:
--- /dev/null
+#!/bin/bash
+
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 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 pipefail
+
+echo "Info : Cloning infra/test repository"
+cd $HOME && /bin/rm -rf $WORKSPACE
+git clone -q $TEST_REPO_URL $WORKSPACE
+
+# NOTE (eprasad): we need to override execution mode variable coming from change.properties file
+if [[ "$CI_LOOP" != "release" ]]; then
+ export EXECUTION_MODE=$(echo "$EXECUTION_MODE" | sed 's/deployment/test/g')
+else
+ export EXECUTION_MODE=online-test
+fi
+
+cd $WORKSPACE/test
+./test.sh -s "$STACK_TYPE" -b "$BRANCH" -c "$DEPLOY_SCENARIO" -f "$TEST_FW" -t "$TEST_SUITE" \
+ -o /tmp/openrc -i /tmp/inventory.ini -y -v
+
+# vim: set ts=2 sw=2 expandtab: