Merge "Fix incorrect tarballs naming"

This commit is contained in:
Jenkins 2017-07-20 12:54:29 +00:00 committed by Gerrit Code Review
commit 5852da409b
1 changed files with 6 additions and 1 deletions

View File

@ -77,7 +77,12 @@ function collect_logs {
function pack_registry {
sudo mkdir "images"
BRANCH=$(echo "$ZUUL_BRANCH" | cut -d/ -f2)
if [ -z "$ZUUL_BRANCH" ]; then
BRANCH=$(echo $ZUUL_BRANCH | cut -d/ -f2)
else
BRANCH=$(echo $ZUUL_REFNAME | cut -d/ -f2)
fi
FILENAME=${BASE_DISTRO}-${INSTALL_TYPE}-registry-${BRANCH}.tar.gz
sudo docker stop registry
sudo tar -zcf "images/$FILENAME" -C /tmp/kolla_registry .