Run functional tests on Debian Bullseye
We need to update the base reference platform we perform the functional tests on. Debian bullseye seems like the best choice -- it is recent enough to last for a while, and will match the nodepool-builder container environment. Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/814088 Change-Id: Ic68e8c5b839cbc2852326747c68ef89f630f26a3
This commit is contained in:
parent
c41a2b7f84
commit
1a5c563920
@ -17,11 +17,13 @@
|
|||||||
description: |
|
description: |
|
||||||
This is the base set of stable tests
|
This is the base set of stable tests
|
||||||
parent: dib-functests-base
|
parent: dib-functests-base
|
||||||
nodeset: ubuntu-bionic
|
nodeset: debian-bullseye
|
||||||
vars:
|
vars:
|
||||||
dib_functests:
|
dib_functests:
|
||||||
- containerfile/focal-build-succeeds
|
- containerfile/focal-build-succeeds
|
||||||
- openeuler-minimal/20.03-LTS-SP2-build-succeeds
|
# NOTE(ianw) 2021-10-15 : this currently segfaults
|
||||||
|
# yum...
|
||||||
|
#- openeuler-minimal/20.03-LTS-SP2-build-succeeds
|
||||||
# Image based tests
|
# Image based tests
|
||||||
- centos/8-build-succeeds
|
- centos/8-build-succeeds
|
||||||
- centos/8-stream-build-succeeds
|
- centos/8-stream-build-succeeds
|
||||||
|
@ -11,4 +11,8 @@ will search active elements for a container file located in
|
|||||||
`containerfiles/${DIB_RELEASE}`.
|
`containerfiles/${DIB_RELEASE}`.
|
||||||
|
|
||||||
Alternatively, to use this element directly supply the path to a
|
Alternatively, to use this element directly supply the path to a
|
||||||
container file in the environment variable `DIB_CONTAINER_FILE`.
|
container file in the environment variable
|
||||||
|
`DIB_CONTAINERFILE_DOCKERFILE`.
|
||||||
|
|
||||||
|
Set ``DIB_CONTAINERFILE_PODMAN_ROOT`` to ``1`` to run `podman` as
|
||||||
|
`root`.
|
||||||
|
@ -25,7 +25,7 @@ if [ -f ${TARGET_ROOT}/.extra_settings ] ; then
|
|||||||
. ${TARGET_ROOT}/.extra_settings
|
. ${TARGET_ROOT}/.extra_settings
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${DIB_CONTAINER_FILE:-}" ]; then
|
if [ -z "${DIB_CONTAINERFILE_DOCKERFILE:-}" ]; then
|
||||||
_xtrace=$(set +o | grep xtrace)
|
_xtrace=$(set +o | grep xtrace)
|
||||||
set +o xtrace
|
set +o xtrace
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ if [ -z "${DIB_CONTAINER_FILE:-}" ]; then
|
|||||||
containerfile="${element_dir}/containerfiles/${DIB_RELEASE}"
|
containerfile="${element_dir}/containerfiles/${DIB_RELEASE}"
|
||||||
if [ -f "${containerfile}" ]; then
|
if [ -f "${containerfile}" ]; then
|
||||||
echo "Found container file ${containerfile}"
|
echo "Found container file ${containerfile}"
|
||||||
DIB_CONTAINER_FILE="${containerfile}"
|
DIB_CONTAINERFILE_DOCKERFILE="${containerfile}"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -52,10 +52,16 @@ DIB_CONTAINER_CONTEXT=${DIB_CONTAINER_CONTEXT:-${DIB_IMAGE_CACHE}/containerfile}
|
|||||||
|
|
||||||
mkdir -p $DIB_CONTAINER_CONTEXT
|
mkdir -p $DIB_CONTAINER_CONTEXT
|
||||||
|
|
||||||
podman build -t dib-work-image -f $DIB_CONTAINER_FILE $DIB_CONTAINER_CONTEXT
|
if [[ ${DIB_CONTAINERFILE_PODMAN_ROOT:-0} -gt 0 ]]; then
|
||||||
container=$(podman run -d dib-work-image /bin/sh)
|
_sudo="sudo"
|
||||||
podman export $container | sudo tar -C $TARGET_ROOT --numeric-owner -xf -
|
else
|
||||||
podman rm $container
|
_sudo=""
|
||||||
podman rmi dib-work-image
|
fi
|
||||||
|
|
||||||
|
${_sudo} podman build -t dib-work-image -f $DIB_CONTAINERFILE_DOCKERFILE $DIB_CONTAINER_CONTEXT
|
||||||
|
container=$(${_sudo} podman run -d dib-work-image /bin/sh)
|
||||||
|
${_sudo} podman export $container | ${_sudo} tar -C $TARGET_ROOT --numeric-owner -xf -
|
||||||
|
${_sudo} podman rm $container
|
||||||
|
${_sudo} podman rmi dib-work-image
|
||||||
|
|
||||||
sudo rm -f ${TARGET_ROOT}/.extra_settings
|
sudo rm -f ${TARGET_ROOT}/.extra_settings
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
path="$( dirname $path)"
|
path="$( dirname $path)"
|
||||||
export DIB_CONTAINER_FILE="$path/files/Dockerfile"
|
export DIB_CONTAINERFILE_DOCKERFILE="$path/files/Dockerfile"
|
||||||
|
@ -34,6 +34,22 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: ugo+rw
|
mode: ugo+rw
|
||||||
|
|
||||||
|
# NOTE(ianw) 2021-10-15 : at this point dnf-plugins-core is stuck in
|
||||||
|
# the NEW queue. Use that when it is available over this hack,
|
||||||
|
# obviously.
|
||||||
|
- name: Install dnf download
|
||||||
|
shell: |
|
||||||
|
set -x
|
||||||
|
git clone https://github.com/rpm-software-management/dnf-plugins-core
|
||||||
|
mkdir /usr/lib/python3/dist-packages/dnf-plugins
|
||||||
|
cp -r dnf-plugins-core/plugins/dnfpluginscore /usr/lib/python3/dist-packages
|
||||||
|
cp dnf-plugins-core/plugins/download.py /usr/lib/python3/dist-packages/dnf-plugins
|
||||||
|
rm -rf dnf-plugins-core
|
||||||
|
echo 'pluginpath=/usr/lib/python3/dist-packages/dnf-plugins' >> /etc/dnf/dnf.conf
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: Run dib functional tests
|
- name: Run dib functional tests
|
||||||
shell:
|
shell:
|
||||||
cmd: |
|
cmd: |
|
||||||
@ -47,3 +63,6 @@
|
|||||||
DIB_NO_TMPFS: 1
|
DIB_NO_TMPFS: 1
|
||||||
TMPDIR: /opt/dib_cache
|
TMPDIR: /opt/dib_cache
|
||||||
DIB_OS_CI_YUM_REPOS: "{{ dib_gate_mirror_repos|default(omit) }}"
|
DIB_OS_CI_YUM_REPOS: "{{ dib_gate_mirror_repos|default(omit) }}"
|
||||||
|
# NOTE(ianw) 2021-10-15 : this might be our bullseye images
|
||||||
|
# having issues with non-root podman. This works for now.
|
||||||
|
DIB_CONTAINERFILE_PODMAN_ROOT: 1
|
||||||
|
Loading…
Reference in New Issue
Block a user