Merge "packing and uploading registry"

This commit is contained in:
Jenkins 2017-01-06 18:16:36 +00:00 committed by Gerrit Code Review
commit faea5b9114
2 changed files with 19 additions and 0 deletions

View File

@ -75,7 +75,21 @@ function collect_logs {
set -o errexit
}
function pack_registry {
sudo mkdir "images"
FILENAME=${BASE_DISTRO}-${INSTALL_TYPE}-${ZUUL_BRANCH}-registry.tar.gz
sudo docker stop registry
sudo tar -zcf "images/$FILENAME" -C /tmp/kolla_registry .
sudo docker start registry
sudo chmod 755 -R images
}
trap collect_logs EXIT
tools/setup_gate.sh
tox -e $ACTION-$BASE_DISTRO-$INSTALL_TYPE
if [[ -n $PACK_REGISTRY ]] && [[ $ACTION == "build" ]]; then
pack_registry
fi

View File

@ -42,6 +42,11 @@ EOF
# NOTE(Jeffrey4l): use different a docker namespace name in case it pull image from hub.docker.io when deplying
sed -i 's|^#namespace.*|namespace = lokolla|' /etc/kolla/kolla-build.conf
if [[ -n "${PACK_REGISTRY}" ]] && [[ $ACTION == "build" ]]; then
sed -i 's|^#registry.*|registry = 127.0.0.1:4000|' /etc/kolla/kolla-build.conf
sed -i 's|^#push.*|push = true|' /etc/kolla/kolla-build.conf
fi
if [[ "${DISTRO}" == "Debian" ]]; then
# Infra does not sign their mirrors so we ignore gpg signing in the gate
echo "RUN echo 'APT::Get::AllowUnauthenticated \"true\";' > /etc/apt/apt.conf" | sudo tee -a /etc/kolla/header