- online:
disabled: false
execution-mode: online-deployment
- successful: true
- failed: true
- unstable: true
- notbuilt: true
+ successful: false
+ failed: false
+ unstable: false
+ notbuilt: false
- offline:
disabled: false
execution-mode: offline-deployment
description: 'Distribution to use for configuring target nodes (networking etc.)'
- string:
name: VERBOSITY
- default: 'false'
+ default: 'true'
description: 'Verbosity setting for the engine - true or false - default is false'
- string:
name: NORDIX_ARM_PUBLIC_IP
clean_before: false
builders:
+ - 'engine-wait-pkg-mgr-macro'
- 'engine-generate-ssh-keypair-macro'
- 'engine-packaging-macro'
- 'engine-upload-artifact-macro'
builders:
- shell:
!include-raw: ./scripts/delete-heat-stack.sh
+
+- builder:
+ name: 'engine-wait-pkg-mgr-macro'
+ builders:
+ - shell:
+ !include-raw: ./scripts/wait-for-pkg-manager.sh
description: 'Name of heat-environment file to use.'
- string:
name: STACK_NAME
- default: "nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
+ default: "nordix-cicd-verify-engine-offline-{distro}-$BUILD_NUMBER"
description: 'Name of the created stack'
- string:
name: KEYPAIR_NAME
- default: "keypair-nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
+ default: "keypair-nordix-cicd-verify-offline-engine-{distro}-$BUILD_NUMBER"
description: 'Name of the created keypair'
- string:
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: 'yes'
+ default: 'true'
description: 'Delete the stack upon completion of the build'
properties:
- logrotate
-# - build-blocker:
-# use-build-blocker: true
-# blocking-jobs:
-# - 'engine-verify-online-deploy-test-.*'
-# - 'engine-verify-offline-deploy-test-.*'
-# block-level: 'NODE'
- throttle:
max-per-node: 1
max-total: 3
single-use: True
builders:
+ - 'engine-wait-pkg-mgr-macro'
+ - shell: |
+ #!/bin/bash
+ sudo sed -i 's/^search/# search/' /etc/resolv.conf
- 'engine-generate-ssh-keypair-macro'
- 'engine-download-artifact-macro'
- multijob:
current-parameters: true
node-parameters: true
kill-phase-on: FAILURE
- abort-all-job: true
+ abort-all-job: false
- multijob:
name: "Offline Testing on {type} instances"
condition: SUCCESSFUL
current-parameters: true
node-parameters: true
kill-phase-on: FAILURE
- abort-all-job: true
+ abort-all-job: false
- conditional-step:
condition-kind: and
condition-operands:
description: 'Name of heat-environment file to use.'
- string:
name: STACK_NAME
- default: "nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
+ default: "nordix-cicd-verify-engine-online-{distro}-$BUILD_NUMBER"
description: 'Name of the created stack'
- string:
name: KEYPAIR_NAME
- default: "keypair-nordix-cicd-verify-engine-{distro}-$BUILD_NUMBER"
+ default: "keypair-nordix-cicd-verify-online-engine-{distro}-$BUILD_NUMBER"
description: 'Name of the created keypair'
- string:
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: 'yes'
+ default: 'true'
description: 'Delete the stack upon completion of the build'
properties:
- logrotate
-# - build-blocker:
-# use-build-blocker: true
-# blocking-jobs:
-# - 'engine-verify-online-deploy-test-.*'
-# - 'engine-verify-offline-deploy-test-.*'
-# block-level: 'NODE'
- throttle:
max-per-node: 1
max-total: 3
clean_before: false
builders:
+ - 'engine-wait-pkg-mgr-macro'
- 'engine-generate-ssh-keypair-macro'
- 'engine-download-artifact-macro'
- multijob:
current-parameters: true
node-parameters: true
kill-phase-on: FAILURE
- abort-all-job: true
+ abort-all-job: false
- multijob:
name: "Online Testing on {type} instances"
condition: SUCCESSFUL
current-parameters: true
node-parameters: true
kill-phase-on: FAILURE
- abort-all-job: true
+ abort-all-job: false
- conditional-step:
condition-kind: and
condition-operands:
set -o errexit
set -o pipefail
-echo "Info : Not implemented!"
+if [[ "$EXECUTION_MODE" == "offline-deployment" ]]; then
+ echo "Info : Testing of offline deployments is not currently supported!"
+ exit 0
+fi
+
+echo "Info : Cloning infra/test repository"
+cd $HOME && /bin/rm -rf $WORKSPACE
+git clone -q $TEST_REPO_URL $WORKSPACE
+
+cd $WORKSPACE/test
+./test.sh -f $TEST_FW -t $TEST_SUITE
--- /dev/null
+#!/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
+
+source /etc/os-release || source /usr/lib/os-release
+case ${ID,,} in
+ centos)
+ pkg_mgr_cmd="yum"
+ ;;
+ ubuntu)
+ pkg_mgr_cmd="apt"
+ ;;
+esac
+
+# just wait few seconds before attempting to check pkg manager process
+sleep 10
+
+echo "Info: Waiting for completion of an existing $pkg_mgr_cmd process before proceeding..."
+while true; do
+ pkg_mgr_process=$(pgrep -f $pkg_mgr_cmd | cat)
+ if [[ -n $pkg_mgr_process ]]; then
+ sleep 10
+ else
+ break
+ fi
+done
+echo "Info: $pkg_mgr_cmd process done. Continuing..."
+
+# vim: set ts=2 sw=2 expandtab: