Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: switch away from GHA to Cirrus CI #236

Merged
merged 1 commit into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# We use Vagrant to prepare cgroup v2 env.

compute_engine_instance:
image_project: cirrus-images
image: family/docker-kvm
platform: linux
nested_virtualization: true
# CPU limit: `16 / NTASK`: see https://cirrus-ci.org/faq/#are-there-any-limits
cpu: 8
# Memory limit: `4GB * NCPU`
memory: 32G

task_template: &TASK_TEMPLATE
timeout_in: 30m
env:
DEBIAN_FRONTEND: noninteractive
HOME: /root
DOCKER_BUILDKIT: 1
info_script:
- uname -a
- cat /proc/cpuinfo
- docker info
build_script:
- make
install_libvirt_vagrant_script:
- apt-get update
- apt-get install -y libvirt-daemon libvirt-daemon-system vagrant vagrant-libvirt
- systemctl enable --now libvirtd
vagrant_cache:
fingerprint_script: uname -s ; cat Vagrantfile
folder: /root/.vagrant.d
vagrant_up_script:
- vagrant up
# <FIXME>
# Enabling cgroup delegation seems to need rebooting since Fedora 34: https://github.com/rootless-containers/rootlesscontaine.rs/issues/32
# We shouldn't need this reboot.
vagrant_reboot_script:
- vagrant halt
- vagrant up
# </FIXME>
vagrant_ssh_config_script:
- mkdir -p -m 0700 /root/.ssh
- vagrant ssh-config >> /root/.ssh/config

single_node_task:
<< : *TASK_TEMPLATE
name: "Single node"
containerd_test_script:
- ssh default /vagrant/hack/smoketest-binaries.sh --cri=containerd
crio_test_script:
- ssh default /vagrant/hack/smoketest-binaries.sh --cri=crio

multi_node_task:
<< : *TASK_TEMPLATE
name: "Multi node with Flannel (Docker Compose)"
install_docker_script:
- ssh default sudo dnf install -y moby-engine docker-compose make
- ssh default sudo usermod -aG docker vagrant
- ssh default sudo systemctl enable --now docker
load_image_script:
- docker save ghcr.io/rootless-containers/usernetes:latest | ssh default docker load
compose_test_script:
- ssh default /vagrant/hack/smoketest-docker-compose.sh
70 changes: 0 additions & 70 deletions .github/workflows/main.yaml

This file was deleted.

7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ _test:
up: image _up

_up:
docker-compose up -d
docker-compose --project-name=usernetes up -d
docker run --rm -v usernetes_tls-master:/a busybox timeout 60 sh -c "until test -f /a/done; do sleep 1; echo \"waiting for /a/done\"; done"
mkdir -p $(HOME)/.config/usernetes
docker run --rm -v usernetes_tls-master:/a busybox sh -c "until test -f /a/done; do sleep 1; done; cat /a/admin-localhost.kubeconfig" > $(HOME)/.config/usernetes/docker-compose.kubeconfig
docker run --rm -v usernetes_tls-master:/a busybox cat /a/admin-localhost.kubeconfig > $(HOME)/.config/usernetes/docker-compose.kubeconfig
echo "To use kubectl: export KUBECONFIG=$(HOME)/.config/usernetes/docker-compose.kubeconfig"

down:
docker-compose down -v -t 0
docker-compose --project-name=usernetes down -v -t 0
rm -f $(HOME)/.config/usernetes/docker-compose.kubeconfig

artifact: binaries _artifact
Expand Down