Skip to content

Commit 8523022

Browse files
authored
Merge pull request #3618 from kolyshkin/1.1-fix-centos-7-ci
[1.1] fix centos 7 CI
2 parents d66943e + fb145a2 commit 8523022

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.cirrus.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ task:
7070
CIRRUS_WORKING_DIR: /home/runc
7171
GO_VERSION: "1.17.3"
7272
BATS_VERSION: "v1.3.0"
73+
RPMS: gcc git iptables jq glibc-static libseccomp-devel make criu fuse-sshfs
7374
# yamllint disable rule:key-duplicates
7475
matrix:
7576
DISTRO: centos-7
@@ -89,6 +90,8 @@ task:
8990
case $DISTRO in
9091
centos-7)
9192
(cd /etc/yum.repos.d && curl -O https://copr.fedorainfracloud.org/coprs/adrian/criu-el7/repo/epel-7/adrian-criu-el7-epel-7.repo)
93+
# EPEL is needed for jq and fuse-sshfs.
94+
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
9295
# sysctl
9396
echo "user.max_user_namespaces=15076" > /etc/sysctl.d/userns.conf
9497
sysctl --system
@@ -104,9 +107,14 @@ task:
104107
# Work around dnf mirror failures by retrying a few times.
105108
for i in $(seq 0 2); do
106109
sleep $i
107-
yum install -y -q gcc git iptables jq glibc-static libseccomp-devel make criu fuse-sshfs && break
110+
yum install -y $RPMS && break
108111
done
109112
[ $? -eq 0 ] # fail if yum failed
113+
114+
# Double check that all rpms were installed (yum from CentOS 7
115+
# does not exit with an error if some packages were not found).
116+
# Use --whatprovides since some packages are renamed.
117+
rpm -q --whatprovides $RPMS
110118
# install Go
111119
curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar Cxz /usr/local
112120
# install bats

0 commit comments

Comments
 (0)