-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathjenkins-deb-testrepo
executable file
·55 lines (36 loc) · 1.32 KB
/
jenkins-deb-testrepo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#
# $1 = test repo number
#
DISTRELEASE=${DISTRELEASE-ubuntu-natty}
PACKAGE_REPO=${PACKAGE_REPO-proposed-packages}
[ -e $(dirname $0)/jenkins-deb-common ] || exit 1
. $(dirname $0)/jenkins-deb-common
jenkins_init
jenkins_set_vars
echo ${DISTRELEASE}
function err_cleanup_repo_test() {
# $1 - name
if [ "${NOCLEAN-0}" == "1" ]; then
exit 0
fi
sudo virsh destroy ${1}
sleep 5
sudo lvremove -f ${LVM_ROOT}/${1}
exit 1
}
# importing packages done by import-packages job
#import_proposed_packages
kvm_instance_name=${BINARY_BUILD_RELEASE}-${NOVA_RELEASE}-${MILESTONE}-repotest
# this sets IP as a side-effect
get_ip $kvm_instance_name
maybe_make_kvm_instance $kvm_instance_name
start_kvm_instance $kvm_instance_name ${IP} http://${PACKAGE_HOST}/${PACKAGE_REPO} ${BINARY_BUILD_RELEASE} ${NOVA_RELEASE}-${MILESTONE}
trap "err_cleanup_repo_test ${kvm_instance_name}" SIGINT SIGTERM EXIT ERR
# shep this shit up
sleep 20
ssh root@${IP} "LANG=C apt-get install -y --force-yes nova-api nova-network nova-scheduler nova-network nova-compute glance keystone openstack-dashboard swift-proxy swift-object swift-container swift-account python-swauth nova-vncproxy python-slogging"
trap - SIGINT SIGTERM EXIT ERR
sudo virsh destroy ${kvm_instance_name}
sleep 5
sudo lvremove -f ${LVM_ROOT}/${kvm_instance_name}