From ca02d5fda706a7e10f5f23536da0ceae79d42e2e Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Wed, 16 Aug 2017 15:51:15 +0800 Subject: [qtip] refactoring ci scripts - manage help scripts in qtip repo instead of releng - call entry script in qtip from releng JIRA: QTIP-268 Change-Id: Ibd0d2c2533c1a7f1963f6c3214c563499cce8b22 Signed-off-by: Yujun Zhang --- jjb/qtip/helpers/cleanup-deploy.sh | 21 ------------------- jjb/qtip/helpers/validate-deploy.sh | 40 ------------------------------------- jjb/qtip/helpers/validate-setup.sh | 24 ---------------------- 3 files changed, 85 deletions(-) delete mode 100644 jjb/qtip/helpers/cleanup-deploy.sh delete mode 100644 jjb/qtip/helpers/validate-deploy.sh delete mode 100644 jjb/qtip/helpers/validate-setup.sh (limited to 'jjb/qtip/helpers') diff --git a/jjb/qtip/helpers/cleanup-deploy.sh b/jjb/qtip/helpers/cleanup-deploy.sh deleted file mode 100644 index 9cb19a583..000000000 --- a/jjb/qtip/helpers/cleanup-deploy.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -############################################################################## -# Copyright (c) 2016 ZTE and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -# Remove previous running containers if exist -if [[ ! -z $(docker ps -a | grep "opnfv/qtip:$DOCKER_TAG") ]]; then - echo "Removing existing opnfv/qtip containers..." - # workaround: sometimes it throws an error when stopping qtip container. - # To make sure ci job unblocked, remove qtip container by force without stopping it. - docker rm -f $(docker ps -a | grep "opnfv/qtip:$DOCKER_TAG" | awk '{print $1}') -fi - -# Remove existing images if exist -if [[ $(docker images opnfv/qtip:${DOCKER_TAG} | wc -l) -gt 1 ]]; then - echo "Removing docker image opnfv/qtip:$DOCKER_TAG..." - docker rmi opnfv/qtip:$DOCKER_TAG -fi diff --git a/jjb/qtip/helpers/validate-deploy.sh b/jjb/qtip/helpers/validate-deploy.sh deleted file mode 100644 index af8f8c200..000000000 --- a/jjb/qtip/helpers/validate-deploy.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -############################################################################## -# Copyright (c) 2017 ZTE and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -set -e - -echo "--------------------------------------------------------" -echo "POD: $NODE_NAME" -echo "Scenario: $DEPLOY_SCENARIO" -echo "INSTALLER: $INSTALLER_TYPE" -echo "INSTALLER_IP: $INSTALLER_IP" -echo "--------------------------------------------------------" - -echo "Qtip: Pulling docker image: opnfv/qtip:${DOCKER_TAG}" -docker pull opnfv/qtip:$DOCKER_TAG >/dev/null - -envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} --e POD_NAME=${NODE_NAME} -e SCENARIO=${DEPLOY_SCENARIO}" - -cmd=" docker run -id -e $envs opnfv/qtip:${DOCKER_TAG} /bin/bash" -echo "Qtip: Running docker command: ${cmd}" -${cmd} - -container_id=$(docker ps | grep "opnfv/qtip:${DOCKER_TAG}" | awk '{print $1}' | head -1) -if [ $(docker ps | grep 'opnfv/qtip' | wc -l) == 0 ]; then - echo "The container opnfv/qtip with ID=${container_id} has not been properly started. Exiting..." - exit 1 -fi - -echo "The container ID is: ${container_id}" -QTIP_REPO=/home/opnfv/repos/qtip - -docker exec -t ${container_id} bash -c "bash ${QTIP_REPO}/tests/ci/run_ci.sh" - -echo "Qtip done!" -exit 0 \ No newline at end of file diff --git a/jjb/qtip/helpers/validate-setup.sh b/jjb/qtip/helpers/validate-setup.sh deleted file mode 100644 index 8d84e120c..000000000 --- a/jjb/qtip/helpers/validate-setup.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -############################################################################## -# Copyright (c) 2017 ZTE and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -set -e - -# setup virtualenv -sudo pip install -u virtualenv virtualenvwrapper -export WORKON_HOME=$HOME/.virtualenvs -source /usr/local/bin/virtualenvwrapper.sh -mkvirtualenv qtip -workon qtip - -# setup qtip -sudo pip install $HOME/repos/qtip - -# testing -qtip --version -qtip --help -- cgit