summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/apex/apex.yml7
-rw-r--r--jjb/joid/joid-ci-jobs.yml69
-rw-r--r--jjb/joid/joid-deploy.sh48
-rw-r--r--jjb/opnfv/installer-params.yml8
-rw-r--r--jjb/opnfv/opnfv-docker.sh20
-rw-r--r--jjb/opnfv/opnfv-docker.yml2
-rw-r--r--jjb/qtip/qtip.yml9
-rw-r--r--jjb/releng-macros.yaml10
-rw-r--r--jjb/yardstick/yardstick-ci-jobs.yml52
9 files changed, 142 insertions, 83 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index be595d4a3..a2c105366 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -300,6 +300,13 @@
build-step-failure-threshold: 'never'
failure-threshold: 'never'
unstable-threshold: 'FAILURE'
+ - trigger-builds:
+ - project: 'yardstick-apex-opnfv-jump-1-daily-{stream}'
+ block: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ failure-threshold: 'never'
+ unstable-threshold: 'FAILURE'
########################
# parameter macros
diff --git a/jjb/joid/joid-ci-jobs.yml b/jjb/joid/joid-ci-jobs.yml
index 05064de1f..79262eb61 100644
--- a/jjb/joid/joid-ci-jobs.yml
+++ b/jjb/joid/joid-ci-jobs.yml
@@ -36,27 +36,34 @@
- orange-pod2:
<<: *master
#--------------------------------
-# please check the triggers before enabling any of the controllers!!!
- sdn-controller:
- - 'odl':
- disabled: false
-# commented out below controllers to get Arno scenario settled first
-# - 'nosdn':
-# disabled: true
- - 'onos':
- disabled: false
-# - 'opencontrail':
-# disabled: true
+# new scenario descriptions
+ scenario:
+ - 'os-nosdn-nofeature-noha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-nosdn-nofeature-ha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-odl_l2-nofeature-ha':
+ auto-trigger-name: 'joid-{scenario}-{pod}-trigger'
+ - 'os-odl_l2-nofeature-noha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-onos-nofeature-ha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-onos-nofeature-noha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-ocl-nofeature-ha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-ocl-nofeature-noha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
jobs:
- - 'joid-{sdn-controller}-{pod}-daily-{stream}'
+ - 'joid-{scenario}-{pod}-daily-{stream}'
- 'joid-deploy-{pod}-daily-{stream}'
########################
# job templates
########################
- job-template:
- name: 'joid-{sdn-controller}-{pod}-daily-{stream}'
+ name: 'joid-{scenario}-{pod}-daily-{stream}'
project-type: multijob
@@ -66,10 +73,10 @@
wrappers:
- build-name:
- name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Scenario: $DEPLOY_SCENARIO'
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
triggers:
- - 'joid-{pod}-{sdn-controller}-trigger'
+ - '{auto-trigger-name}'
parameters:
- project-parameter:
@@ -77,17 +84,8 @@
- '{installer}-defaults'
- '{pod}-defaults'
- string:
- name: SDN_CONTROLLER
- default: '{sdn-controller}'
- - string:
name: DEPLOY_SCENARIO
- default: 'none'
-
- scm:
- - git-scm:
- credentials-id: '{ssh-credentials}'
- refspec: ''
- branch: '{branch}'
+ default: '{scenario}'
builders:
- multijob:
@@ -96,7 +94,6 @@
projects:
- name: 'joid-deploy-{pod}-daily-{stream}'
current-parameters: true
- git-revision: true
kill-phase-on: FAILURE
- multijob:
name: functest
@@ -122,7 +119,7 @@
wrappers:
- build-name:
- name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Scenario: $DEPLOY_SCENARIO'
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
- timeout:
timeout: 180
fail: true
@@ -162,26 +159,14 @@
# trigger macros
########################
- trigger:
- name: 'joid-intel-pod5-odl-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-intel-pod5-trigger'
triggers:
- timed: '0 2 * * *'
- trigger:
- name: 'joid-intel-pod6-odl-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-intel-pod6-trigger'
triggers:
- timed: '0 2 * * *'
- trigger:
- name: 'joid-orange-pod2-odl-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-intel-pod5-onos-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-intel-pod6-onos-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-orange-pod2-onos-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-orange-pod2-trigger'
triggers:
- timed: ''
diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh
index e23afac1c..b50923f98 100644
--- a/jjb/joid/joid-deploy.sh
+++ b/jjb/joid/joid-deploy.sh
@@ -69,11 +69,51 @@ fi
## Configure Joid deployment
##
-# Get juju deployer file
-if [ "$HA_MODE" == 'nonha' ]; then
- SRCBUNDLE=$WORKSPACE/ci/$SDN_CONTROLLER/juju-deployer/ovs-$SDN_CONTROLLER.yaml
+# Based on scenario naming we can get joid options
+# naming convention:
+# os-<controller>-<nfvfeature>-<mode>[-<extrastuff>]
+# With parameters:
+# controller=(nosdn|odl_l3|odl_l2|onos|ocl)
+# No odl_l3 today
+# nfvfeature=(kvm|ovs|dpdk|nofeature)
+# '_' list separated.
+# mode=(ha|noha)
+# extrastuff=(none)
+# Optional field - Not used today
+
+IFS='-' read -r -a DEPLOY_OPTIONS <<< "${DEPLOY_SCENARIO}--"
+#last -- need to avoid nounset error
+
+SDN_CONTROLLER=${DEPLOY_OPTIONS[1]}
+NFV_FEATURES=${DEPLOY_OPTIONS[2]}
+HA_MODE=${DEPLOY_OPTIONS[3]}
+EXTRA=${DEPLOY_OPTIONS[4]}
+
+# Get the juju config path with those options, later we will directly use
+# scenario name
+case $SDN_CONTROLLER in
+ odl_l2)
+ SRCBUNDLE="ovs-odl"
+ ;;
+ onos)
+ SRCBUNDLE="onos"
+ ;;
+ ocl)
+ SRCBUNDLE="contrail"
+ SDN_CONTROLLER="opencontrail"
+ ;;
+ *)
+ SRCBUNDLE="ovs"
+ echo "${SDN_CONTROLLER} not in SDN controllers list, using 'nosdn' setting"
+ SDN_CONTROLLER="nosdn"
+ ;;
+ esac
+SRCBUNDLE="${WORKSPACE}/ci/${SDN_CONTROLLER}/juju-deployer/${SRCBUNDLE}"
+if [ "$HA_MODE" == 'noha' ]; then
+ SRCBUNDLE="${SRCBUNDLE}.yaml"
+ HA_MODE == 'nonha'
else
- SRCBUNDLE=$WORKSPACE/ci/$SDN_CONTROLLER/juju-deployer/ovs-$SDN_CONTROLLER-$HA_MODE.yaml
+ SRCBUNDLE="${SRCBUNDLE}-${HA_MODE}.yaml"
fi
# Modify files
diff --git a/jjb/opnfv/installer-params.yml b/jjb/opnfv/installer-params.yml
index aaa5d83b7..08f90c65c 100644
--- a/jjb/opnfv/installer-params.yml
+++ b/jjb/opnfv/installer-params.yml
@@ -78,18 +78,10 @@
default: joid
description: 'Installer used for deploying OPNFV on this POD'
- string:
- name: SDN_CONTROLLER
- default: 'nosdn'
- description: 'SDN Controller to use'
- - string:
name: DEPLOY_SCENARIO
default: 'none'
description: 'Scenario to deploy and test'
- string:
- name: HA_MODE
- default: 'ha'
- description: 'High Availability mode (ha|nonha)'
- - string:
name: OS_RELEASE
default: 'liberty'
description: 'OpenStack release (kilo|liberty)'
diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh
index 02ceecfd8..108485d0b 100644
--- a/jjb/opnfv/opnfv-docker.sh
+++ b/jjb/opnfv/opnfv-docker.sh
@@ -12,12 +12,12 @@ echo
# Remove previous running containers if exist
if [[ ! -z $(docker ps -a | grep $DOCKER_REPO_NAME) ]]; then
echo "Removing existing $DOCKER_REPO_NAME containers..."
- #docker ps | grep $DOCKER_REPO_NAME | awk '{{print $1}}' | xargs docker stop
- docker ps -a | grep $DOCKER_REPO_NAME | awk '{{print $1}}' | xargs docker rm -f
+ #docker ps | grep $DOCKER_REPO_NAME | awk '{print $1}' | xargs docker stop
+ docker ps -a | grep $DOCKER_REPO_NAME | awk '{print $1}' | xargs docker rm -f
t=60
# Wait max 60 sec for containers to be removed
- while [ $t -gt 0 ]; do
- ids=$(docker ps | grep $DOCKER_REPO_NAME |awk '{{print $1}}')
+ while [[ $t -gt 0 ]]; do
+ ids=$(docker ps | grep $DOCKER_REPO_NAME |awk '{print $1}')
if [[ -z $ids ]]; then
break
fi
@@ -31,8 +31,8 @@ fi
if [[ ! -z $(docker images | grep $DOCKER_REPO_NAME) ]]; then
echo "Docker images to remove:"
docker images | head -1 && docker images | grep $DOCKER_REPO_NAME
- image_tags=($(docker images | grep $DOCKER_REPO_NAME | awk '{{print $2}}'))
- for tag in "${{image_tags[@]}}"; do
+ image_tags=($(docker images | grep $DOCKER_REPO_NAME | awk '{print $2}'))
+ for tag in "${image_tags[@]}"; do
echo "Removing docker image $DOCKER_REPO_NAME:$tag..."
docker rmi -f $DOCKER_REPO_NAME:$tag
done
@@ -68,10 +68,10 @@ else
fi
# Get tag version
-branch=$(git rev-parse --abbrev-ref HEAD)
+branch="${GIT_BRANCH##origin/}"
echo "Current branch: $branch"
-if [ $branch == "master" ]; then
+if [[ "$branch" == "master" ]]; then
DOCKER_TAG="master"
else
git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng
@@ -80,7 +80,7 @@ else
-n $DOCKER_REPO_NAME)
ret_val=$?
- if [ $ret_val -ne 0 ]; then
+ if [[ $ret_val -ne 0 ]]; then
echo "Error retrieving the version tag."
exit 1
fi
@@ -91,7 +91,7 @@ echo "Tag version to be build and pushed: $DOCKER_TAG"
# Start the build
echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG..."
-docker build -t $DOCKER_REPO_NAME:$DOCKER_TAG .
+docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG .
echo "Creating tag 'latest'..."
docker tag $DOCKER_REPO_NAME:$DOCKER_TAG $DOCKER_REPO_NAME:latest
diff --git a/jjb/opnfv/opnfv-docker.yml b/jjb/opnfv/opnfv-docker.yml
index 54ebea6f9..c16e33eda 100644
--- a/jjb/opnfv/opnfv-docker.yml
+++ b/jjb/opnfv/opnfv-docker.yml
@@ -66,7 +66,7 @@
builders:
- shell:
- !include-raw ./opnfv-docker.sh
+ !include-raw-escape: ./opnfv-docker.sh
triggers:
- pollscm:
diff --git a/jjb/qtip/qtip.yml b/jjb/qtip/qtip.yml
index c442c6cd9..1f761dec0 100644
--- a/jjb/qtip/qtip.yml
+++ b/jjb/qtip/qtip.yml
@@ -136,7 +136,10 @@
name: qtip-run-suite
builders:
- shell: |
- #!/bin/bash
+ #!/bin/basih
+ echo "The container id is:"
+ container_id=$(docker ps | grep 'opnfv/qtip:latest' | awk '{print $1}' | head -1)
+ echo $container_id
QTIP_REPO=/home/opnfv/repos/qtip
docker exec -t ${container_id} $QTIP_REPO/docker/run_qtip.sh
@@ -151,9 +154,9 @@
# Remove previous running containers if exist
if [[ ! -z $(docker ps -a | grep opnfv/qtip) ]]; then
echo "Removing existing opnfv/qtip containers..."
- running_containers= $(docker ps | grep opnfv/qtip | awk '{print $1}')
+ running_containers=$(docker ps | grep opnfv/qtip | awk '{print $1}')
docker stop ${running_containers}
- all_containers= $(docker ps -a | grep opnfv/qtip | awk '{print $1}')
+ all_containers=$(docker ps -a | grep opnfv/qtip | awk '{print $1}')
docker rm ${all_containers}
fi
diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml
index 1f812f038..5d9570705 100644
--- a/jjb/releng-macros.yaml
+++ b/jjb/releng-macros.yaml
@@ -57,6 +57,16 @@
fail: true
- trigger:
+ name: 'brahmaputra-trigger-daily-disabled'
+ triggers:
+ - timed: ''
+
+- trigger:
+ name: 'brahmaputra-trigger-daily-enabled'
+ triggers:
+ - timed: '0 2 * * *'
+
+- trigger:
name: gerrit-trigger-patch-submitted
triggers:
- gerrit:
diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml
index 61f5b5918..de79bce79 100644
--- a/jjb/yardstick/yardstick-ci-jobs.yml
+++ b/jjb/yardstick/yardstick-ci-jobs.yml
@@ -23,6 +23,9 @@
# brahmaputra
#--------------------------------
pod:
+ - opnfv-jump-1:
+ installer: apex
+ <<: *brahmaputra
- opnfv-jump-2:
installer: fuel
<<: *brahmaputra
@@ -53,6 +56,9 @@
- orange-pod2:
installer: joid
<<: *master
+ - opnfv-jump-1:
+ installer: apex
+ <<: *master
#--------------------------------
loop:
- daily
@@ -106,25 +112,35 @@
builders:
- shell: |
#!/bin/bash
- set -o errexit
+ set +e
+ # labconfig is used only for joid
+ labconfig=""
+ sshkey=""
+ if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
+ instack_mac=$(sudo virsh domiflist instack | grep default | \
+ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
+ INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
+ sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
+ sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
+ sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
+ elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
+ # If production lab then creds may be retrieved dynamically
+ # creds are on the jumphost, always in the same folder
+ labconfig="-v $LAB_CONFIG/admin-openrc:/home/opnfv/openrc"
+ # If dev lab, credentials may not be the default ones, just provide a path to put them into docker
+ # replace the default one by the customized one provided by jenkins config
+ fi
- echo "Yardstick: Run benchmark test suites ..."
+ opts="--privileged=true --rm"
+ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} -e YARDSTICK_BRANCH=${GERRIT_BRANCH}"
# Pull the latest image
docker pull opnfv/yardstick
- docker run \
- --privileged=true \
- --rm \
- -t \
- -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \
- -e "INSTALLER_IP=${INSTALLER_IP}" \
- -e "POD_NAME=${NODE_NAME}" \
- -e "EXTERNAL_NETWORK=${EXTERNAL_NETWORK}" \
- -e "YARDSTICK_BRANCH=${GERRIT_BRANCH}" \
- opnfv/yardstick \
- run_tests.sh $YARDSTICK_DB_BACKEND \
- $YARDSTICK_SUITE_NAME
+ # Run docker
+ cmd="sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/yardstick run_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SUITE_NAME}"
+ echo "Yardstick: Running docker cmd: ${cmd}"
+ ${cmd}
echo "Yardstick: done!"
@@ -201,7 +217,13 @@
name: YARDSTICK_DB_BACKEND
default: ''
description: 'Arguments to use in order to choose the backend DB'
-
+- parameter:
+ name: 'yardstick-params-opnfv-jump-1'
+ parameters:
+ - string:
+ name: YARDSTICK_DB_BACKEND
+ default: '-r 213.77.62.197/results'
+ description: 'Arguments to use in order to choose the backend DB'
- parameter:
name: 'yardstick-params-opnfv-jump-2'
parameters: