From 1fe93bf666765927d9ed15ead14db85caf51098c Mon Sep 17 00:00:00 2001 From: Thomas F Herbert Date: Mon, 27 Jun 2016 10:37:46 -0400 Subject: RPM: Apex: Refactor build scripts: Remove reference to undercloud. Fix dependencies list. Refactor build ovs and build dpdk and test scripts. Correct default dpdk version in build ovs script. Remove references to instack VM -- no longer necessary. Remove script using custom Apex-lite-liberty for testing Consolidated functions and cleanup in response to reviewers. Change-Id: I0875acd87580769c7cd7e87b97bb3e04f0159b32 Signed-off-by: Thomas F Herbert --- ci/clean.sh | 71 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 36 deletions(-) (limited to 'ci') diff --git a/ci/clean.sh b/ci/clean.sh index b1033b0..367c61d 100755 --- a/ci/clean.sh +++ b/ci/clean.sh @@ -1,43 +1,42 @@ -#!/usr/bin/env bash -############################################################################## -# Copyright (c) 2016 Red Hat Inc. and others. -# therbert@redhat.com -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -#Clean script to uninstall provisioning server for Apex -#author: Dan Radez (dradez@redhat.com) -# -vm_index=4 +#/bin/bash -# Clean off instack VM -virsh destroy instack 2> /dev/null || echo -n '' -virsh undefine instack --remove-all-storage 2> /dev/null || echo -n '' -virsh vol-delete instack.qcow2 --pool default 2> /dev/null -rm -f /var/lib/libvirt/images/instack.qcow2 2> /dev/null +# Copyright (c) 2016 Red Hat Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. -# Clean off baremetal VMs in case they exist -for i in $(seq 0 $vm_index); do - virsh destroy baremetalbrbm_brbm1_$i 2> /dev/null || echo -n '' - virsh undefine baremetalbrbm_brbm1_$i --remove-all-storage 2> /dev/null || echo -n '' - virsh vol-delete baremetalbrbm_brbm1_${i}.qcow2 --pool default 2> /dev/null - rm -f /var/lib/libvirt/images/baremetalbrbm_brbm1_${i}.qcow2 2> /dev/null -done +set -e -# Clean off brbm bridges -virsh net-destroy brbm 2> /dev/null -virsh net-undefine brbm 2> /dev/null -vs-vsctl del-br brbm 2> /dev/null +echo "===============================" +echo "Requires sudo privileges" +echo executing $0 $@ +echo executing on machine `uname -a` -virsh net-destroy brbm1 2> /dev/null -virsh net-undefine brbm1 2> /dev/null -vs-vsctl del-br brbm1 2> /dev/null +if [ -z ${WORKSPACE+1} ]; then + # We are not being run by Jenkins. + export WORKSPACE=`pwd` +fi -# clean pub keys from root's auth keys -sed -i '/stack@instack.localdomain/d' /root/.ssh/authorized_keys -sed -i '/virtual-power-key/d' /root/.ssh/authorized_keys +export BUILD_BASE=$WORKSPACE +source $BUILD_BASE/../build/functions.sh -echo "Cleanup Completed" +cleanrpms +set +e +rm -rf ovsrpm +rm -rf rpmbuild +rm -rf rpms +rm -rf build +rm *.rpm +ccache -C +set -e +exit 0 -- cgit 1.2.3-korg