From: Jonathan Dieter Date: Sat, 16 Nov 2019 20:15:05 +0000 (+0000) Subject: Problems with testing on CentOS 8, so switch back to 7 X-Git-Tag: archive/raspbian/1.1.9+ds1-1+rpi1~1^2~32 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b7913eee2e2d29ab89c380d3c033a1b8444877ce;p=zchunk.git Problems with testing on CentOS 8, so switch back to 7 Signed-off-by: Jonathan Dieter --- diff --git a/Jenkinsfile b/Jenkinsfile index 522cd2c..4e7785a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ node { sh "./autotest/fedora-latest/build.sh" }, centos: { - sh "./autotest/centos-latest/build.sh" + sh "./autotest/centos-7/build.sh" }, opensuse: { sh "./autotest/opensuse-leap/build.sh" @@ -24,7 +24,7 @@ node { sh "./autotest/fedora-latest/test.sh" }, centos: { - sh "./autotest/centos-latest/test.sh" + sh "./autotest/centos-7/test.sh" }, opensuse: { sh "./autotest/opensuse-leap/test.sh" diff --git a/autotest/centos-7/build.sh b/autotest/centos-7/build.sh new file mode 100755 index 0000000..3064cdd --- /dev/null +++ b/autotest/centos-7/build.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Build zchunk-centos:7 if it doesn't exist +HAVE_IMAGE=$(docker image ls -q zchunk-centos:7) +if [ "$HAVE_IMAGE" == "" ]; then + autotest/centos-7/prep.sh + if [ "$?" -ne 0 ]; then + exit 1 + fi +fi +docker image rm zchunk-centos:test -f 2>/dev/null 1>/dev/null +docker image build -t zchunk-centos:test --file autotest/centos-7/build/Dockerfile ./ + diff --git a/autotest/centos-7/build/Dockerfile b/autotest/centos-7/build/Dockerfile new file mode 100644 index 0000000..3f39e3e --- /dev/null +++ b/autotest/centos-7/build/Dockerfile @@ -0,0 +1,6 @@ +FROM zchunk-centos:7 +ADD ./ /code +WORKDIR /code +RUN meson build --auto-features=enabled && cd build && ninja-build +WORKDIR /code/build +CMD ninja-build test diff --git a/autotest/centos-7/prep.sh b/autotest/centos-7/prep.sh new file mode 100755 index 0000000..a5e8098 --- /dev/null +++ b/autotest/centos-7/prep.sh @@ -0,0 +1,7 @@ +#!/bin/sh +docker pull centos:7 +if [ "$?" -ne 0 ]; then + exit 1 +fi +docker image rm -f zchunk-centos:7 2>/dev/null 1>/dev/null +docker image build -t zchunk-centos:7 --file autotest/centos-7/prep/Dockerfile ./ diff --git a/autotest/centos-7/prep/Dockerfile b/autotest/centos-7/prep/Dockerfile new file mode 100644 index 0000000..d06cc9c --- /dev/null +++ b/autotest/centos-7/prep/Dockerfile @@ -0,0 +1,2 @@ +FROM centos:7 +RUN yum -y install epel-release && yum -y update epel-release && yum -y install meson gcc "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)" && rm -rf /var/cache/yum diff --git a/autotest/centos-7/test.sh b/autotest/centos-7/test.sh new file mode 100755 index 0000000..8034035 --- /dev/null +++ b/autotest/centos-7/test.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# Build zchunk-centos:7 if it doesn't exist +HAVE_IMAGE=$(docker image ls -q zchunk-centos:test) +if [ "$HAVE_IMAGE" == "" ]; then + autotest/centos-7/build.sh + if [ "$?" -ne 0 ]; then + exit 1 + fi +fi +docker rm zchunk-centos-test -f 2>/dev/null 1>/dev/null +docker run --name zchunk-centos-test zchunk-centos:test +RETVAL=$? +docker rm zchunk-centos-test -f 2>/dev/null 1>/dev/null +docker image rm zchunk-centos:test -f 2>/dev/null 1>/dev/null +exit $RETVAL diff --git a/autotest/centos-latest/build.sh b/autotest/centos-latest/build.sh deleted file mode 100755 index 02aef2c..0000000 --- a/autotest/centos-latest/build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# Build zchunk-centos:latest if it doesn't exist -HAVE_IMAGE=$(docker image ls -q zchunk-centos:latest) -if [ "$HAVE_IMAGE" == "" ]; then - autotest/centos-latest/prep.sh - if [ "$?" -ne 0 ]; then - exit 1 - fi -fi -docker image rm zchunk-centos:test -f 2>/dev/null 1>/dev/null -docker image build -t zchunk-centos:test --file autotest/centos-latest/build/Dockerfile ./ - diff --git a/autotest/centos-latest/build/Dockerfile b/autotest/centos-latest/build/Dockerfile deleted file mode 100644 index 96a6ccd..0000000 --- a/autotest/centos-latest/build/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM zchunk-centos:latest -ADD ./ /code -WORKDIR /code -RUN meson build --auto-features=enabled && cd build && ninja-build -WORKDIR /code/build -CMD ninja-build test diff --git a/autotest/centos-latest/prep.sh b/autotest/centos-latest/prep.sh deleted file mode 100755 index a565d3d..0000000 --- a/autotest/centos-latest/prep.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -docker pull centos:latest -if [ "$?" -ne 0 ]; then - exit 1 -fi -docker image rm -f zchunk-centos:latest 2>/dev/null 1>/dev/null -docker image build -t zchunk-centos:latest --file autotest/centos-latest/prep/Dockerfile ./ diff --git a/autotest/centos-latest/prep/Dockerfile b/autotest/centos-latest/prep/Dockerfile deleted file mode 100644 index 7dd2377..0000000 --- a/autotest/centos-latest/prep/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM centos:latest -RUN yum -y install epel-release && yum -y update epel-release && yum -y install meson gcc "pkgconfig(libzstd)" "pkgconfig(libcurl)" "pkgconfig(openssl)" && rm -rf /var/cache/yum diff --git a/autotest/centos-latest/test.sh b/autotest/centos-latest/test.sh deleted file mode 100755 index dd547c4..0000000 --- a/autotest/centos-latest/test.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# Build zchunk-centos:latest if it doesn't exist -HAVE_IMAGE=$(docker image ls -q zchunk-centos:test) -if [ "$HAVE_IMAGE" == "" ]; then - autotest/centos-latest/build.sh - if [ "$?" -ne 0 ]; then - exit 1 - fi -fi -docker rm zchunk-centos-test -f 2>/dev/null 1>/dev/null -docker run --name zchunk-centos-test zchunk-centos:test -RETVAL=$? -docker rm zchunk-centos-test -f 2>/dev/null 1>/dev/null -docker image rm zchunk-centos:test -f 2>/dev/null 1>/dev/null -exit $RETVAL diff --git a/prep-Jenkinsfile b/prep-Jenkinsfile index e482f7c..6b67e1e 100644 --- a/prep-Jenkinsfile +++ b/prep-Jenkinsfile @@ -2,7 +2,7 @@ node { checkout scm stage('Prep') { sh "./autotest/fedora-latest/prep.sh" - sh "./autotest/centos-latest/prep.sh" + sh "./autotest/centos-7/prep.sh" sh "./autotest/opensuse-leap/prep.sh" sh "./autotest/debian-latest/prep.sh" sh "./autotest/ubuntu-rolling/prep.sh"