Revert images after build

We've big matrix of fuel deployment jobs and every job create snapshoted
env on slave. After build this images grow up so we need to decrease size
of it by reverting to fresh snapshot at the end of job.

Change-Id: I29b6d3c220e5ba006414e28532597a8ae4e27cd9
This commit is contained in:
Artur Zarzycki 2016-11-16 11:19:27 +01:00
parent f72a64e04a
commit cdec9a012b
2 changed files with 6 additions and 1 deletions

View File

@ -106,5 +106,8 @@ fi
# Run CCP deployment and OpenStack tests:
${SSH_COMMAND} "pushd fuel-ccp && APT_CACHE_SERVER=http://${APT_CACHE_SERVER_IP}:${APT_CACHE_SERVER_PORT} tox -e multi-deploy -- --openstack-version ${VERSION} --number-of-envs 1"
# Revert to fresh to decrease image size
dos.py revert "${FUEL_DEVOPS_ENV_NAME}" "${FUEL_DEVOPS_SNAPSHOT_NAME}"
# Clean-up (snapshot should remain for next jobs):
dos.py destroy "${FUEL_DEVOPS_ENV_NAME}"

View File

@ -20,11 +20,13 @@
#!/bin/bash
set -ex
export ENV_NAME="fuel-ccp-{component}-{version}-deployment"
ENV_NAME="fuel-ccp-{component}-{version}-deployment"
FUEL_DEVOPS_SNAPSHOT_NAME="fresh"
FUEL_DEVOPS_INSTALLATION_DIR="/home/jenkins/venv-fuel-devops-3.0"
source "$FUEL_DEVOPS_INSTALLATION_DIR"/bin/activate
echo "Running on $NODE_NAME: $ENV_NAME"
virsh list --all
dos.py revert "$ENV_NAME" "$FUEL_DEVOPS_SNAPSHOT_NAME"
dos.py destroy "$ENV_NAME"
deactivate
concurrent: true