Skip to content

Commit

Permalink
cirrus: add seperate task and matrix for rootless
Browse files Browse the repository at this point in the history
Split rootless testing into its own cirrus task and do not merge it with
existing rootless tests.

Signed-off-by: Aditya R <arajan@redhat.com>
  • Loading branch information
flouthoc committed Mar 8, 2022
1 parent d27b883 commit 5eccef1
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
41 changes: 38 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,14 @@ integration_task:
DISTRO_NV: "${FEDORA_NAME}"
IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
PRIV_NAME: rootless
- env:
DISTRO_NV: "${PRIOR_FEDORA_NAME}"
IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
PRIV_NAME: rootless
- env:
DISTRO_NV: "${UBUNTU_NAME}"
IMAGE_NAME: "${UBUNTU_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
PRIV_NAME: rootless

gce_instance:
image_name: "$IMAGE_NAME"
Expand All @@ -255,6 +252,44 @@ integration_task:
package_versions_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh packages'
golang_version_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh golang'

integration_rootless_task:
name: "Integration rootless $DISTRO_NV w/ $STORAGE_DRIVER"
alias: integration_rootless
only_if: *not_docs
depends_on: *smoke_vendor_cross

matrix:
# Running rootless tests on overlay
# OVERLAY
- env:
DISTRO_NV: "${FEDORA_NAME}"
IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
PRIV_NAME: rootless
- env:
DISTRO_NV: "${PRIOR_FEDORA_NAME}"
IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
PRIV_NAME: rootless
- env:
DISTRO_NV: "${UBUNTU_NAME}"
IMAGE_NAME: "${UBUNTU_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
PRIV_NAME: rootless

gce_instance:
image_name: "$IMAGE_NAME"

# Separate scripts for separate outputs, makes debugging easier.
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
integration_test_script: '${SCRIPT_BASE}/test.sh integration |& ${_TIMESTAMP}'

binary_artifacts:
path: ./bin/*

always:
<<: *standardlogs

in_podman_task:
name: "Containerized Integration"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ test-conformance:

.PHONY: test-integration
test-integration: install.tools
#./tests/tools/build/ginkgo $(BUILDFLAGS) -v tests/e2e/. temporarly commenting
./tests/tools/build/ginkgo $(BUILDFLAGS) -v tests/e2e/.
cd tests; ./test_runner.sh

tests/testreport/testreport: tests/testreport/testreport.go
Expand Down
5 changes: 5 additions & 0 deletions contrib/cirrus/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ if [[ "$PRIV_NAME" == "rootless" ]] && [[ "$UID" -eq 0 ]]; then
# https://github.com/containers/podman/issues/10857
rm -rf /var/lib/cni

# change permission of go src and cache directory
# so rootless user can access it
chown -R $ROOTLESS_USER:root /var/tmp/go
chmod -R g+rwx /var/tmp/go

req_env_vars ROOTLESS_USER
msg "Re-executing test through ssh as user '$ROOTLESS_USER'"
msg "************************************************************"
Expand Down

0 comments on commit 5eccef1

Please sign in to comment.