Use ZUUL_REFNAME to get branch info during pack registry

1. ZUUL_REFNAME is used in post and release pipeline.
2. change the tarball name to
   <base_distro>-<install_type>-registry-<branch>.tar.gz it is usefull
   in tag pipeline. we will get name like:
   centos-source-registry-4.0.0.tar.gz

Change-Id: I23b16983d02a5758cb251bed8b026ced992559fe
This commit is contained in:
Jeffrey Zhang 2017-01-13 00:14:19 +08:00
parent bff91aecd9
commit 08d3ff6f04

View File

@ -76,8 +76,9 @@ function collect_logs {
}
function pack_registry {
BRANCH=$(echo $ZUUL_REFNAME | cut -d/ -f2)
sudo mkdir "images"
FILENAME=${BASE_DISTRO}-${INSTALL_TYPE}-${ZUUL_BRANCH}-registry.tar.gz
FILENAME=${BASE_DISTRO}-${INSTALL_TYPE}-registry-${BRANCH}.tar.gz
sudo docker stop registry
sudo tar -zcf "images/$FILENAME" -C /tmp/kolla_registry .
sudo docker start registry