Merge pull request #37291 from badone/wip-docker-test-helper-fixes

test/docker-test: helper fixes and support more distro releases

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2020-09-22 14:17:23 +08:00 committed by GitHub
commit 597ef5ea9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 3 deletions

View File

@ -25,7 +25,7 @@ COPY ceph.spec.in /root/
RUN dnf install -y redhat-lsb-core
RUN dnf install -y yum-utils && dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 && dnf update -y && dnf config-manager --enable cr
# build dependencies
RUN dnf install -y git sudo
RUN cd /root ; ./install-deps.sh
# development tools
RUN dnf install -y git sudo
RUN if test %%USER%% != root ; then useradd -M --uid %%user_id%% %%USER%% && echo '%%USER%% ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers ; fi

View File

@ -126,6 +126,9 @@ function run_in_docker() {
local cmd="$dockercmd run $opts --rm --name $image --privileged $ccache"
cmd+=" --volume $downstream:$downstream"
cmd+=" --volume $upstream:$upstream"
if test "$dockercmd" = "podman" ; then
cmd+=" --userns=keep-id"
fi
local status=0
if test "$script" = "SHELL" ; then
$cmd --tty --interactive --workdir $downstream $user $image bash

1
src/test/fedora-32 Symbolic link
View File

@ -0,0 +1 @@
fedora-31

1
src/test/fedora-33 Symbolic link
View File

@ -0,0 +1 @@
fedora-31

View File

@ -25,7 +25,7 @@ RUN mkdir /root/debian
COPY debian /root/debian/
RUN apt-get update
# build dependencies
RUN cd /root ; ./install-deps.sh
RUN cd /root ; DEBIAN_FRONTEND=noninteractive ./install-deps.sh
# development tools
RUN apt-get install -y ccache valgrind gdb python-virtualenv gdisk kpartx jq xmlstarlet sudo
RUN apt-get install -y ccache valgrind gdb gdisk kpartx jq xmlstarlet sudo
RUN if test %%USER%% != root ; then useradd -M --uid %%user_id%% %%USER%% && echo '%%USER%% ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers ; fi

1
src/test/ubuntu-20.04 Symbolic link
View File

@ -0,0 +1 @@
ubuntu-18.04