From 306ba07e0af1d951a5244dc35be31a3456f1a074 Mon Sep 17 00:00:00 2001 From: Drew Walters Date: Wed, 6 Nov 2019 21:22:02 +0000 Subject: [PATCH] mini-mirror: Use latest aptly version Currently, the mini-mirror image job installs aptly from the standard Ubuntu repositories. Consequently, the version of aptly used for the Xenial build is 0.9.1 and differs from the version of aptly in the Bionic build. This change adds the official aptly repositories when installing aptly in order to use the latest version and maintain consistency between the two builds. Change-Id: Ic2f79b0a910f0c0e3e2aff361dfe14c9b312f0f9 Signed-off-by: Drew Walters --- mini-mirror/Dockerfile.ubuntu_bionic | 4 +++- mini-mirror/Dockerfile.ubuntu_xenial | 4 +++- mini-mirror/tools/install_aptly.sh | 27 +++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100755 mini-mirror/tools/install_aptly.sh diff --git a/mini-mirror/Dockerfile.ubuntu_bionic b/mini-mirror/Dockerfile.ubuntu_bionic index 668aef82..950a89fc 100644 --- a/mini-mirror/Dockerfile.ubuntu_bionic +++ b/mini-mirror/Dockerfile.ubuntu_bionic @@ -23,11 +23,13 @@ COPY "${APTLY_CONFIG_PATH}" /etc/aptly.conf COPY "${MIRROR_SOURCE_DIR}" /opt/sources COPY "${RELEASE_SIGN_KEY_PATH}" /opt/release.gpg +COPY tools/install_aptly.sh /opt/install_aptly.sh COPY tools/publish_snapshots.sh /opt/publish_snapshots.sh RUN apt-get update -RUN apt-get install -y aptly wget +RUN apt-get install -y gnupg wget +RUN /opt/install_aptly.sh RUN /opt/publish_snapshots.sh "${RELEASE_SIGN_KEY_PASSPHRASE}" FROM nginx diff --git a/mini-mirror/Dockerfile.ubuntu_xenial b/mini-mirror/Dockerfile.ubuntu_xenial index cf6b478b..210913c0 100644 --- a/mini-mirror/Dockerfile.ubuntu_xenial +++ b/mini-mirror/Dockerfile.ubuntu_xenial @@ -23,11 +23,13 @@ COPY "${APTLY_CONFIG_PATH}" /etc/aptly.conf COPY "${MIRROR_SOURCE_DIR}" /opt/sources COPY "${RELEASE_SIGN_KEY_PATH}" /opt/release.gpg +COPY tools/install_aptly.sh /opt/install_aptly.sh COPY tools/publish_snapshots.sh /opt/publish_snapshots.sh RUN apt-get update -RUN apt-get install -y aptly wget +RUN apt-get install -y wget +RUN /opt/install_aptly.sh RUN /opt/publish_snapshots.sh "${RELEASE_SIGN_KEY_PASSPHRASE}" FROM nginx diff --git a/mini-mirror/tools/install_aptly.sh b/mini-mirror/tools/install_aptly.sh new file mode 100755 index 00000000..fa50c96b --- /dev/null +++ b/mini-mirror/tools/install_aptly.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright 2019, AT&T Intellectual Property +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -xe + +tee /etc/apt/sources.list.d/aptly.list << EOF +deb http://repo.aptly.info/ squeeze main +EOF + +apt-key adv --keyserver pool.sks-keyservers.net \ + --recv-keys ED75B5A4483DA07C + +apt-get update +apt-get install -y --no-install-recommends aptly