Add Ubuntu Bionic support to Pegleg

From community meeting on 04-June-2019 Ubuntu Xenial is the default
image for Airship projects, but a desire was voiced to also add support
for Ubuntu Bionic at the convenience of the contributors for each
project.

This patch:
1. Adds a new dockerfile specific to ubuntu:18.04 (bionic)
2. Updates gates to be specific about which ubuntu image is being
   checked.
3. Add to .zuul.yaml checks/gates/post jobs for bionic

Change-Id: Ib10641656f48baffec5b03ec48bf864d67209289
This commit is contained in:
Hughes, Alexander (ah8742) 2019-06-07 17:04:00 +00:00
parent fb2f62d25a
commit bf2f3781fb
2 changed files with 91 additions and 5 deletions

View File

@ -23,16 +23,19 @@
check:
jobs:
- openstack-tox-pep8
- airship-pegleg-docker-build-gate-ubuntu
- airship-pegleg-docker-build-gate-ubuntu_xenial
- airship-pegleg-docker-build-gate-ubuntu_bionic
- airship-pegleg-docker-build-gate-opensuse
gate:
jobs:
- openstack-tox-pep8
- airship-pegleg-docker-build-gate-ubuntu
- airship-pegleg-docker-build-gate-ubuntu_xenial
- airship-pegleg-docker-build-gate-ubuntu_bionic
- airship-pegleg-docker-build-gate-opensuse
post:
jobs:
- airship-pegleg-docker-publish-ubuntu
- airship-pegleg-docker-publish-ubuntu_xenial
- airship-pegleg-docker-publish-ubuntu_bionic
- airship-pegleg-docker-publish-opensuse
- pegleg-upload-git-mirror
@ -43,7 +46,7 @@
label: ubuntu-xenial
- job:
name: airship-pegleg-docker-build-gate-ubuntu
name: airship-pegleg-docker-build-gate-ubuntu_xenial
timeout: 1800
run: tools/gate/playbooks/docker-image-build.yaml
nodeset: airship-pegleg-single-node
@ -56,6 +59,20 @@
dynamic:
patch_set: true
- job:
name: airship-pegleg-docker-build-gate-ubuntu_bionic
timeout: 1800
run: tools/gate/playbooks/docker-image-build.yaml
nodeset: airship-pegleg-single-node
irrelevant-files:
- '^doc/.*'
vars:
publish: false
distro: ubuntu_bionic
tags:
dynamic:
patch_set: true
- job:
name: airship-pegleg-docker-build-gate-opensuse
timeout: 1800
@ -71,7 +88,7 @@
patch_set: true
- job:
name: airship-pegleg-docker-publish-ubuntu
name: airship-pegleg-docker-publish-ubuntu_xenial
timeout: 1800
run: tools/gate/playbooks/docker-image-build.yaml
nodeset: airship-pegleg-single-node
@ -89,6 +106,25 @@
static:
- latest
- job:
name: airship-pegleg-docker-publish-ubuntu_bionic
timeout: 1800
run: tools/gate/playbooks/docker-image-build.yaml
nodeset: airship-pegleg-single-node
secrets:
- airship_pegleg_quay_creds
irrelevant-files:
- '^doc/.*'
vars:
publish: true
distro: ubuntu_bionic
tags:
dynamic:
branch: true
commit: true
static:
- latest
- job:
name: airship-pegleg-docker-publish-opensuse
timeout: 1800

View File

@ -0,0 +1,50 @@
ARG FROM=ubuntu:18.04
FROM ${FROM}
ARG CFSSLURL=https://pkg.cfssl.org/R1.2/cfssl_linux-amd64
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode'
LABEL org.opencontainers.image.url='https://airshipit.org'
LABEL org.opencontainers.image.documentation='https://airship-pegleg.readthedocs.org'
LABEL org.opencontainers.image.source='https://opendev.org/airship/pegleg'
LABEL org.opencontainers.image.vendor='The Airship Authors'
LABEL org.opencontainers.image.licenses='Apache-2.0'
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
RUN set -ex \
&& apt-get update -qq \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gcc \
git \
libssl-dev \
netbase \
openssh-client \
python3-dev \
python3-pip \
python3-setuptools \
&& python3 -m pip install -U pip \
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf \
/tmp/* \
/usr/share/doc \
/usr/share/doc-base \
/usr/share/man \
/var/lib/apt/lists/* \
/var/log/* \
/var/tmp/*
VOLUME /var/pegleg
WORKDIR /var/pegleg
COPY requirements.txt /opt/pegleg/requirements.txt
RUN pip3 install --no-cache-dir -r /opt/pegleg/requirements.txt
COPY tools/install-cfssl.sh /opt/pegleg/tools/install-cfssl.sh
RUN /opt/pegleg/tools/install-cfssl.sh ${CFSSLURL}
COPY . /opt/pegleg
RUN pip3 install -e /opt/pegleg