Skip to content

Commit

Permalink
Log CI
Browse files Browse the repository at this point in the history
Signed-off-by: Renaud Gaubert <rgaubert@nvidia.com>
  • Loading branch information
Renaud Gaubert committed Jun 29, 2020
1 parent a484c0a commit 7e62848
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 40 deletions.
44 changes: 5 additions & 39 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/integration/create.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ load helpers
function setup() {
teardown_container
setup_container
update_config '.process.args = ["echo", "Hello"]' $BUNDLE
}

function teardown() {
Expand Down
8 changes: 7 additions & 1 deletion tests/integration/multi-arch.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 7e62848

Please sign in to comment.