summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/doctor/doctor.yml6
-rw-r--r--jjb/dovetail/dovetail-ci-jobs.yml177
-rwxr-xr-xjjb/dovetail/dovetail-cleanup.sh20
-rwxr-xr-xjjb/dovetail/dovetail-run.sh52
-rw-r--r--jjb/opnfv/opnfv-docs.yml6
-rw-r--r--jjb/qtip/qtip-cleanup.sh10
6 files changed, 262 insertions, 9 deletions
diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml
index 2010e1229..f93ac9bef 100644
--- a/jjb/doctor/doctor.yml
+++ b/jjb/doctor/doctor.yml
@@ -136,3 +136,9 @@
TESTCASE_OPTIONS=-e INSPECTOR_TYPE=congress -v $WORKSPACE:$HOME/opnfv/repos/doctor
block: true
same-node: true
+ - shell: |
+ logfile=$HOME/opnfv/functest/results/{stream}/doctor.log
+ echo
+ echo "[$logfile]"
+ echo
+ [ -e $logfile ] && cat $logfile
diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml
new file mode 100644
index 000000000..9d2f69da9
--- /dev/null
+++ b/jjb/dovetail/dovetail-ci-jobs.yml
@@ -0,0 +1,177 @@
+###################################
+# job configuration for dovetail
+###################################
+- project:
+ name: dovetail
+
+ project: '{name}'
+
+#---------------------------------------
+# BRANCH ANCHORS
+#---------------------------------------
+# 1)the stream/branch here represents the SUT(System Under Test) stream/branch
+# 2)docker-tag is the docker tag of dovetail(only master by now, then all latest used)
+# the dovetail stream is one-to-one mapping with dovetail docker-tag
+# the dovetail is not sync with A/B/C release
+#
+ master: &master
+ stream: master
+ branch: '{stream}'
+ gs-pathname: ''
+ docker-tag: 'latest'
+ colorado: &colorado
+ stream: colorado
+ branch: 'stable/{stream}'
+ gs-pathname: '{stream}'
+ docker-tag: 'latest'
+
+#-----------------------------------
+# POD, PLATFORM, AND BRANCH MAPPING
+#-----------------------------------
+# CI PODs
+# This section should only contain the SUTs
+# that have been switched using labels for slaves
+#------------------------------------------------
+# the pods, SUTs listed here are just examples to
+# let the dovetail tool run, there can be more ways beside CI to
+# run the dovetail tool.
+# pods, SUTs will be added/adjusted when needed
+ pod:
+# fuel CI PODs
+ - baremetal:
+ slave-label: fuel-baremetal
+ SUT: fuel
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *master
+ - virtual:
+ slave-label: fuel-virtual
+ SUT: fuel
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *master
+ - baremetal:
+ slave-label: fuel-baremetal
+ SUT: fuel
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *colorado
+ - virtual:
+ slave-label: fuel-virtual
+ SUT: fuel
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *colorado
+#compass CI PODs
+ - baremetal:
+ slave-label: compass-baremetal
+ SUT: compass
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *master
+ - virtual:
+ slave-label: compass-virtual
+ SUT: compass
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *master
+ - baremetal:
+ slave-label: compass-baremetal
+ SUT: compass
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *colorado
+ - virtual:
+ slave-label: compass-virtual
+ SUT: compass
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *colorado
+#--------------------------------
+# None-CI PODs
+#--------------------------------
+ - huawei-pod5:
+ slave-label: '{pod}'
+ SUT: compass
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *master
+#--------------------------------
+ testsuite:
+ - 'basic'
+
+ jobs:
+ - 'dovetail-{SUT}-{pod}-{testsuite}-{stream}'
+
+################################
+# job templates
+################################
+- job-template:
+ name: 'dovetail-{SUT}-{pod}-{testsuite}-{stream}'
+
+ disabled: false
+
+ concurrent: true
+
+ properties:
+ - throttle:
+ enabled: true
+ max-per-node: 1
+ option: 'project'
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+ - timeout:
+ timeout: 180
+ abort: true
+
+ triggers:
+ - '{auto-trigger-name}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - '{SUT}-defaults'
+ - '{slave-label}-defaults'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: 'os-nosdn-nofeature-ha'
+ - string:
+ name: DOCKER_TAG
+ default: '{docker-tag}'
+ description: 'Tag to pull docker image'
+ - string:
+ name: CI_DEBUG
+ default: 'true'
+ description: "Show debug output information"
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ builders:
+ - description-setter:
+ description: "POD: $NODE_NAME"
+ - 'dovetail-cleanup'
+ - 'dovetail-{testsuite}'
+
+ publishers:
+ - archive:
+ artifacts: 'results/**/*'
+ allow-empty: true
+ fingerprint: true
+
+########################
+# builder macros
+########################
+- builder:
+ name: dovetail-basic
+ builders:
+ - shell:
+ !include-raw: ./dovetail-run.sh
+
+- builder:
+ name: dovetail-fetch-os-creds
+ builders:
+ - shell:
+ !include-raw: ../../utils/fetch_os_creds.sh
+
+- builder:
+ name: dovetail-cleanup
+ builders:
+ - shell:
+ !include-raw: ./dovetail-cleanup.sh
diff --git a/jjb/dovetail/dovetail-cleanup.sh b/jjb/dovetail/dovetail-cleanup.sh
new file mode 100755
index 000000000..297222bb3
--- /dev/null
+++ b/jjb/dovetail/dovetail-cleanup.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
+
+echo "Cleaning up docker containers/images..."
+# Remove previous running containers if exist
+if [[ ! -z $(docker ps -a | grep opnfv/dovetail) ]]; then
+ echo "Removing existing opnfv/dovetail containers..."
+ docker ps -a | grep opnfv/dovetail | awk '{print $1}' | xargs docker rm -f >$redirect
+fi
+
+# Remove existing images if exist
+if [[ ! -z $(docker images | grep opnfv/dovetail) ]]; then
+ echo "Docker images to remove:"
+ docker images | head -1 && docker images | grep opnfv/dovetail
+ image_tags=($(docker images | grep opnfv/dovetail | awk '{print $2}'))
+ for tag in "${image_tags[@]}"; do
+ echo "Removing docker image opnfv/dovetail:$tag..."
+ docker rmi opnfv/dovetail:$tag >$redirect
+ done
+fi
diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh
new file mode 100755
index 000000000..6453425ce
--- /dev/null
+++ b/jjb/dovetail/dovetail-run.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+#the noun INSTALLER is used in community, here is just the example to run.
+#multi-platforms are supported.
+
+set -e
+[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
+
+# labconfig is used only for joid
+labconfig=""
+sshkey=""
+if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
+ instack_mac=$(sudo virsh domiflist undercloud | 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"
+ if [[ -n $(sudo iptables -L FORWARD |grep "REJECT"|grep "reject-with icmp-port-unreachable") ]]; then
+ #note: this happens only in opnfv-lf-pod1
+ 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
+ fi
+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
+
+# Set iptables rule to allow forwarding return traffic for container
+if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then
+ sudo iptables -I FORWARD -j RETURN
+fi
+
+opts="--privileged=true --rm"
+envs="-e CI_DEBUG=${CI_DEBUG} \
+ -v /var/run/docker.sock:/var/run/docker.sock \
+ -v /home/opnfv/dovetail/results:/home/opnfv/dovetail/results"
+
+# Pull the image with correct tag
+echo "Dovetail: Pulling image opnfv/dovetail:${DOCKER_TAG}"
+docker pull opnfv/dovetail:$DOCKER_TAG >$redirect
+
+# Run docker
+echo "Dovetail: docker running..."
+sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/dovetail:${DOCKER_TAG} \
+"/home/opnfv/dovetail/scripts/run.py"
+
+echo "Dovetail: store results..."
+sudo cp -r /home/opnfv/dovetail/results ./
+
+echo "Dovetail: done!"
diff --git a/jjb/opnfv/opnfv-docs.yml b/jjb/opnfv/opnfv-docs.yml
index 743657334..0ac8aa7e0 100644
--- a/jjb/opnfv/opnfv-docs.yml
+++ b/jjb/opnfv/opnfv-docs.yml
@@ -14,11 +14,13 @@
stream:
- master:
branch: '{stream}'
+ doc-version: ''
gs-pathname: ''
disabled: false
- colorado:
branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
+ doc-version: '2.0'
+ gs-pathname: '/{stream}/{doc-version}'
disabled: false
########################
@@ -82,7 +84,7 @@
- string:
name: GS_URL
default: '$GS_BASE{gs-pathname}'
- description: "Directory where the build artifact will be located upon the completion of the build."
+ description: "Directory where the build artifact will be located upon the completion of the build."
scm:
- gerrit-trigger-scm:
diff --git a/jjb/qtip/qtip-cleanup.sh b/jjb/qtip/qtip-cleanup.sh
index b923aa2a8..95babb318 100644
--- a/jjb/qtip/qtip-cleanup.sh
+++ b/jjb/qtip/qtip-cleanup.sh
@@ -6,15 +6,12 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-echo "Cleaning up QTIP docker containers/images..."
-
# 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}')
- docker stop ${running_containers}
- all_containers=$(docker ps -a | grep opnfv/qtip | awk '{print $1}')
- docker rm ${all_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 | awk '{print $1}')
fi
# Remove existing images if exist
@@ -27,4 +24,3 @@ if [[ ! -z $(docker images | grep opnfv/qtip) ]]; then
docker rmi opnfv/qtip:$tag
done
fi
-