Merge "Reduce build targets"

This commit is contained in:
Zuul 2022-06-15 16:55:38 +00:00 committed by Gerrit Code Review
commit 9a3d79d4a4
10 changed files with 5 additions and 92 deletions

View File

@ -27,10 +27,6 @@ by LOCI. For simplicity, we will continue to use Keystone as an example.
### Keystone Image Layer Info
CentOS: [![](https://images.microbadger.com/badges/version/loci/keystone:master-centos.svg)](https://microbadger.com/images/loci/keystone:master-centos "loci/keystone:master-centos") [![](https://images.microbadger.com/badges/image/loci/keystone:master-centos.svg)](https://microbadger.com/images/loci/keystone:master-centos "loci/keystone:master-centos")
Debian: [![](https://images.microbadger.com/badges/version/loci/keystone:master-debian.svg)](https://microbadger.com/images/loci/keystone:master-debian "loci/keystone:master-debian") [![](https://images.microbadger.com/badges/image/loci/keystone:master-debian.svg)](https://microbadger.com/images/loci/keystone:master-debian "loci/keystone:master-debian")
openSUSE Leap: [![](https://images.microbadger.com/badges/version/loci/keystone:master-leap15.svg)](https://microbadger.com/images/loci/keystone:master-leap15 "loci/keystone:master-leap15") [![](https://images.microbadger.com/badges/image/loci/keystone:master-leap15.svg)](https://microbadger.com/images/loci/keystone:master-leap15 "loci/keystone:master-leap15")
Ubuntu: [![](https://images.microbadger.com/badges/version/loci/keystone:master-ubuntu.svg)](https://microbadger.com/images/loci/keystone:master-ubuntu "loci/keystone:master-ubuntu") [![](https://images.microbadger.com/badges/image/loci/keystone:master-ubuntu.svg)](https://microbadger.com/images/loci/keystone:master-ubuntu "loci/keystone:master-ubuntu")

View File

@ -1,23 +0,0 @@
ARG FROM=debian:stretch
FROM ${FROM}
ARG DEBIAN_URL=http://deb.debian.org/debian/
ARG DEBIAN_SECURITY_URL=http://security.debian.org/debian-security/
ARG DEBIAN_SECURITY_DISTRIBUTION=stretch/updates
ARG CEPH_URL=http://download.ceph.com/debian-nautilus/
ARG ALLOW_UNAUTHENTICATED=false
ARG PIP_INDEX_URL=https://pypi.python.org/simple/
ARG PIP_TRUSTED_HOST=pypi.python.org
ENV PIP_INDEX_URL=${PIP_INDEX_URL}
ENV PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST}
COPY sources.list /etc/apt/
COPY ceph.gpg /etc/apt/trusted.gpg.d/
RUN sed -i \
-e "s|%%DEBIAN_URL%%|${DEBIAN_URL}|g" \
-e "s|%%DEBIAN_SECURITY_URL%%|${DEBIAN_SECURITY_URL}|g" \
-e "s|%%DEBIAN_SECURITY_DISTRIBUTION%%|${DEBIAN_SECURITY_DISTRIBUTION}|g" \
-e "s|%%CEPH_URL%%|${CEPH_URL}|g" \
/etc/apt/sources.list
RUN echo "APT::Get::AllowUnauthenticated \"${ALLOW_UNAUTHENTICATED}\";" \
> /etc/apt/apt.conf.d/allow-unathenticated

Binary file not shown.

View File

@ -1,5 +0,0 @@
deb %%DEBIAN_URL%% stretch main
deb %%DEBIAN_URL%% stretch-updates main
deb %%DEBIAN_URL%% stretch-backports main
deb %%DEBIAN_SECURITY_URL%% %%DEBIAN_SECURITY_DISTRIBUTION%% main
deb %%CEPH_URL%% stretch main

View File

@ -1,10 +0,0 @@
ARG FROM=opensuse/leap:15.2
FROM ${FROM}
ARG PACKAGE_MIRROR=http://download.opensuse.org/
ARG PIP_INDEX_URL=https://pypi.python.org/simple/
ARG PIP_TRUSTED_HOST=pypi.python.org
ENV PIP_INDEX_URL=${PIP_INDEX_URL}
ENV PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST}
RUN for filename in $(grep -Rl enabled=1 /etc/zypp/repos.d/); do sed -i "s|http://download.opensuse.org/|${PACKAGE_MIRROR}|" $filename; done && zypper refresh && zypper up -y && zypper install -y tar gzip which unzip

View File

@ -80,19 +80,4 @@ distros:
FROM: base:ubuntu_bionic
PROJECT_REF: "stable/ussuri"
PROJECT_RELEASE: "ussuri"
# - name: leap15
# release: master
# buildargs:
# base:
# PACKAGE_MIRROR: "http://{{ zuul_site_mirror_fqdn }}/opensuse/"
# PIP_INDEX_URL: http://{{ zuul_site_mirror_fqdn }}/pypi/simple
# PIP_TRUSTED_HOST: "{{ zuul_site_mirror_fqdn }}"
# project:
# PROJECT: "{{ project }}"
# PROJECT_REPO: http://172.17.0.1/git/openstack/{{ project }}
# WHEELS: 172.17.0.1:5000/loci/requirements:master-leap15
# FROM: base:leap15
# requirements:
# PROJECT: requirements
# PROJECT_REPO: http://172.17.0.1/git/openstack/requirements
# FROM: base:leap15
PYTHON3: yes

View File

@ -3,7 +3,7 @@
set -ex
case ${distro} in
debian|ubuntu)
ubuntu)
apt-get purge -y --auto-remove \
git \
patch \
@ -20,13 +20,6 @@ case ${distro} in
python3-virtualenv
yum clean all
;;
opensuse|opensuse-leap|opensuse-tumbleweed|sles)
zypper remove -y --clean-deps \
git-core \
patch \
python3-virtualenv
zypper clean -a
;;
*)
echo "Unknown distro: ${distro}"
exit 1

View File

@ -8,15 +8,12 @@ PACKAGES_INFO="${INFO_DIR}/packages.txt"
PIP_INFO="${INFO_DIR}/pip.txt"
case ${distro} in
debian|ubuntu)
ubuntu)
dpkg -l > $PACKAGES_INFO
;;
centos)
yum list installed > $PACKAGES_INFO
;;
opensuse|opensuse-leap|opensuse-tumbleweed|sles)
zypper se --installed-only > $PACKAGES_INFO
;;
*)
echo "Unknown distro: ${distro}"
exit 1

View File

@ -18,7 +18,7 @@ else
fi
case ${distro} in
debian|ubuntu)
ubuntu)
export LC_CTYPE=C.UTF-8
apt-get update
if [[ ! -z "$(apt-cache search ^${python3}-distutils$)" ]]; then
@ -50,23 +50,6 @@ case ${distro} in
pip3 install virtualenv
fi
;;
opensuse|opensuse-leap|opensuse-tumbleweed|sles)
if [[ "${PYTHON3}" == "no" ]]; then
rpm_python_packages+=("python-devel" "python-setuptools")
else
rpm_python_packages+=("python3-devel" "python3-setuptools"
"python3-virtualenv")
fi
zypper --non-interactive --gpg-auto-import-keys refresh
zypper --non-interactive install --no-recommends \
ca-certificates \
git-core \
lsb-release \
patch \
sudo \
tar \
${rpm_python_packages[@]}
;;
*)
echo "Unknown distro: ${distro}"
exit 1

View File

@ -12,7 +12,7 @@ done
if [[ ! -z ${PACKAGES} ]]; then
case ${distro} in
debian|ubuntu)
ubuntu)
export DEBIAN_FRONTEND=noninteractive
apt-get install -y --no-install-recommends ${PACKAGES[@]} ${DIST_PACKAGES}
@ -31,9 +31,6 @@ if [[ ! -z ${PACKAGES} ]]; then
centos)
yum -y --setopt=skip_missing_names_on_install=False install ${PACKAGES[@]} ${DIST_PACKAGES}
;;
opensuse|opensuse-leap|opensuse-tumbleweed|sles)
zypper --non-interactive install --no-recommends ${PACKAGES[@]} ${DIST_PACKAGES}
;;
*)
echo "Unknown distro: ${distro}"
exit 1