more work on jenkins stuff
This commit is contained in:
parent
b996b2b855
commit
ccd4ea37b8
7 changed files with 106 additions and 0 deletions
17
tools/jenkins/README.md
Normal file
17
tools/jenkins/README.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
Getting Started With Jenkins and Devstack
|
||||
=========================================
|
||||
This little corner of devstack is to show how to get an Openstack jenkins
|
||||
environment up and running quickly, using the rcb configuration methodology.
|
||||
|
||||
|
||||
To manually set up a testing environment
|
||||
----------------------------------------
|
||||
./build_configuration.sh [EXECUTOR_NUMBER] [CONFIGURATION]
|
||||
|
||||
For now, use "./build_configuration.sh $EXECUTOR_NUMBER kvm"
|
||||
|
||||
To manually run a test
|
||||
----------------------
|
||||
./run_test.sh [EXECUTOR_NUMBER] [ADAPTER]
|
||||
|
||||
For now, use "./run_test.sh $EXECUTOR_NUMBER [euca|floating]"
|
3
tools/jenkins/adapters/euca.sh
Executable file
3
tools/jenkins/adapters/euca.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "$0 SUCCESS!"
|
3
tools/jenkins/adapters/floating.sh
Executable file
3
tools/jenkins/adapters/floating.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "$0 SUCCESS!"
|
19
tools/jenkins/build_configuration.sh
Executable file
19
tools/jenkins/build_configuration.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
EXECUTOR_NUMBER=$1
|
||||
CONFIGURATION=$2
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $0 - Build a configuration"
|
||||
echo ""
|
||||
echo "$0 [EXECUTOR_NUMBER] [CONFIGURATION]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Validate inputs
|
||||
if [[ "$EXECUTOR_NUMBER" = "" || "$CONFIGURATION" = "" ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Execute configuration script
|
||||
cd configurations && ./$CONFIGURATION.sh $EXECUTOR_NUMBER $CONFIGURATION
|
45
tools/jenkins/configurations/kvm.sh
Executable file
45
tools/jenkins/configurations/kvm.sh
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
|
||||
EXECUTOR_NUMBER=$1
|
||||
CONFIGURATION=$2
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $0 - Build a test configuration"
|
||||
echo ""
|
||||
echo "$0 [EXECUTOR_NUMBER] [CONFIGURATION]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Validate inputs
|
||||
if [[ "$EXECUTOR_NUMBER" = "" || "$CONFIGURATION" = "" ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# This directory
|
||||
CUR_DIR=$(cd $(dirname "$0") && pwd)
|
||||
|
||||
# devstack directory
|
||||
cd ../../..
|
||||
TOP_DIR=(pwd)
|
||||
|
||||
# Name test instance based on executor
|
||||
NAME=executor-$EXECUTOR_NUMBER
|
||||
virsh destroy `virsh list | grep $NAME | cut -d " " -f1` || true
|
||||
|
||||
# Configure localrc
|
||||
cat <<EOF >localrc
|
||||
RECLONE=yes
|
||||
GUEST_NETWORK=$EXECUTOR_NUMBER
|
||||
GUEST_NAME=$NAME
|
||||
FLOATING_RANGE=192.168.$EXECUTOR_NUMBER.128/27
|
||||
GUEST_CORES=4
|
||||
GUEST_RAM=10000000
|
||||
MYSQL_PASSWORD=chicken
|
||||
RABBIT_PASSWORD=chicken
|
||||
SERVICE_TOKEN=chicken
|
||||
ADMIN_PASSWORD=chicken
|
||||
USERNAME=admin
|
||||
TENANT=admin
|
||||
EOF
|
||||
cd tools
|
||||
sudo ./build_uec.sh
|
19
tools/jenkins/run_test.sh
Executable file
19
tools/jenkins/run_test.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
EXECUTOR_NUMBER=$1
|
||||
ADAPTER=$2
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $0 - Run a test"
|
||||
echo ""
|
||||
echo "$0 [EXECUTOR_NUMBER] [ADAPTER]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Validate inputs
|
||||
if [[ "$EXECUTOR_NUMBER" = "" || "$ADAPTER" = "" ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Execute configuration script
|
||||
cd adapters && ./$ADAPTER.sh $EXECUTOR_NUMBER $ADAPTER
|
Loading…
Reference in a new issue