Files
Abiola Ibrahim f36ff1e3e5 v0.6.0 refactor (#848)
* core: begin migration to ubuntu

* core: update cloud image link

* k3s: update version

* core: fix boot for ubuntu

* vm: add ability to set custom hostname

* core: checkpoint: remove qemu wrapper

* core: checkpoint: remove qemu wrapper

* cli: minor bug fix for terminal output

* cli: fix broken terminal output for deb download

* cli: improve terminal output for deb download

* vm: fix docker permission on initial create

* net: remove gvproxy, migrate to user-v2

* docker: fix host-gateway address

* vm: avoid re-installing packages

* k3s: fix broken coredns

* core: improve downloader

* vm: add binfmt for cross-platform containers

* containerd: fix for ubuntu

* containerd: fix broken working directory detection

* chore: remove obsolete env var

* chore: minor refactor for binfmt

* cli: fix ip address for colima list

* docker: add daemon support for proxy env vars

* vm: add more utilities

* ci: remove obsolete ubuntu layer

* ci: move to gh from hub

* core: use custom directory for Lima

* chore: minor factor, remove obsolete variable

* docker: workaround initial user permission issue

* chore: remove obsolete code

* vm: fix binfmt cache

* core: enforce Lima version requirement

* docker: workaround permission issue

* vm: enable inotify by default

* core: enable binfmt only on host arch

* docs: prepare for v0.6.0

* nix: update Go version in shell

* nix: update build

* build: add integration test script

* ci: remove aarch64, defer until proper m1 support

* build: fix colima path in integration test script
2023-11-12 11:28:30 +01:00

85 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
set -ex
alias colima="$COLIMA_BINARY"
DOCKER_CONTEXT="$(docker info -f '{{json .}}' | jq -r '.ClientInfo.Context')"
OTHER_ARCH="amd64"
if [ "$GOARCH" == "amd64" ]; then
OTHER_ARCH="arm64"
fi
stage() (
set +x
echo
echo "######################################"
echo "$@"
echo "######################################"
echo
set -x
)
test_runtime() (
stage "runtime: $2, arch: $1"
NAME="itest-$2"
COLIMA="$COLIMA_BINARY -p $NAME"
COMMAND="docker"
if [ "$2" == "containerd" ]; then
COMMAND="$COLIMA nerdctl --"
fi
# reset
$COLIMA delete -f
# start
$COLIMA start --arch "$1" --runtime "$2"
# validate
$COMMAND ps && $COMMAND info
# validate DNS
$COLIMA ssh -- nslookup host.docker.internal
# valid building image
$COMMAND build integration
# teardown
$COLIMA delete -f
)
test_kubernetes() (
stage "k8s runtime: $2, arch: $1"
NAME="itest-$2-k8s"
COLIMA="$COLIMA_BINARY -p $NAME"
# reset
$COLIMA delete -f
# start
$COLIMA start --arch "$1" --runtime "$2" --kubernetes
# short delay
sleep 5
# validate
kubectl cluster-info && kubectl version && kubectl get nodes -o wide
# teardown
$COLIMA delete -f
)
test_runtime $GOARCH docker
test_runtime $GOARCH containerd
test_kubernetes $GOARCH docker
test_kubernetes $GOARCH containerd
test_runtime $OTHER_ARCH docker
test_runtime $OTHER_ARCH containerd
if [ -n "$DOCKER_CONTEXT" ]; then
docker context use "$DOCKER_CONTEXT" || echo # prevent error
fi