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 <andrew.walters@att.com>
This commit is contained in:
Drew Walters 2019-11-06 21:22:02 +00:00
parent 8d8c3e7158
commit 306ba07e0a
3 changed files with 33 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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