summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerena Feng <feng.xiaowei@zte.com.cn>2017-08-17 04:10:07 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-17 04:10:07 +0000
commit11a33235be45d9562d4a77487b6318a3dbd83f4f (patch)
treef0eea2281cc83a4778e013d76be944fefff7d055
parentef48b1f9341fc6014a8e7e29b2bb51b48213ff92 (diff)
parentca02d5fda706a7e10f5f23536da0ceae79d42e2e (diff)
Merge "[qtip] refactoring ci scripts"
-rw-r--r--jjb/qtip/helpers/cleanup-deploy.sh21
-rw-r--r--jjb/qtip/helpers/validate-deploy.sh40
-rw-r--r--jjb/qtip/helpers/validate-setup.sh24
-rw-r--r--jjb/qtip/qtip-experimental-jobs.yml (renamed from jjb/qtip/qtip-integration-jobs.yml)18
-rw-r--r--jjb/qtip/qtip-validate-jobs.yml44
-rw-r--r--jjb/qtip/qtip-weekly-jobs.yml108
6 files changed, 25 insertions, 230 deletions
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
diff --git a/jjb/qtip/qtip-integration-jobs.yml b/jjb/qtip/qtip-experimental-jobs.yml
index 4382dff3e..05445d898 100644
--- a/jjb/qtip/qtip-integration-jobs.yml
+++ b/jjb/qtip/qtip-experimental-jobs.yml
@@ -1,12 +1,12 @@
-######################
-# verify before MERGE
-######################
+###########################################
+# Experimental jobs for development purpose
+###########################################
- project:
- name: qtip-integration-jobs
+ name: qtip-experimental-jobs
project: qtip
jobs:
- - 'qtip-storage-{stream}'
+ - 'qtip-experimental-{stream}'
stream:
- master:
branch: '{stream}'
@@ -18,7 +18,7 @@
#################################
- job-template:
- name: 'qtip-storage-{stream}'
+ name: 'qtip-experimental-{stream}'
disabled: '{obj:disabled}'
@@ -41,8 +41,4 @@
builders:
- shell: |
#!/bin/bash
- set -o errexit
- set -o pipefail
- set -o xtrace
-
- source integration/storperf/run_ci.sh
+ source tests/ci/experimental.sh
diff --git a/jjb/qtip/qtip-validate-jobs.yml b/jjb/qtip/qtip-validate-jobs.yml
index 73d7993c9..e64173ca7 100644
--- a/jjb/qtip/qtip-validate-jobs.yml
+++ b/jjb/qtip/qtip-validate-jobs.yml
@@ -17,27 +17,27 @@
#--------------------------------
# JOB VARIABLES
#--------------------------------
- pod:
- - zte-pod1:
- installer: fuel
- scenario: os-odl_l2-nofeature-ha
+ qpi:
+ - compute:
+ installer: apex
+ pod: zte-pod4
<<: *master
- - zte-pod3:
- installer: fuel
- scenario: os-nosdn-kvm-ha
+ - storage:
+ installer: apex
+ pod: zte-pod4
<<: *master
#--------------------------------
# JOB LIST
#--------------------------------
jobs:
- - 'qtip-{scenario}-{pod}-daily-{stream}'
+ - 'qtip-{qpi}-{installer}-{stream}'
################################
# job templates
################################
- job-template:
- name: 'qtip-{scenario}-{pod}-daily-{stream}'
+ name: 'qtip-{qpi}-{installer}-{stream}'
disabled: false
parameters:
- project-parameter:
@@ -47,7 +47,7 @@
- '{pod}-defaults'
- string:
name: DEPLOY_SCENARIO
- default: '{scenario}'
+ default: generic
- string:
name: DOCKER_TAG
default: '{docker-tag}'
@@ -56,14 +56,19 @@
name: CI_DEBUG
default: 'false'
description: "Show debug output information"
+ - string:
+ name: TEST_SUITE
+ default: '{qpi}'
scm:
- git-scm
triggers:
- - 'qtip-{scenario}-{pod}-daily-{stream}-trigger'
+ - 'qtip-daily'
builders:
- description-setter:
description: "POD: $NODE_NAME"
- - qtip-validate-deploy
+ - shell: |
+ #!/bin/bash
+ source tests/ci/periodic.sh
publishers:
- qtip-common-publishers
- email-jenkins-admins-on-failure
@@ -75,14 +80,6 @@
#---------
# builder
#---------
-- builder:
- name: qtip-validate-deploy
- builders:
- - shell:
- !include-raw: ./helpers/cleanup-deploy.sh
- - shell:
- !include-raw: ./helpers/validate-deploy.sh
-
#-----------
# parameter
@@ -103,11 +100,6 @@
#---------
- trigger:
- name: 'qtip-os-odl_l2-nofeature-ha-zte-pod1-daily-master-trigger'
- triggers:
- - timed: '0 15 * * *'
-
-- trigger:
- name: 'qtip-os-nosdn-kvm-ha-zte-pod3-daily-master-trigger'
+ name: 'qtip-daily'
triggers:
- timed: '0 15 * * *'
diff --git a/jjb/qtip/qtip-weekly-jobs.yml b/jjb/qtip/qtip-weekly-jobs.yml
deleted file mode 100644
index 018248871..000000000
--- a/jjb/qtip/qtip-weekly-jobs.yml
+++ /dev/null
@@ -1,108 +0,0 @@
-#################
-# QTIP weekly job
-#################
-- project:
- name: qtip-weekly
- project: qtip
-
-#--------------------------------
-# BRANCH ANCHORS
-#--------------------------------
- danube: &danube
- stream: danube
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
- docker-tag: 'stable'
-
-#--------------------------------
-# JOB VARIABLES
-#--------------------------------
- pod:
- - zte-pod1:
- installer: fuel
- scenario: os-odl_l2-nofeature-ha
- <<: *danube
- - zte-pod3:
- installer: fuel
- scenario: os-nosdn-nofeature-ha
- <<: *danube
- - zte-pod3:
- installer: fuel
- scenario: os-nosdn-kvm-ha
- <<: *danube
-
-#--------------------------------
-# JOB LIST
-#--------------------------------
- jobs:
- - 'qtip-{scenario}-{pod}-weekly-{stream}'
-
-################################
-# job templates
-################################
-- job-template:
- name: 'qtip-{scenario}-{pod}-weekly-{stream}'
- disabled: false
- parameters:
- - project-parameter:
- project: '{project}'
- branch: '{branch}'
- - '{installer}-defaults'
- - '{pod}-defaults'
- - string:
- name: DEPLOY_SCENARIO
- default: '{scenario}'
- - string:
- name: DOCKER_TAG
- default: '{docker-tag}'
- description: 'Tag to pull docker image'
- - string:
- name: CI_DEBUG
- default: 'false'
- description: "Show debug output information"
- scm:
- - git-scm
- triggers:
- - 'qtip-{scenario}-{pod}-weekly-{stream}-trigger'
- builders:
- - description-setter:
- description: "POD: $NODE_NAME"
- - qtip-validate-deploy-weekly
- publishers:
- - email:
- recipients: wu.zhihui1@zte.com.cn, zhang.yujunz@zte.com.cn
- - email-jenkins-admins-on-failure
-
-################
-# MARCOS
-################
-
-#---------
-# builder
-#---------
-- builder:
- name: qtip-validate-deploy-weekly
- builders:
- - shell:
- !include-raw: ./helpers/cleanup-deploy.sh
- - shell:
- !include-raw: ./helpers/validate-deploy.sh
-
-#---------
-# trigger
-#---------
-
-- trigger:
- name: 'qtip-os-odl_l2-nofeature-ha-zte-pod1-weekly-danube-trigger'
- triggers:
- - timed: '0 7 * * 0'
-
-- trigger:
- name: 'qtip-os-nosdn-kvm-ha-zte-pod3-weekly-danube-trigger'
- triggers:
- - timed: '0 7 * * 0'
-
-- trigger:
- name: 'qtip-os-nosdn-nofeature-ha-zte-pod3-weekly-danube-trigger'
- triggers:
- - timed: '30 0 * * 0'