From 7e62848c9d28eaea4b3a14ae136baaf47ca085c1 Mon Sep 17 00:00:00 2001 From: Renaud Gaubert Date: Thu, 25 Jun 2020 21:34:50 +0000 Subject: [PATCH] Log CI Signed-off-by: Renaud Gaubert --- .travis.yml | 44 ++++--------------------------- tests/integration/create.bats | 1 + tests/integration/multi-arch.bash | 8 +++++- 3 files changed, 13 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9199bffb601..2b4d4e91cff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,19 +2,13 @@ dist: bionic language: go go: - 1.14.x - - 1.13.x - - tip cache: directories: - /home/travis/.vagrant.d/boxes matrix: include: - - go: 1.14.x - name: "verify-dependencies" - script: - - make verify-dependencies - - go: 1.13.x name: "cgroup-systemd" + go: 1.14 env: - RUNC_USE_SYSTEMD=1 script: @@ -23,38 +17,10 @@ matrix: - sudo chmod +x /usr/local/bin/umoci - . /etc/os-release && sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O- | sudo apt-key add - - sudo apt-get update -qq && sudo apt-get install skopeo - - sudo PATH="$PATH" make localintegration RUNC_USE_SYSTEMD=1 - - name: "fedora32" - before_install: - - sudo ./script/install-vagrant.sh - - ln -sf Vagrantfile.fedora32 Vagrantfile - - sudo vagrant up && sudo mkdir -p /root/.ssh && sudo sh -c "vagrant ssh-config >> /root/.ssh/config" - script: - - sudo ssh default -t 'cd /vagrant && sudo make localunittest' - # cgroupv2+systemd: test on vagrant host itself as we need systemd - - sudo ssh default -t 'cd /vagrant && sudo make localintegration RUNC_USE_SYSTEMD=yes' - # same setup but with fs2 driver instead of systemd - - sudo ssh default -t 'cd /vagrant && sudo make localintegration' - # cgroupv2+systemd (rootless) - - sudo ssh default -t 'cd /vagrant && sudo make localrootlessintegration RUNC_USE_SYSTEMD=yes' - # same setup but with fs2 driver (rootless) instead of systemd - - sudo ssh default -t 'cd /vagrant && sudo make localrootlessintegration' - - name: "centos7" - before_install: - - sudo ./script/install-vagrant.sh - - ln -sf Vagrantfile.centos7 Vagrantfile - - sudo vagrant up && sudo mkdir -p /root/.ssh && sudo sh -c "vagrant ssh-config >> /root/.ssh/config" - script: - # kernel 3.10 (frankenized), systemd 219 - - sudo ssh default 'rpm -q centos-release kernel systemd' - # FIXME: the following unit tests are skipped (TESTFLAGS=-short): - # FAIL: TestPidsSystemd: utils_test.go:55: exec_test.go:630: unexpected error: container_linux.go:353: starting container process caused: process_linux.go:326: applying cgroup configuration for process caused: mountpoint for devices not found - # FAIL: TestRunWithKernelMemorySystemd: exec_test.go:713: runContainer failed with kernel memory limit: container_linux.go:353: starting container process caused: process_linux.go:326: applying cgroup configuration for process caused: mkdir : no such file or directory - - sudo ssh default -t 'sudo -i make -C /vagrant localunittest TESTFLAGS=-short' - - sudo ssh default -t 'sudo -i make -C /vagrant localintegration' - - sudo ssh default -t 'sudo -i make -C /vagrant localintegration RUNC_USE_SYSTEMD=1' - # FIXME: rootless is skipped because of EPERM on writing cgroup.procs - # - sudo ssh default -t 'sudo -i make -C /vagrant localrootlessintegration' + - sudo PATH="$PATH" make runc + - sudo bash -c '. tests/integration/multi-arch.bash && get_and_extract_opensuse "/opensuse"' + - sudo PATH="$PATH" bats -t ./tests/integration/create.bats + - sudo PATH="$PATH" RUNC_USE_SYSTEMD=1 bats -t ./tests/integration/create.bats allow_failures: - go: tip diff --git a/tests/integration/create.bats b/tests/integration/create.bats index 4aa1aed1c4e..c708b06a1a0 100644 --- a/tests/integration/create.bats +++ b/tests/integration/create.bats @@ -5,6 +5,7 @@ load helpers function setup() { teardown_container setup_container + update_config '.process.args = ["echo", "Hello"]' $BUNDLE } function teardown() { diff --git a/tests/integration/multi-arch.bash b/tests/integration/multi-arch.bash index a94fc87b4b1..5c9b547d4af 100644 --- a/tests/integration/multi-arch.bash +++ b/tests/integration/multi-arch.bash @@ -12,6 +12,7 @@ get_and_extract_opensuse() { skopeo copy docker://arm64v8/opensuse/leap:15.1 "oci:$opensuse" ;; *) + >&2 echo "copying" skopeo copy docker://opensuse/leap:15.1 "oci:$opensuse" ;; esac @@ -20,9 +21,14 @@ get_and_extract_opensuse() { args+=("--rootless") fi + >&2 echo "removing $1" rm -r -f "$1" + >&2 echo "Unpacking $1" umoci unpack "${args[@]}" --image "$opensuse" "$1" - chmod -R 755 "$1/rootfs/var/lib/ca-certificates/" + + if [ "$rootless" -ne 0 ]; then + chmod -R 755 "$1/rootfs/var/lib/ca-certificates/" + fi cd - rm -rf "$tmp"