Skip to content

Commit b42e936

Browse files
committed
CI: add Rocky Linux 8
Testing containerd on an EL8 variant will be beneficial for enterprise users. EL9 is coming soon, but we should keep maintaining EL8 CI for a couple of years for long-time stability. Fixes issue 6542 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
1 parent 11685cc commit b42e936

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,17 +509,20 @@ jobs:
509509
path: |
510510
*-junit.xml
511511
512-
cgroup2:
513-
name: CGroupsV2 - SELinux enforced
512+
vagrant:
513+
name: Vagrant
514514
# nested virtualization is only available on macOS hosts
515515
runs-on: macos-10.15
516516
timeout-minutes: 45
517517
needs: [project, linters, protos, man]
518518
strategy:
519+
fail-fast: false
519520
matrix:
520521
# Currently crun is disabled to decrease CI flakiness.
521522
# We can enable crun again when we get a better CI infra.
522523
runc: [runc]
524+
# Fedora is for testing cgroup v2 functionality, Rocky Linux is for testing on an enterprise-grade environment
525+
box: ["fedora/35-cloud-base", "rockylinux/8"]
523526
env:
524527
GOTEST: gotestsum --
525528
steps:
@@ -532,7 +535,13 @@ jobs:
532535
key: vagrant-${{ hashFiles('Vagrantfile*') }}
533536

534537
- name: Vagrant start
538+
env:
539+
BOX: ${{ matrix.box }}
535540
run: |
541+
if [ "$BOX" = "rockylinux/8" ]; then
542+
# The latest version 5.0.0 seems 404 (as of March 30, 2022)
543+
export BOX_VERSION="4.0.0"
544+
fi
536545
# Retry if it fails (download.fedoraproject.org returns 404 sometimes)
537546
vagrant up || vagrant up
538547
@@ -565,7 +574,8 @@ jobs:
565574
- uses: actions/upload-artifact@v2
566575
if: always()
567576
with:
568-
name: TestResults cgroup2 ${{ matrix.runtime }} ${{matrix.runc}}
577+
# ${{ matrix.box }} cannot be used here due to character limitation
578+
name: TestResults vagrant ${{ github.run_id }} ${{ matrix.runtime }} ${{matrix.runc}}
569579
path: |
570580
${{github.workspace}}/*-junit.xml
571581
${{github.workspace}}/critestreport/*

Vagrantfile

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
# Vagrantfile for cgroup2 and SELinux
18+
# Vagrantfile for Fedora and EL
1919
Vagrant.configure("2") do |config|
20-
config.vm.box = "fedora/35-cloud-base"
20+
config.vm.box = ENV["BOX"] || "fedora/35-cloud-base"
21+
config.vm.box_version = ENV["BOX_VERSION"]
2122
memory = 4096
2223
cpus = 2
2324
config.vm.provider :virtualbox do |v|
@@ -71,6 +72,19 @@ Vagrant.configure("2") do |config|
7172
SHELL
7273
end
7374

75+
# EL does not have /usr/local/{bin,sbin} in the PATH by default
76+
config.vm.provision "setup-etc-environment", type: "shell", run: "once" do |sh|
77+
sh.upload_path = "/tmp/vagrant-setup-etc-environment"
78+
sh.inline = <<~SHELL
79+
#!/usr/bin/env bash
80+
set -eux -o pipefail
81+
cat >> /etc/environment <<EOF
82+
PATH=/usr/local/go/bin:/usr/local/bin:/usr/local/sbin:$PATH
83+
EOF
84+
source /etc/environment
85+
SHELL
86+
end
87+
7488
# To re-run this provisioner, installing a different version of go:
7589
# GO_VERSION="1.14.6" vagrant up --provision-with=install-golang
7690
#
@@ -83,10 +97,6 @@ Vagrant.configure("2") do |config|
8397
#!/usr/bin/env bash
8498
set -eux -o pipefail
8599
curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar Cxz /usr/local
86-
cat >> /etc/environment <<EOF
87-
PATH=/usr/local/go/bin:$PATH
88-
EOF
89-
source /etc/environment
90100
cat >> /etc/profile.d/sh.local <<EOF
91101
GOPATH=\\$HOME/go
92102
PATH=\\$GOPATH/bin:\\$PATH

0 commit comments

Comments
 (0)