| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,38 +0,0 @@ |
| 1 |
-Getting Started With Jenkins and Devstack |
|
| 2 |
-========================================= |
|
| 3 |
-This little corner of devstack is to show how to get an OpenStack jenkins |
|
| 4 |
-environment up and running quickly, using the rcb configuration methodology. |
|
| 5 |
- |
|
| 6 |
- |
|
| 7 |
-To create a jenkins server |
|
| 8 |
- |
|
| 9 |
- cd tools/jenkins/jenkins_home |
|
| 10 |
- ./build_jenkins.sh |
|
| 11 |
- |
|
| 12 |
-This will create a jenkins environment configured with sample test scripts that run against xen and kvm. |
|
| 13 |
- |
|
| 14 |
-Configuring XS |
|
| 15 |
-In order to make the tests for XS work, you must install xs 5.6 on a separate machine, |
|
| 16 |
-and install the the jenkins public key on that server. You then need to create the |
|
| 17 |
-/var/lib/jenkins/xenrc on your jenkins server like so: |
|
| 18 |
- |
|
| 19 |
- MYSQL_PASSWORD=secrete |
|
| 20 |
- SERVICE_TOKEN=secrete |
|
| 21 |
- ADMIN_PASSWORD=secrete |
|
| 22 |
- RABBIT_PASSWORD=secrete |
|
| 23 |
- # This is the password for your guest (for both stack and root users) |
|
| 24 |
- GUEST_PASSWORD=secrete |
|
| 25 |
- # Do not download the usual images yet! |
|
| 26 |
- IMAGE_URLS="" |
|
| 27 |
- FLOATING_RANGE=192.168.1.224/28 |
|
| 28 |
- VIRT_DRIVER=xenserver |
|
| 29 |
- # Explicitly set multi-host |
|
| 30 |
- MULTI_HOST=1 |
|
| 31 |
- # Give extra time for boot |
|
| 32 |
- ACTIVE_TIMEOUT=45 |
|
| 33 |
- # IMPORTANT: This is the ip of your xenserver |
|
| 34 |
- XEN_IP=10.5.5.1 |
|
| 35 |
- # IMPORTANT: The following must be set to your dom0 root password! |
|
| 36 |
- XENAPI_PASSWORD='MY_XEN_ROOT_PW' |
| 37 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,9 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
-# Echo commands, exit on error |
|
| 3 |
-set -o xtrace |
|
| 4 |
-set -o errexit |
|
| 5 |
- |
|
| 6 |
-TOP_DIR=$(cd ../../.. && pwd) |
|
| 7 |
-HEAD_IP=`cat $TOP_DIR/addresses | grep HEAD | cut -d "=" -f2` |
|
| 8 |
-die_if_not_set $LINENO HEAD_IP "Failure retrieving HEAD_IP" |
|
| 9 |
-ssh stack@$HEAD_IP 'cd devstack && source openrc && cd exercises && ./euca.sh' |
| 10 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,9 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
-# Echo commands, exit on error |
|
| 3 |
-set -o xtrace |
|
| 4 |
-set -o errexit |
|
| 5 |
- |
|
| 6 |
-TOP_DIR=$(cd ../../.. && pwd) |
|
| 7 |
-HEAD_IP=`cat $TOP_DIR/addresses | grep HEAD | cut -d "=" -f2` |
|
| 8 |
-die_if_not_set $LINENO HEAD_IP "Failure retrieving HEAD_IP" |
|
| 9 |
-ssh stack@$HEAD_IP 'cd devstack && source openrc && cd exercises && ./floating_ips.sh' |
| 10 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,8 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
-# Echo commands, exit on error |
|
| 3 |
-set -o xtrace |
|
| 4 |
-set -o errexit |
|
| 5 |
- |
|
| 6 |
-TOP_DIR=$(cd ../../.. && pwd) |
|
| 7 |
-HEAD_IP=`cat $TOP_DIR/addresses | grep HEAD | cut -d "=" -f2` |
|
| 8 |
-ssh stack@$HEAD_IP 'cd devstack && source openrc && cd exercises && ./swift.sh' |
| 9 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,9 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
-# Echo commands, exit on error |
|
| 3 |
-set -o xtrace |
|
| 4 |
-set -o errexit |
|
| 5 |
- |
|
| 6 |
-TOP_DIR=$(cd ../../.. && pwd) |
|
| 7 |
-HEAD_IP=`cat $TOP_DIR/addresses | grep HEAD | cut -d "=" -f2` |
|
| 8 |
-die_if_not_set $LINENO HEAD_IP "Failure retrieving HEAD_IP" |
|
| 9 |
-ssh stack@$HEAD_IP 'cd devstack && source openrc && cd exercises && ./volumes.sh' |
| 10 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,21 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
- |
|
| 3 |
-EXECUTOR_NUMBER=$1 |
|
| 4 |
-CONFIGURATION=$2 |
|
| 5 |
-ADAPTER=$3 |
|
| 6 |
-RC=$4 |
|
| 7 |
- |
|
| 8 |
-function usage {
|
|
| 9 |
- echo "Usage: $0 - Build a configuration" |
|
| 10 |
- echo "" |
|
| 11 |
- echo "$0 [EXECUTOR_NUMBER] [CONFIGURATION] [ADAPTER] [RC (optional)]" |
|
| 12 |
- exit 1 |
|
| 13 |
-} |
|
| 14 |
- |
|
| 15 |
-# Validate inputs |
|
| 16 |
-if [[ "$EXECUTOR_NUMBER" = "" || "$CONFIGURATION" = "" || "$ADAPTER" = "" ]]; then |
|
| 17 |
- usage |
|
| 18 |
-fi |
|
| 19 |
- |
|
| 20 |
-# Execute configuration script |
|
| 21 |
-cd configurations && ./$CONFIGURATION.sh $EXECUTOR_NUMBER $CONFIGURATION $ADAPTER "$RC" |
| 22 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,64 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
- |
|
| 3 |
-# exit on error to stop unexpected errors |
|
| 4 |
-set -o errexit |
|
| 5 |
-set -o xtrace |
|
| 6 |
- |
|
| 7 |
-EXECUTOR_NUMBER=$1 |
|
| 8 |
-CONFIGURATION=$2 |
|
| 9 |
-ADAPTER=$3 |
|
| 10 |
-RC=$4 |
|
| 11 |
- |
|
| 12 |
-function usage {
|
|
| 13 |
- echo "Usage: $0 - Build a test configuration" |
|
| 14 |
- echo "" |
|
| 15 |
- echo "$0 [EXECUTOR_NUMBER] [CONFIGURATION] [ADAPTER] [RC (optional)]" |
|
| 16 |
- exit 1 |
|
| 17 |
-} |
|
| 18 |
- |
|
| 19 |
-# Validate inputs |
|
| 20 |
-if [[ "$EXECUTOR_NUMBER" = "" || "$CONFIGURATION" = "" || "$ADAPTER" = "" ]]; then |
|
| 21 |
- usage |
|
| 22 |
-fi |
|
| 23 |
- |
|
| 24 |
-# This directory |
|
| 25 |
-CUR_DIR=$(cd $(dirname "$0") && pwd) |
|
| 26 |
- |
|
| 27 |
-# devstack directory |
|
| 28 |
-cd ../../.. |
|
| 29 |
-TOP_DIR=$(pwd) |
|
| 30 |
- |
|
| 31 |
-# Deps |
|
| 32 |
-apt-get install -y --force-yes libvirt-bin || true |
|
| 33 |
- |
|
| 34 |
-# Name test instance based on executor |
|
| 35 |
-BASE_NAME=executor-`printf "%02d" $EXECUTOR_NUMBER` |
|
| 36 |
-GUEST_NAME=$BASE_NAME.$ADAPTER |
|
| 37 |
-virsh list | grep $BASE_NAME | cut -d " " -f1 | xargs -n 1 virsh destroy || true |
|
| 38 |
-virsh net-list | grep $BASE_NAME | cut -d " " -f1 | xargs -n 1 virsh net-destroy || true |
|
| 39 |
- |
|
| 40 |
-# Configure localrc |
|
| 41 |
-cat <<EOF >localrc |
|
| 42 |
-RECLONE=yes |
|
| 43 |
-GUEST_NETWORK=$EXECUTOR_NUMBER |
|
| 44 |
-GUEST_NAME=$GUEST_NAME |
|
| 45 |
-FLOATING_RANGE=192.168.$EXECUTOR_NUMBER.128/27 |
|
| 46 |
-GUEST_CORES=1 |
|
| 47 |
-GUEST_RAM=12574720 |
|
| 48 |
-MYSQL_PASSWORD=chicken |
|
| 49 |
-RABBIT_PASSWORD=chicken |
|
| 50 |
-SERVICE_TOKEN=chicken |
|
| 51 |
-SERVICE_PASSWORD=chicken |
|
| 52 |
-ADMIN_PASSWORD=chicken |
|
| 53 |
-USERNAME=admin |
|
| 54 |
-TENANT=admin |
|
| 55 |
-NET_NAME=$BASE_NAME |
|
| 56 |
-ACTIVE_TIMEOUT=45 |
|
| 57 |
-BOOT_TIMEOUT=45 |
|
| 58 |
-$RC |
|
| 59 |
-EOF |
|
| 60 |
-cd tools |
|
| 61 |
-sudo ./build_uec.sh |
|
| 62 |
- |
|
| 63 |
-# Make the address of the instances available to test runners |
|
| 64 |
-echo HEAD=`cat /var/lib/libvirt/dnsmasq/$BASE_NAME.leases | cut -d " " -f3` > $TOP_DIR/addresses |
| 65 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,53 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
-set -o errexit |
|
| 3 |
-set -o xtrace |
|
| 4 |
- |
|
| 5 |
- |
|
| 6 |
-EXECUTOR_NUMBER=$1 |
|
| 7 |
-CONFIGURATION=$2 |
|
| 8 |
-ADAPTER=$3 |
|
| 9 |
-RC=$4 |
|
| 10 |
- |
|
| 11 |
-function usage {
|
|
| 12 |
- echo "Usage: $0 - Build a test configuration" |
|
| 13 |
- echo "" |
|
| 14 |
- echo "$0 [EXECUTOR_NUMBER] [CONFIGURATION] [ADAPTER] [RC (optional)]" |
|
| 15 |
- exit 1 |
|
| 16 |
-} |
|
| 17 |
- |
|
| 18 |
-# Validate inputs |
|
| 19 |
-if [[ "$EXECUTOR_NUMBER" = "" || "$CONFIGURATION" = "" || "$ADAPTER" = "" ]]; then |
|
| 20 |
- usage |
|
| 21 |
-fi |
|
| 22 |
- |
|
| 23 |
-# Configuration of xenrc |
|
| 24 |
-XENRC=/var/lib/jenkins/xenrc |
|
| 25 |
-if [ ! -e $XENRC ]; then |
|
| 26 |
- echo "/var/lib/jenkins/xenrc is not present! See README.md" |
|
| 27 |
- exit 1 |
|
| 28 |
-fi |
|
| 29 |
- |
|
| 30 |
-# Move to top of devstack |
|
| 31 |
-cd ../../.. |
|
| 32 |
- |
|
| 33 |
-# Use xenrc as the start of our localrc |
|
| 34 |
-cp $XENRC localrc |
|
| 35 |
- |
|
| 36 |
-# Set the PUB_IP |
|
| 37 |
-PUB_IP=192.168.1.1$EXECUTOR_NUMBER |
|
| 38 |
-echo "PUB_IP=$PUB_IP" >> localrc |
|
| 39 |
- |
|
| 40 |
-# Overrides |
|
| 41 |
-echo "$RC" >> localrc |
|
| 42 |
- |
|
| 43 |
-# Source localrc |
|
| 44 |
-. localrc |
|
| 45 |
- |
|
| 46 |
-# Make host ip available to tester |
|
| 47 |
-echo "HEAD=$PUB_IP" > addresses |
|
| 48 |
- |
|
| 49 |
-# Build configuration |
|
| 50 |
-REMOTE_DEVSTACK=/root/devstack |
|
| 51 |
-ssh root@$XEN_IP "rm -rf $REMOTE_DEVSTACK" |
|
| 52 |
-scp -pr . root@$XEN_IP:$REMOTE_DEVSTACK |
|
| 53 |
-ssh root@$XEN_IP "cd $REMOTE_DEVSTACK/tools/xen && ./build_domU.sh" |
| 4 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,108 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
- |
|
| 3 |
-# Echo commands, exit on error |
|
| 4 |
-set -o xtrace |
|
| 5 |
-set -o errexit |
|
| 6 |
- |
|
| 7 |
-# Make sure only root can run our script |
|
| 8 |
-if [[ $EUID -ne 0 ]]; then |
|
| 9 |
- echo "This script must be run as root" |
|
| 10 |
- exit 1 |
|
| 11 |
-fi |
|
| 12 |
- |
|
| 13 |
-# This directory |
|
| 14 |
-CUR_DIR=$(cd $(dirname "$0") && pwd) |
|
| 15 |
- |
|
| 16 |
-# Configure trunk jenkins! |
|
| 17 |
-echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list |
|
| 18 |
-wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - |
|
| 19 |
-apt-get update |
|
| 20 |
- |
|
| 21 |
- |
|
| 22 |
-# Clean out old jenkins - useful if you are having issues upgrading |
|
| 23 |
-CLEAN_JENKINS=${CLEAN_JENKINS:-no}
|
|
| 24 |
-if [ "$CLEAN_JENKINS" = "yes" ]; then |
|
| 25 |
- apt-get remove jenkins jenkins-common |
|
| 26 |
-fi |
|
| 27 |
- |
|
| 28 |
-# Install software |
|
| 29 |
-DEPS="jenkins cloud-utils" |
|
| 30 |
-apt-get install -y --force-yes $DEPS |
|
| 31 |
- |
|
| 32 |
-# Install jenkins |
|
| 33 |
-if [ ! -e /var/lib/jenkins ]; then |
|
| 34 |
- echo "Jenkins installation failed" |
|
| 35 |
- exit 1 |
|
| 36 |
-fi |
|
| 37 |
- |
|
| 38 |
-# Make sure user has configured a jenkins ssh pubkey |
|
| 39 |
-if [ ! -e /var/lib/jenkins/.ssh/id_rsa.pub ]; then |
|
| 40 |
- echo "Public key for jenkins is missing. This is used to ssh into your instances." |
|
| 41 |
- echo "Please run "su -c ssh-keygen jenkins" before proceeding" |
|
| 42 |
- exit 1 |
|
| 43 |
-fi |
|
| 44 |
- |
|
| 45 |
-# Setup sudo |
|
| 46 |
-JENKINS_SUDO=/etc/sudoers.d/jenkins |
|
| 47 |
-cat > $JENKINS_SUDO <<EOF |
|
| 48 |
-jenkins ALL = NOPASSWD: ALL |
|
| 49 |
-EOF |
|
| 50 |
-chmod 440 $JENKINS_SUDO |
|
| 51 |
- |
|
| 52 |
-# Setup .gitconfig |
|
| 53 |
-JENKINS_GITCONF=/var/lib/jenkins/hudson.plugins.git.GitSCM.xml |
|
| 54 |
-cat > $JENKINS_GITCONF <<EOF |
|
| 55 |
-<?xml version='1.0' encoding='UTF-8'?> |
|
| 56 |
-<hudson.plugins.git.GitSCM_-DescriptorImpl> |
|
| 57 |
- <generation>4</generation> |
|
| 58 |
- <globalConfigName>Jenkins</globalConfigName> |
|
| 59 |
- <globalConfigEmail>jenkins@rcb.me</globalConfigEmail> |
|
| 60 |
-</hudson.plugins.git.GitSCM_-DescriptorImpl> |
|
| 61 |
-EOF |
|
| 62 |
- |
|
| 63 |
-# Add build numbers |
|
| 64 |
-JOBS=`ls jobs` |
|
| 65 |
-for job in ${JOBS// / }; do
|
|
| 66 |
- if [ ! -e jobs/$job/nextBuildNumber ]; then |
|
| 67 |
- echo 1 > jobs/$job/nextBuildNumber |
|
| 68 |
- fi |
|
| 69 |
-done |
|
| 70 |
- |
|
| 71 |
-# Set ownership to jenkins |
|
| 72 |
-chown -R jenkins $CUR_DIR |
|
| 73 |
- |
|
| 74 |
-# Make sure this directory is accessible to jenkins |
|
| 75 |
-if ! su -c "ls $CUR_DIR" jenkins; then |
|
| 76 |
- echo "Your devstack directory is not accessible by jenkins." |
|
| 77 |
- echo "There is a decent chance you are trying to run this from a directory in /root." |
|
| 78 |
- echo "If so, try moving devstack elsewhere (eg. /opt/devstack)." |
|
| 79 |
- exit 1 |
|
| 80 |
-fi |
|
| 81 |
- |
|
| 82 |
-# Move aside old jobs, if present |
|
| 83 |
-if [ ! -h /var/lib/jenkins/jobs ]; then |
|
| 84 |
- echo "Installing jobs symlink" |
|
| 85 |
- if [ -d /var/lib/jenkins/jobs ]; then |
|
| 86 |
- mv /var/lib/jenkins/jobs /var/lib/jenkins/jobs.old |
|
| 87 |
- fi |
|
| 88 |
-fi |
|
| 89 |
- |
|
| 90 |
-# Set up jobs symlink |
|
| 91 |
-rm -f /var/lib/jenkins/jobs |
|
| 92 |
-ln -s $CUR_DIR/jobs /var/lib/jenkins/jobs |
|
| 93 |
- |
|
| 94 |
-# List of plugins |
|
| 95 |
-PLUGINS=http://hudson-ci.org/downloads/plugins/build-timeout/1.6/build-timeout.hpi,http://mirrors.jenkins-ci.org/plugins/git/1.1.12/git.hpi,http://hudson-ci.org/downloads/plugins/global-build-stats/1.2/global-build-stats.hpi,http://hudson-ci.org/downloads/plugins/greenballs/1.10/greenballs.hpi,http://download.hudson-labs.org/plugins/console-column-plugin/1.0/console-column-plugin.hpi |
|
| 96 |
- |
|
| 97 |
-# Configure plugins |
|
| 98 |
-for plugin in ${PLUGINS//,/ }; do
|
|
| 99 |
- name=`basename $plugin` |
|
| 100 |
- dest=/var/lib/jenkins/plugins/$name |
|
| 101 |
- if [ ! -e $dest ]; then |
|
| 102 |
- curl -L $plugin -o $dest |
|
| 103 |
- fi |
|
| 104 |
-done |
|
| 105 |
- |
|
| 106 |
-# Restart jenkins |
|
| 107 |
-/etc/init.d/jenkins stop || true |
|
| 108 |
-/etc/init.d/jenkins start |
| 109 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,21 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
-# This script is not yet for general consumption. |
|
| 3 |
- |
|
| 4 |
-set -o errexit |
|
| 5 |
- |
|
| 6 |
-if [ ! "$FORCE" = "yes" ]; then |
|
| 7 |
- echo "FORCE not set to 'yes'. Make sure this is something you really want to do. Exiting." |
|
| 8 |
- exit 1 |
|
| 9 |
-fi |
|
| 10 |
- |
|
| 11 |
-virsh list | cut -d " " -f1 | grep -v "-" | egrep -e "[0-9]" | xargs -n 1 virsh destroy || true |
|
| 12 |
-virsh net-list | grep active | cut -d " " -f1 | xargs -n 1 virsh net-destroy || true |
|
| 13 |
-killall dnsmasq || true |
|
| 14 |
-if [ "$CLEAN" = "yes" ]; then |
|
| 15 |
- rm -rf jobs |
|
| 16 |
-fi |
|
| 17 |
-rm /var/lib/jenkins/jobs |
|
| 18 |
-git checkout -f |
|
| 19 |
-git fetch |
|
| 20 |
-git merge origin/jenkins |
|
| 21 |
-./build_jenkins.sh |
| 22 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,82 +0,0 @@ |
| 1 |
-<?xml version='1.0' encoding='UTF-8'?> |
|
| 2 |
-<matrix-project> |
|
| 3 |
- <actions/> |
|
| 4 |
- <description></description> |
|
| 5 |
- <keepDependencies>false</keepDependencies> |
|
| 6 |
- <properties> |
|
| 7 |
- <hudson.model.ParametersDefinitionProperty> |
|
| 8 |
- <parameterDefinitions> |
|
| 9 |
- <hudson.model.StringParameterDefinition> |
|
| 10 |
- <name>RC</name> |
|
| 11 |
- <description></description> |
|
| 12 |
- <defaultValue></defaultValue> |
|
| 13 |
- </hudson.model.StringParameterDefinition> |
|
| 14 |
- </parameterDefinitions> |
|
| 15 |
- </hudson.model.ParametersDefinitionProperty> |
|
| 16 |
- </properties> |
|
| 17 |
- <scm class="hudson.plugins.git.GitSCM"> |
|
| 18 |
- <configVersion>2</configVersion> |
|
| 19 |
- <userRemoteConfigs> |
|
| 20 |
- <hudson.plugins.git.UserRemoteConfig> |
|
| 21 |
- <name>origin</name> |
|
| 22 |
- <refspec>+refs/heads/*:refs/remotes/origin/*</refspec> |
|
| 23 |
- <url>git://github.com/cloudbuilders/devstack.git</url> |
|
| 24 |
- </hudson.plugins.git.UserRemoteConfig> |
|
| 25 |
- </userRemoteConfigs> |
|
| 26 |
- <branches> |
|
| 27 |
- <hudson.plugins.git.BranchSpec> |
|
| 28 |
- <name>master</name> |
|
| 29 |
- </hudson.plugins.git.BranchSpec> |
|
| 30 |
- </branches> |
|
| 31 |
- <recursiveSubmodules>false</recursiveSubmodules> |
|
| 32 |
- <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> |
|
| 33 |
- <authorOrCommitter>false</authorOrCommitter> |
|
| 34 |
- <clean>false</clean> |
|
| 35 |
- <wipeOutWorkspace>false</wipeOutWorkspace> |
|
| 36 |
- <pruneBranches>false</pruneBranches> |
|
| 37 |
- <remotePoll>false</remotePoll> |
|
| 38 |
- <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/> |
|
| 39 |
- <gitTool>Default</gitTool> |
|
| 40 |
- <submoduleCfg class="list"/> |
|
| 41 |
- <relativeTargetDir></relativeTargetDir> |
|
| 42 |
- <excludedRegions></excludedRegions> |
|
| 43 |
- <excludedUsers></excludedUsers> |
|
| 44 |
- <gitConfigName></gitConfigName> |
|
| 45 |
- <gitConfigEmail></gitConfigEmail> |
|
| 46 |
- <skipTag>false</skipTag> |
|
| 47 |
- <scmName></scmName> |
|
| 48 |
- </scm> |
|
| 49 |
- <canRoam>true</canRoam> |
|
| 50 |
- <disabled>false</disabled> |
|
| 51 |
- <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> |
|
| 52 |
- <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> |
|
| 53 |
- <triggers class="vector"/> |
|
| 54 |
- <concurrentBuild>false</concurrentBuild> |
|
| 55 |
- <axes> |
|
| 56 |
- <hudson.matrix.TextAxis> |
|
| 57 |
- <name>ADAPTER</name> |
|
| 58 |
- <values> |
|
| 59 |
- <string>euca</string> |
|
| 60 |
- <string>floating_ips</string> |
|
| 61 |
- </values> |
|
| 62 |
- </hudson.matrix.TextAxis> |
|
| 63 |
- </axes> |
|
| 64 |
- <builders> |
|
| 65 |
- <hudson.tasks.Shell> |
|
| 66 |
- <command>sed -i 's/) 2>&1 | tee "${LOGFILE}"/)/' stack.sh</command>
|
|
| 67 |
- </hudson.tasks.Shell> |
|
| 68 |
- <hudson.tasks.Shell> |
|
| 69 |
- <command>set -o errexit |
|
| 70 |
-cd tools/jenkins |
|
| 71 |
-sudo ./build_configuration.sh $EXECUTOR_NUMBER kvm $ADAPTER "$RC"</command> |
|
| 72 |
- </hudson.tasks.Shell> |
|
| 73 |
- <hudson.tasks.Shell> |
|
| 74 |
- <command>set -o errexit |
|
| 75 |
-cd tools/jenkins |
|
| 76 |
-./run_test.sh $EXECUTOR_NUMBER $ADAPTER $RC "$RC"</command> |
|
| 77 |
- </hudson.tasks.Shell> |
|
| 78 |
- </builders> |
|
| 79 |
- <publishers/> |
|
| 80 |
- <buildWrappers/> |
|
| 81 |
- <runSequentially>false</runSequentially> |
|
| 82 |
-</matrix-project> |
| 83 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,15 +0,0 @@ |
| 1 |
-<?xml version='1.0' encoding='UTF-8'?> |
|
| 2 |
-<matrix-config> |
|
| 3 |
- <keepDependencies>false</keepDependencies> |
|
| 4 |
- <properties/> |
|
| 5 |
- <scm class="hudson.scm.NullSCM"/> |
|
| 6 |
- <canRoam>false</canRoam> |
|
| 7 |
- <disabled>false</disabled> |
|
| 8 |
- <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> |
|
| 9 |
- <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> |
|
| 10 |
- <triggers class="vector"/> |
|
| 11 |
- <concurrentBuild>false</concurrentBuild> |
|
| 12 |
- <builders/> |
|
| 13 |
- <publishers/> |
|
| 14 |
- <buildWrappers/> |
|
| 15 |
-</matrix-config> |
|
| 16 | 1 |
\ No newline at end of file |
| 17 | 2 |
deleted file mode 100644 |
| ... | ... |
@@ -1,15 +0,0 @@ |
| 1 |
-<?xml version='1.0' encoding='UTF-8'?> |
|
| 2 |
-<matrix-config> |
|
| 3 |
- <keepDependencies>false</keepDependencies> |
|
| 4 |
- <properties/> |
|
| 5 |
- <scm class="hudson.scm.NullSCM"/> |
|
| 6 |
- <canRoam>false</canRoam> |
|
| 7 |
- <disabled>false</disabled> |
|
| 8 |
- <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> |
|
| 9 |
- <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> |
|
| 10 |
- <triggers class="vector"/> |
|
| 11 |
- <concurrentBuild>false</concurrentBuild> |
|
| 12 |
- <builders/> |
|
| 13 |
- <publishers/> |
|
| 14 |
- <buildWrappers/> |
|
| 15 |
-</matrix-config> |
|
| 16 | 1 |
\ No newline at end of file |
| 17 | 2 |
deleted file mode 100644 |
| ... | ... |
@@ -1,88 +0,0 @@ |
| 1 |
-<?xml version='1.0' encoding='UTF-8'?> |
|
| 2 |
-<matrix-project> |
|
| 3 |
- <actions/> |
|
| 4 |
- <description>In order for this to work, you must create a /var/lib/jenkins/xenrc file as described in README.md</description> |
|
| 5 |
- <keepDependencies>false</keepDependencies> |
|
| 6 |
- <properties> |
|
| 7 |
- <hudson.model.ParametersDefinitionProperty> |
|
| 8 |
- <parameterDefinitions> |
|
| 9 |
- <hudson.model.StringParameterDefinition> |
|
| 10 |
- <name>RC</name> |
|
| 11 |
- <description></description> |
|
| 12 |
- <defaultValue></defaultValue> |
|
| 13 |
- </hudson.model.StringParameterDefinition> |
|
| 14 |
- </parameterDefinitions> |
|
| 15 |
- </hudson.model.ParametersDefinitionProperty> |
|
| 16 |
- </properties> |
|
| 17 |
- <scm class="hudson.plugins.git.GitSCM"> |
|
| 18 |
- <configVersion>2</configVersion> |
|
| 19 |
- <userRemoteConfigs> |
|
| 20 |
- <hudson.plugins.git.UserRemoteConfig> |
|
| 21 |
- <name>origin</name> |
|
| 22 |
- <refspec>+refs/heads/*:refs/remotes/origin/*</refspec> |
|
| 23 |
- <url>git://github.com/cloudbuilders/devstack.git</url> |
|
| 24 |
- </hudson.plugins.git.UserRemoteConfig> |
|
| 25 |
- </userRemoteConfigs> |
|
| 26 |
- <branches> |
|
| 27 |
- <hudson.plugins.git.BranchSpec> |
|
| 28 |
- <name>master</name> |
|
| 29 |
- </hudson.plugins.git.BranchSpec> |
|
| 30 |
- </branches> |
|
| 31 |
- <recursiveSubmodules>false</recursiveSubmodules> |
|
| 32 |
- <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> |
|
| 33 |
- <authorOrCommitter>false</authorOrCommitter> |
|
| 34 |
- <clean>false</clean> |
|
| 35 |
- <wipeOutWorkspace>false</wipeOutWorkspace> |
|
| 36 |
- <pruneBranches>false</pruneBranches> |
|
| 37 |
- <remotePoll>false</remotePoll> |
|
| 38 |
- <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/> |
|
| 39 |
- <gitTool>Default</gitTool> |
|
| 40 |
- <submoduleCfg class="list"/> |
|
| 41 |
- <relativeTargetDir></relativeTargetDir> |
|
| 42 |
- <excludedRegions></excludedRegions> |
|
| 43 |
- <excludedUsers></excludedUsers> |
|
| 44 |
- <gitConfigName></gitConfigName> |
|
| 45 |
- <gitConfigEmail></gitConfigEmail> |
|
| 46 |
- <skipTag>false</skipTag> |
|
| 47 |
- <scmName></scmName> |
|
| 48 |
- </scm> |
|
| 49 |
- <canRoam>true</canRoam> |
|
| 50 |
- <disabled>false</disabled> |
|
| 51 |
- <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> |
|
| 52 |
- <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> |
|
| 53 |
- <triggers class="vector"/> |
|
| 54 |
- <concurrentBuild>false</concurrentBuild> |
|
| 55 |
- <axes> |
|
| 56 |
- <hudson.matrix.TextAxis> |
|
| 57 |
- <name>ADAPTER</name> |
|
| 58 |
- <values> |
|
| 59 |
- <string>euca</string> |
|
| 60 |
- <string>floating_ips</string> |
|
| 61 |
- </values> |
|
| 62 |
- </hudson.matrix.TextAxis> |
|
| 63 |
- </axes> |
|
| 64 |
- <builders> |
|
| 65 |
- <hudson.tasks.Shell> |
|
| 66 |
- <command>sed -i 's/) 2>&1 | tee "${LOGFILE}"/)/' stack.sh</command>
|
|
| 67 |
- </hudson.tasks.Shell> |
|
| 68 |
- <hudson.tasks.Shell> |
|
| 69 |
- <command>set -o errexit |
|
| 70 |
-cd tools/jenkins |
|
| 71 |
-sudo ./build_configuration.sh $EXECUTOR_NUMBER xs $ADAPTER "$RC"</command> |
|
| 72 |
- </hudson.tasks.Shell> |
|
| 73 |
- <hudson.tasks.Shell> |
|
| 74 |
- <command>#!/bin/bash |
|
| 75 |
-set -o errexit |
|
| 76 |
-set -o xtrace |
|
| 77 |
- |
|
| 78 |
-. localrc |
|
| 79 |
- |
|
| 80 |
-# Unlike kvm, ssh to the xen host to run tests, in case the test instance is launch with a host only network |
|
| 81 |
-ssh root@$XEN_IP "cd devstack && . localrc && cd tools/jenkins && ./run_test.sh $EXECUTOR_NUMBER $ADAPTER '$RC'" |
|
| 82 |
-</command> |
|
| 83 |
- </hudson.tasks.Shell> |
|
| 84 |
- </builders> |
|
| 85 |
- <publishers/> |
|
| 86 |
- <buildWrappers/> |
|
| 87 |
- <runSequentially>true</runSequentially> |
|
| 88 |
-</matrix-project> |
| 89 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,58 +0,0 @@ |
| 1 |
-#!/usr/bin/python |
|
| 2 |
- |
|
| 3 |
-# Licensed under the Apache License, Version 2.0 (the "License"); you may |
|
| 4 |
-# not use this file except in compliance with the License. You may obtain |
|
| 5 |
-# a copy of the License at |
|
| 6 |
-# |
|
| 7 |
-# http://www.apache.org/licenses/LICENSE-2.0 |
|
| 8 |
-# |
|
| 9 |
-# Unless required by applicable law or agreed to in writing, software |
|
| 10 |
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
|
| 11 |
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
|
| 12 |
-# License for the specific language governing permissions and limitations |
|
| 13 |
-# under the License. |
|
| 14 |
- |
|
| 15 |
-import json |
|
| 16 |
-import sys |
|
| 17 |
-import urllib |
|
| 18 |
- |
|
| 19 |
- |
|
| 20 |
-def print_usage(): |
|
| 21 |
- print("Usage: %s [jenkins_url (eg. http://50.56.12.202:8080/)]"
|
|
| 22 |
- % sys.argv[0]) |
|
| 23 |
- sys.exit() |
|
| 24 |
- |
|
| 25 |
- |
|
| 26 |
-def fetch_blob(url): |
|
| 27 |
- return json.loads(urllib.urlopen(url + '/api/json').read()) |
|
| 28 |
- |
|
| 29 |
- |
|
| 30 |
-if len(sys.argv) < 2: |
|
| 31 |
- print_usage() |
|
| 32 |
- |
|
| 33 |
-BASE_URL = sys.argv[1] |
|
| 34 |
- |
|
| 35 |
-root = fetch_blob(BASE_URL) |
|
| 36 |
-results = {}
|
|
| 37 |
-for job_url in root['jobs']: |
|
| 38 |
- job = fetch_blob(job_url['url']) |
|
| 39 |
- if job.get('activeConfigurations'):
|
|
| 40 |
- (tag, name) = job['name'].split('-')
|
|
| 41 |
- if not results.get(tag): |
|
| 42 |
- results[tag] = {}
|
|
| 43 |
- if not results[tag].get(name): |
|
| 44 |
- results[tag][name] = [] |
|
| 45 |
- |
|
| 46 |
- for config_url in job['activeConfigurations']: |
|
| 47 |
- config = fetch_blob(config_url['url']) |
|
| 48 |
- |
|
| 49 |
- log_url = '' |
|
| 50 |
- if config.get('lastBuild'):
|
|
| 51 |
- log_url = config['lastBuild']['url'] + 'console' |
|
| 52 |
- |
|
| 53 |
- results[tag][name].append({'test': config['displayName'],
|
|
| 54 |
- 'status': config['color'], |
|
| 55 |
- 'logUrl': log_url, |
|
| 56 |
- 'healthReport': config['healthReport']}) |
|
| 57 |
- |
|
| 58 |
-print(json.dumps(results)) |
| 59 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,20 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
- |
|
| 3 |
-EXECUTOR_NUMBER=$1 |
|
| 4 |
-ADAPTER=$2 |
|
| 5 |
-RC=$3 |
|
| 6 |
- |
|
| 7 |
-function usage {
|
|
| 8 |
- echo "Usage: $0 - Run a test" |
|
| 9 |
- echo "" |
|
| 10 |
- echo "$0 [EXECUTOR_NUMBER] [ADAPTER] [RC (optional)]" |
|
| 11 |
- exit 1 |
|
| 12 |
-} |
|
| 13 |
- |
|
| 14 |
-# Validate inputs |
|
| 15 |
-if [[ "$EXECUTOR_NUMBER" = "" || "$ADAPTER" = "" ]]; then |
|
| 16 |
- usage |
|
| 17 |
-fi |
|
| 18 |
- |
|
| 19 |
-# Execute configuration script |
|
| 20 |
-cd adapters && ./$ADAPTER.sh $EXECUTOR_NUMBER $ADAPTER "$RC" |