From eb330c525f18a8a4192942552c55d06bf2dec418 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 4 Dec 2017 13:05:49 +0800 Subject: [PATCH] test/docker-test: drop support for ubuntu 14.04 and centos 6 * we cannot build on centos 6. and we are dropping the support for ubuntu 14.04 also. * add ubuntu 17.04: this release is not a LTS release, and added merely for demostration purpose. Signed-off-by: Kefu Chai (cherry picked from commit 1acfa03ef922044ae68d37e580a296c7e9c37913) --- src/test/centos-6/Dockerfile.in | 30 ------------------ src/test/centos-6/ceph.spec.in | 1 - src/test/docker-test-helper.sh | 21 ++++++------- src/test/ubuntu-12.04/Dockerfile.in | 31 ------------------- src/test/ubuntu-12.04/debian | 1 - src/test/ubuntu-12.04/install-deps.sh | 1 - src/test/ubuntu-14.04/debian | 1 - src/test/ubuntu-14.04/install-deps.sh | 1 - .../Dockerfile.in | 4 +-- src/test/ubuntu-17.04/debian | 1 + .../install-deps.sh | 0 11 files changed, 13 insertions(+), 79 deletions(-) delete mode 100644 src/test/centos-6/Dockerfile.in delete mode 120000 src/test/centos-6/ceph.spec.in delete mode 100644 src/test/ubuntu-12.04/Dockerfile.in delete mode 120000 src/test/ubuntu-12.04/debian delete mode 120000 src/test/ubuntu-12.04/install-deps.sh delete mode 120000 src/test/ubuntu-14.04/debian delete mode 120000 src/test/ubuntu-14.04/install-deps.sh rename src/test/{ubuntu-14.04 => ubuntu-17.04}/Dockerfile.in (92%) create mode 120000 src/test/ubuntu-17.04/debian rename src/test/{centos-6 => ubuntu-17.04}/install-deps.sh (100%) diff --git a/src/test/centos-6/Dockerfile.in b/src/test/centos-6/Dockerfile.in deleted file mode 100644 index b3f44791d0a95..0000000000000 --- a/src/test/centos-6/Dockerfile.in +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (C) 2015 Red Hat -# -# Author: Loic Dachary -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library Public License for more details. -# -# Environment variables are substituted via envsubst(1) -# -# user_id=$(id -u) -# os_version= the desired REPOSITORY TAG -# -FROM centos:%%os_version%% -COPY install-deps.sh /root/ -COPY ceph.spec.in /root/ -RUN yum install -y yum-utils && yum-config-manager --add-repo https://dl.fedoraproject.org/pub/epel/6/x86_64/ && yum install --nogpgcheck -y epel-release && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 && rm /etc/yum.repos.d/dl.fedoraproject.org* -# build dependencies -RUN yum install -y which ; cd /root ; ./install-deps.sh -# development tools -# nc is required to run make check on firefly only (giant+ do not use nc) -RUN yum install -y ccache valgrind gdb git python-virtualenv gdisk kpartx jq sudo xmlstarlet parted nc -RUN if test %%USER%% != root ; then useradd -M --uid %%user_id%% %%USER%% && echo '%%USER%% ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers ; fi diff --git a/src/test/centos-6/ceph.spec.in b/src/test/centos-6/ceph.spec.in deleted file mode 120000 index 9abcafd12dbb9..0000000000000 --- a/src/test/centos-6/ceph.spec.in +++ /dev/null @@ -1 +0,0 @@ -../../../ceph.spec.in \ No newline at end of file diff --git a/src/test/docker-test-helper.sh b/src/test/docker-test-helper.sh index d36a3b760d9a7..d3f58300d9a08 100755 --- a/src/test/docker-test-helper.sh +++ b/src/test/docker-test-helper.sh @@ -153,8 +153,8 @@ $0 [options] command args ... [--os-type type] docker image repository (centos, ubuntu, etc.) (defaults to ubuntu) - [--os-version version] docker image tag (7 for centos, 12.04 for ubuntu, etc.) - (defaults to 14.04) + [--os-version version] docker image tag (7 for centos, 16.04 for ubuntu, etc.) + (defaults to 16.04) [--ref gitref] git reset --hard gitref before running the command (defaults to git rev-parse HEAD) [--all types+versions] list of docker image repositories and tags @@ -171,7 +171,7 @@ continues. Here is a sample use case including an interactive session and running a unit test: $ lsb_release -d - Description: Ubuntu Trusty Tahr (development branch) + Description: Ubuntu Xenial Xerus (development branch) $ test/docker-test.sh --os-type centos --os-version 7 --shell HEAD is now at 1caee81 autotools: add --enable-docker bash-4.2$ pwd @@ -202,13 +202,12 @@ and running a unit test: The --all argument is a bash associative array literal listing the operating system version for each operating system type. For instance - docker-test.sh --all '([ubuntu]="12.04 14.04" [centos]="6 7")' + docker-test.sh --all '([ubuntu]="16.04 17.04" [centos]="7")' is strictly equivalent to - docker-test.sh --os-type ubuntu --os-version 12.04 - docker-test.sh --os-type ubuntu --os-version 14.04 - docker-test.sh --os-type centos --os-version 6 + docker-test.sh --os-type ubuntu --os-version 16.04 + docker-test.sh --os-type ubuntu --os-version 17.04 docker-test.sh --os-type centos --os-version 7 The --os-type and --os-version must be exactly as displayed by docker images: @@ -216,7 +215,7 @@ The --os-type and --os-version must be exactly as displayed by docker images: $ docker images REPOSITORY TAG IMAGE ID ... centos 7 87e5b6b3ccc1 ... - ubuntu 14.04 6b4e8a7373fe ... + ubuntu 16.04 6b4e8a7373fe ... The --os-type value can be any string in the REPOSITORY column, the --os-version can be any string in the TAG column. @@ -232,8 +231,8 @@ docker-test.sh --ref giant -- make check Run an interactive shell and set resolv.conf to use 172.17.42.1 docker-test.sh --opts --dns=172.17.42.1 --shell -Run make check on centos 6, centos 7, ubuntu 12.04 and ubuntu 14.04 -docker-test.sh --all '([ubuntu]="12.04 14.04" [centos]="6 7")' -- make check +Run make check on centos 7, ubuntu 16.04 and ubuntu 17.04 +docker-test.sh --all '([ubuntu]="16.04 17.04" [centos]="7")' -- make check EOF } @@ -249,7 +248,7 @@ function main_docker() { eval set -- "$temp" local os_type=ubuntu - local os_version=14.04 + local os_version=16.04 local all local remove=false local shell=false diff --git a/src/test/ubuntu-12.04/Dockerfile.in b/src/test/ubuntu-12.04/Dockerfile.in deleted file mode 100644 index 738bb66c1849e..0000000000000 --- a/src/test/ubuntu-12.04/Dockerfile.in +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (C) 2014, 2015 Red Hat -# -# Author: Loic Dachary -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library Public License for more details. -# -# Environment variables are substituted via envsubst(1) -# -# user_id=$(id -u) -# os_version= the desired REPOSITORY TAG -# -FROM ubuntu:%%os_version%% - -COPY install-deps.sh /root/ -RUN mkdir /root/debian -COPY debian /root/debian/ -RUN apt-get update -# build dependencies -RUN cd /root ; ./install-deps.sh -# development tools -RUN apt-get install -y sudo ccache valgrind gdb python-virtualenv gdisk kpartx xmlstarlet -RUN if test %%USER%% != root ; then useradd -M --uid %%user_id%% %%USER%% && echo '%%USER%% ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers ; fi diff --git a/src/test/ubuntu-12.04/debian b/src/test/ubuntu-12.04/debian deleted file mode 120000 index dfdd39e6b2ba2..0000000000000 --- a/src/test/ubuntu-12.04/debian +++ /dev/null @@ -1 +0,0 @@ -../../../debian \ No newline at end of file diff --git a/src/test/ubuntu-12.04/install-deps.sh b/src/test/ubuntu-12.04/install-deps.sh deleted file mode 120000 index fc9c78b27ff6f..0000000000000 --- a/src/test/ubuntu-12.04/install-deps.sh +++ /dev/null @@ -1 +0,0 @@ -../../../install-deps.sh \ No newline at end of file diff --git a/src/test/ubuntu-14.04/debian b/src/test/ubuntu-14.04/debian deleted file mode 120000 index dfdd39e6b2ba2..0000000000000 --- a/src/test/ubuntu-14.04/debian +++ /dev/null @@ -1 +0,0 @@ -../../../debian \ No newline at end of file diff --git a/src/test/ubuntu-14.04/install-deps.sh b/src/test/ubuntu-14.04/install-deps.sh deleted file mode 120000 index fc9c78b27ff6f..0000000000000 --- a/src/test/ubuntu-14.04/install-deps.sh +++ /dev/null @@ -1 +0,0 @@ -../../../install-deps.sh \ No newline at end of file diff --git a/src/test/ubuntu-14.04/Dockerfile.in b/src/test/ubuntu-17.04/Dockerfile.in similarity index 92% rename from src/test/ubuntu-14.04/Dockerfile.in rename to src/test/ubuntu-17.04/Dockerfile.in index a2c214c3230ba..1f006663967ef 100644 --- a/src/test/ubuntu-14.04/Dockerfile.in +++ b/src/test/ubuntu-17.04/Dockerfile.in @@ -1,5 +1,5 @@ # -# Copyright (C) 2014, 2015 Red Hat +# Copyright (C) 2016 Red Hat # # Author: Loic Dachary # @@ -27,5 +27,5 @@ RUN apt-get update # build dependencies RUN cd /root ; ./install-deps.sh # development tools -RUN apt-get install -y ccache valgrind gdb python-virtualenv gdisk kpartx jq xmlstarlet +RUN apt-get install -y ccache valgrind gdb python-virtualenv 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 diff --git a/src/test/ubuntu-17.04/debian b/src/test/ubuntu-17.04/debian new file mode 120000 index 0000000000000..61c3c9f50e34a --- /dev/null +++ b/src/test/ubuntu-17.04/debian @@ -0,0 +1 @@ +../../../debian/ \ No newline at end of file diff --git a/src/test/centos-6/install-deps.sh b/src/test/ubuntu-17.04/install-deps.sh similarity index 100% rename from src/test/centos-6/install-deps.sh rename to src/test/ubuntu-17.04/install-deps.sh -- 2.39.5