Skip to content

Commit

Permalink
Add tests for CentOS 8
Browse files Browse the repository at this point in the history
Signed-off-by: Merlin Mathesius <[email protected]>
  • Loading branch information
mmathesius authored and sgallagher committed Jan 8, 2020
1 parent 146a950 commit a7663ba
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ addons:
- bash
- tar
- bzip2
- m4

env:
global:
Expand Down Expand Up @@ -38,6 +39,10 @@ jobs:
script: ./.travis/travis-centos.sh
arch: amd64

- name: "CentOS 8 x86_64"
script: ./.travis/travis-centos.sh
arch: amd64


- stage: Fedora x86_64
name: "Fedora 30 x86_64"
Expand Down
10 changes: 9 additions & 1 deletion .travis/centos/Dockerfile.deps.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ FROM @IMAGE@
MAINTAINER Stephen Gallagher <[email protected]>

RUN yum -y install epel-release \
ifelse(eval(_RELEASE_ >= 8), 1, `dnl
&& yum -y install dnf-plugins-core \
&& yum config-manager --enable PowerTools \
')dnl
&& yum -y --setopt=tsflags='' install \
clang \
createrepo_c \
Expand All @@ -21,9 +25,13 @@ RUN yum -y install epel-release \
pkgconfig \
python2-devel \
python2-six \
ifelse(eval(_RELEASE_ < 8), 1, `dnl
python-gobject-base \
python36-devel \
python36-gobject-base \
',`dnl
python3-gobject-base \
')dnl
python36-devel \
python3-rpm-macros \
redhat-rpm-config \
rpm-build \
Expand Down
6 changes: 5 additions & 1 deletion .travis/travis-centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ JOB_NAME=${TRAVIS_JOB_NAME:-CentOS 7}

arr=($JOB_NAME)
release=${arr[1]:-7}
case $release in
8) repository=docker.io ;;
*) repository=registry.centos.org ;;
esac

mmd_run_docker_tests \
os=centos \
release=$release \
repository=registry.centos.org
repository=$repository

popd # $SCRIPT_DIR
9 changes: 6 additions & 3 deletions .travis/travis-common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@ function mmd_run_docker_tests {
git ls-files |xargs tar cfj $MMD_TARBALL_PATH .git
popd

sed -e "s#@IMAGE@#$repository/$image#" \
$SCRIPT_DIR/$MMD_OS/Dockerfile.deps.tmpl > $SCRIPT_DIR/$MMD_OS/Dockerfile.deps.$MMD_RELEASE
sed -e "s/@RELEASE@/$MMD_OS:$MMD_RELEASE/" $SCRIPT_DIR/$MMD_OS/Dockerfile.tmpl > $SCRIPT_DIR/$MMD_OS/Dockerfile-$MMD_RELEASE
sed -e "s#@IMAGE@#$repository/$image#" $SCRIPT_DIR/$MMD_OS/Dockerfile.deps.tmpl \
| m4 -D_RELEASE_=$release \
> $SCRIPT_DIR/$MMD_OS/Dockerfile.deps.$MMD_RELEASE
sed -e "s/@RELEASE@/$MMD_OS:$MMD_RELEASE/" $SCRIPT_DIR/$MMD_OS/Dockerfile.tmpl \
| m4 -D_RELEASE_=$release \
> $SCRIPT_DIR/$MMD_OS/Dockerfile-$MMD_RELEASE

$MMD_BUILDAH $MMD_LAYERS_TRUE \
-f $SCRIPT_DIR/$MMD_OS/Dockerfile.deps.$MMD_RELEASE \
Expand Down

0 comments on commit a7663ba

Please sign in to comment.