From bf726569249b773c69c26d0ec8defdd223720c3e Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Thu, 16 Aug 2018 14:43:10 -0400 Subject: [PATCH] CPERF: Add clean up to CSIT Now that we promote Apex artifacts after running CSIT, the snapshots will be tainted with the flavor and image used during the CSIT test. We should remove those after running CSIT as it may conflict with other test suites or user interaction with the snapshots later. Change-Id: I874ef145f9df20a9d1471e38698549cbe58dea43 Signed-off-by: Tim Rozet --- jjb/cperf/cperf-robot-netvirt-csit.sh | 3 +++ jjb/cperf/csit-clean.yaml.ansible | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 jjb/cperf/csit-clean.yaml.ansible diff --git a/jjb/cperf/cperf-robot-netvirt-csit.sh b/jjb/cperf/cperf-robot-netvirt-csit.sh index d3a8cd99a..13d3be3e6 100755 --- a/jjb/cperf/cperf-robot-netvirt-csit.sh +++ b/jjb/cperf/cperf-robot-netvirt-csit.sh @@ -167,3 +167,6 @@ docker run -i --net=host \ /bin/bash -c "source /tmp/overcloudrc; mkdir -p \$HOME/.ssh; cp /tmp/id_rsa \$HOME/.ssh; \ cd /home/opnfv/repos/odl_test/ && git pull origin master; \ ${robot_cmd} ${suites};" + +echo "Running post CSIT clean" +ansible-playbook -i ${CONTROLLER_1_IP}, -u heat-admin --key-file ${WORKSPACE}/id_rsa ${REL_PATH}/csit-clean.yaml.ansible -vvv diff --git a/jjb/cperf/csit-clean.yaml.ansible b/jjb/cperf/csit-clean.yaml.ansible new file mode 100644 index 000000000..0151dd824 --- /dev/null +++ b/jjb/cperf/csit-clean.yaml.ansible @@ -0,0 +1,11 @@ +--- +- hosts: all + tasks: + - name: Delete cirros glance image + shell: > + source /home/heat-admin/overcloudrc && openstack image delete + cirros-0.3.5-x86_64-disk + - name: Delete nano flavor + shell: > + source /home/heat-admin/overcloudrc && openstack flavor delete + m1.nano -- 2.16.6