Skip to content

Commit

Permalink
ci: Enable RHEL 8 CI
Browse files Browse the repository at this point in the history
This PR enables rhel 8 CI. In this PR, we skipped the tests that are not running
on RHEL 8 as well as a modification in the setup.sh

Fixes kata-containers#2540

Signed-off-by: Gabriela Cervantes <[email protected]>
  • Loading branch information
GabyCT committed May 25, 2020
1 parent 9441e91 commit 0b56e93
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ main() {
sudo -E PATH=$PATH bash -c "echo 3 > /proc/sys/vm/drop_caches"

if [ "$ID" == rhel ]; then
sudo -E PATH=$PATH bash -c "echo 1 > /proc/sys/fs/may_detach_mounts"
major_version=$(echo $VERSION_ID | cut -d '.' -f1)
if [ "${major_version}" == "7" ]; then
sudo -E PATH=$PATH bash -c "echo 1 > /proc/sys/fs/may_detach_mounts"
fi
fi
}

Expand Down
2 changes: 1 addition & 1 deletion functional/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var _ = Describe("state", func() {

DescribeTable("container",
func(status string, waitTime int) {
if distroID() == "centos" {
if distroID() == "centos" || distroID() == "rhel" {
Skip("Issue:https://github.com/kata-containers/tests/issues/2264")
}

Expand Down
24 changes: 24 additions & 0 deletions integration/docker/package_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package docker
import (
"fmt"
"os"
"os/exec"

. "github.com/kata-containers/tests"
. "github.com/onsi/ginkgo"
Expand All @@ -18,6 +19,20 @@ const (
packageManagerMaxTries = 5
)

func versionID() string {
pathFile := "/etc/os-release"
if _, err := os.Stat(pathFile); os.IsNotExist(err) {
pathFile = "/usr/lib/os-release"
}
cmd := exec.Command("sh", "-c", fmt.Sprintf("source %s; echo -n $VERSION_ID", pathFile))
id, err := cmd.CombinedOutput()
if err != nil {
LogIfFail("couldn't find version ID %s\n", err)
return ""
}
return string(id)
}

func tryPackageManagerCommand(container string, command []string, expectedExitCode int) int {
cmd := []string{container}
exitCode := int(-1)
Expand Down Expand Up @@ -74,6 +89,10 @@ var _ = Describe("[Serial Test] package manager update test", func() {
Skip("Skip issue: https://github.com/kata-containers/tests/issues/2008")
}

if distroID() == "rhel" && versionID() >= "8" {
Skip("Issue:https://github.com/kata-containers/runtime/issues/2580")
}

// This Fedora version is used mainly because of https://github.com/kata-containers/tests/issues/2358
args = append(args, "-td", "--name", id, Fedora30Image, "sh")
_, _, exitCode := dockerRun(args...)
Expand All @@ -96,6 +115,11 @@ var _ = Describe("[Serial Test] package manager update test", func() {
if KataConfig.Hypervisor[KataHypervisor].SharedFS == "virtio-fs" {
Skip("Skip issue: https://github.com/kata-containers/tests/issues/2008")
}

if distroID() == "rhel" && versionID() >= "8" {
Skip("Issue:https://github.com/kata-containers/runtime/issues/2580")
}

args = append(args, "--rm", "-td", "--name", id, CentosImage, "sh")
_, _, exitCode := dockerRun(args...)
Expect(exitCode).To(BeZero())
Expand Down
9 changes: 9 additions & 0 deletions tracing/tracing-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ set -o nounset
set -o pipefail
set -o errtrace

source /etc/os-release || source /usr/lib/os-release

DEBUG=${DEBUG:-}
[ -n "$DEBUG" ] && set -o xtrace

Expand All @@ -23,6 +25,13 @@ jaeger_server=${jaeger_server:-localhost}
jaeger_ui_port=${jaeger_ui_port:-16686}
jaeger_docker_container_name="jaeger"

issue="https://github.com/kata-containers/tests/issues/2566"

if [ "$ID" == rhel ]; then
echo "Skip tracing test on $ID, see: $issue"
exit
fi

# Cleanup will remove Jaeger container and
# disable tracing.
cleanup(){
Expand Down

0 comments on commit 0b56e93

Please sign in to comment.