diff options
| author | Michal (inc0) Jastrzebski <inc007@gmail.com> | 2016-11-29 21:56:35 +0000 |
|---|---|---|
| committer | Jeffrey Zhang <zhang.lei.fly@gmail.com> | 2017-01-02 13:19:47 +0800 |
| commit | cef39561ac21c23d8a58222b66244505826394a0 (patch) | |
| tree | e0da7eb352129d54eda7b3a2b33734b8143c3e8f | |
| parent | 12bea3f9f659e6a4e8611c5edf59e69e204c3792 (diff) | |
| download | kolla-cef39561ac21c23d8a58222b66244505826394a0.tar.gz kolla-cef39561ac21c23d8a58222b66244505826394a0.zip | |
packing and uploading registry
Partially-Implements: blueprint pack-registry
Co-Authored-By: Jeffrey Zhang <jeffrey.zhang@99cloud.net>
Change-Id: I6816c6d3fc2f4224553f8a22e2ebb87e8616db37
| -rwxr-xr-x | tools/gate_run.sh | 14 | ||||
| -rwxr-xr-x | tools/setup_gate.sh | 5 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tools/gate_run.sh b/tools/gate_run.sh index e4301e735..b5bab3ea0 100755 --- a/tools/gate_run.sh +++ b/tools/gate_run.sh @@ -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 diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh index 178f34309..ddb6caa5e 100755 --- a/tools/setup_gate.sh +++ b/tools/setup_gate.sh @@ -44,6 +44,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 |
