X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fopenstack-cleanup-old-images.sh;h=2ca391709494912f46ce634fb5466ae9a42364a1;hb=refs%2Fchanges%2F35%2F72935%2F3;hp=8d1ddd5de6395a05d2750fb0259faddeb25b6d6b;hpb=a8c7722c19cfca9f0361c578ce63bf552093dd0e;p=releng%2Fglobal-jjb.git diff --git a/shell/openstack-cleanup-old-images.sh b/shell/openstack-cleanup-old-images.sh index 8d1ddd5d..2ca39170 100644 --- a/shell/openstack-cleanup-old-images.sh +++ b/shell/openstack-cleanup-old-images.sh @@ -14,27 +14,13 @@ echo "---> Cleanup old images" # shellcheck disable=SC1090 source ~/lf-env.sh -set -x -# Check if openstack venv was previously created -if [ -f "/tmp/.os_lf_venv" ]; then - os_lf_venv=$(cat "/tmp/.os_lf_venv") -fi - -if [ -d "${os_lf_venv}" ] && [ -f "${os_lf_venv}/bin/openstack" ]; then - echo "Re-use existing venv: ${os_lf_venv}" - PATH=$os_lf_venv/bin:$PATH -else - lf-activate-venv --python python3 "cryptography<3.4" \ - "lftools[openstack]" \ - kubernetes \ - "niet~=1.4.2" \ - python-heatclient \ - python-openstackclient \ - python-magnumclient \ - setuptools \ - "openstacksdk<0.99" \ - yq -fi +lf-activate-venv --python python3 "lftools[openstack]" \ + kubernetes \ + niet \ + python-heatclient \ + python-openstackclient \ + python-magnumclient \ + yq os_cloud="${OS_CLOUD:-vex}" os_image_cleanup_age="${OS_IMAGE_CLEANUP_AGE:-30}"