(minimirror) Create Bionic based minimirror image

- aptly v0.9.7 switched to SHA256 package signatures, required
  by 18.04 for trust. 18.04 uses aptly 1.2.x.

- Remove dead code from Makefile that duplicated the build block
  for 'ubuntu_bionic'

Change-Id: Ib6290beac8110cc9b21fcaab6cfbdb331c3bb8c5
This commit is contained in:
Scott Hussey 2019-10-03 14:45:10 -05:00
parent 53cdce9b9e
commit 37f0185f65
3 changed files with 84 additions and 18 deletions

View File

@ -90,12 +90,6 @@ else ifeq ($(OS_RELEASE), alpine)
$(EXTRA_BUILD_ARGS) \
-t $(IMAGE) \
.
else ifeq ($(OS_RELEASE), ubuntu_bionic)
docker build -f $(IMAGE_NAME)/Dockerfile.$(OS_RELEASE) \
--network host \
$(EXTRA_BUILD_ARGS) \
-t $(IMAGE) \
.
else
docker build -t $(IMAGE) --network=host $(EXTRA_BUILD_ARGS) -f $(IMAGE_NAME)/Dockerfile.simple \
.

View File

@ -0,0 +1,39 @@
# 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.
FROM ubuntu:18.04 as aptly
ARG APTLY_CONFIG_PATH=etc/aptly.conf
ARG MIRROR_SOURCE_DIR=sources
ARG RELEASE_SIGN_KEY_PATH=etc
ARG RELEASE_SIGN_KEY_PASSPHRASE
COPY "${APTLY_CONFIG_PATH}" /etc/aptly.conf
COPY "${MIRROR_SOURCE_DIR}" /opt/sources
COPY "${RELEASE_SIGN_KEY_PATH}" /opt/release.gpg
COPY tools/publish_snapshots.sh /opt/publish_snapshots.sh
RUN apt-get update
RUN apt-get install -y aptly wget
RUN /opt/publish_snapshots.sh "${RELEASE_SIGN_KEY_PASSPHRASE}"
FROM nginx
ARG APTLY_SNAPSHOT_DIR=/srv
# NOTE(drewwalters96): This must match the location provided in the NGINX
# config file.
COPY --from=aptly /opt/.aptly/public "${APTLY_SNAPSHOT_DIR}"

View File

@ -17,22 +17,26 @@
- project:
check:
jobs:
- openstack-helm-images-build-mini-mirror
- openstack-helm-images-build-mini-mirror-xenial
- openstack-helm-images-build-mini-mirror-bionic
gate:
jobs:
- openstack-helm-images-upload-mini-mirror
- openstack-helm-images-upload-mini-mirror-xenial
- openstack-helm-images-upload-mini-mirror-bionic
promote:
jobs:
- openstack-helm-images-promote-mini-mirror
- openstack-helm-images-promote-mini-mirror-xenial
- openstack-helm-images-promote-mini-mirror-bionic
periodic:
jobs:
- openstack-helm-images-build-mini-mirror
- openstack-helm-images-build-mini-mirror-xenial
- openstack-helm-images-build-mini-mirror-bionic
- job:
name: openstack-helm-images-build-mini-mirror
name: openstack-helm-images-build-mini-mirror-xenial
parent: openstack-helm-images-build
description: Build mini-mirror images
vars: &mini-mirror_vars
vars: &mini-mirror-xenial_vars
currentdate: "{{ now(utc=True,fmt='%Y%m%d') }}"
docker_images:
- context: mini-mirror
@ -46,15 +50,44 @@
- zuul.d/mini-mirror.yaml
- job:
name: openstack-helm-images-upload-mini-mirror
parent: openstack-helm-images-upload
description: Build and upload mini-mirror images
vars: *mini-mirror_vars
name: openstack-helm-images-build-mini-mirror-bionic
parent: openstack-helm-images-build
description: Build mini-mirror images
vars: &mini-mirror-bionic_vars
currentdate: "{{ now(utc=True,fmt='%Y%m%d') }}"
docker_images:
- context: mini-mirror
repository: openstackhelm/mini-mirror
dockerfile: Dockerfile.ubuntu_bionic
tags:
- latest-ubuntu_bionic
- "ubuntu_bionic-{{ currentdate }}"
files: *mini-mirror_files
- job:
name: openstack-helm-images-promote-mini-mirror
name: openstack-helm-images-upload-mini-mirror-xenial
parent: openstack-helm-images-upload
description: Build and upload mini-mirror images
vars: *mini-mirror-xenial_vars
files: *mini-mirror_files
- job:
name: openstack-helm-images-upload-mini-mirror-bionic
parent: openstack-helm-images-upload
description: Build and upload mini-mirror images
vars: *mini-mirror-bionic_vars
files: *mini-mirror_files
- job:
name: openstack-helm-images-promote-mini-mirror-xenial
parent: openstack-helm-images-promote
description: Promote a previously published mini-mirror image to latest.
vars: *mini-mirror_vars
vars: *mini-mirror-xenial_vars
files: *mini-mirror_files
- job:
name: openstack-helm-images-promote-mini-mirror-bionic
parent: openstack-helm-images-promote
description: Promote a previously published mini-mirror image to latest.
vars: *mini-mirror-bionic_vars
files: *mini-mirror_files