From f8909e3265d82d948098dec928a8418903d89223 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:14:05 +0100 Subject: [PATCH 1/4] docker(install): remove deprecated colima config Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- src/docker/assets.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/docker/assets.ts b/src/docker/assets.ts index dc8d923c..57dc578a 100644 --- a/src/docker/assets.ts +++ b/src/docker/assets.ts @@ -187,12 +187,6 @@ network: dnsHosts: host.docker.internal: host.lima.internal - # Network driver to use (slirp, gvproxy), (requires vmType \`qemu\`) - # - slirp is the default user mode networking provided by Qemu - # - gvproxy is an alternative to VPNKit based on gVisor https://github.com/containers/gvisor-tap-vsock - # Default: gvproxy - driver: gvproxy - # Forward the host's SSH agent to the virtual machine. # Default: false forwardAgent: false @@ -242,14 +236,6 @@ mountType: 9p # Default: host cpuType: host -# For a more general purpose virtual machine, Ubuntu container is optionally provided -# as a layer on the virtual machine. -# The underlying virtual machine is still accessible via \`colima ssh --layer=false\` or running \`colima\` in -# the Ubuntu session. -# -# Default: false -layer: false - # Custom provision scripts for the virtual machine. # Provisioning scripts are executed on startup and therefore needs to be idempotent. # From 03b93c3aee2b8343bd919bfa088669559b1f0d07 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:18:01 +0100 Subject: [PATCH 2/4] docker(install): fallback to journalctl to print docker daemon logs colima only supports Ubuntu image since 0.6.0 which runs docker as systemd unit. Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- src/docker/install.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/docker/install.ts b/src/docker/install.ts index caec38ad..91e83c4b 100644 --- a/src/docker/install.ts +++ b/src/docker/install.ts @@ -362,7 +362,11 @@ EOF`, private async tearDownDarwin(): Promise { await core.group('Docker daemon logs', async () => { - await Exec.exec('colima', ['exec', '--', 'cat', '/var/log/docker.log']); + await Exec.exec('colima', ['exec', '--', 'cat', '/var/log/docker.log']).catch(async () => { + await Exec.exec('colima', ['exec', '--', 'sudo', 'journalctl', '-u', 'docker.service', '-l', '--no-pager']).catch(() => { + core.warning(`Failed to get Docker daemon logs`); + }); + }); }); await core.group('Stopping colima', async () => { await Exec.exec('colima', ['stop', '--very-verbose']); From 3281ef2a12c1b3dfe74fa262ad3eb3c2934a4a46 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 16 Nov 2023 11:35:52 +0100 Subject: [PATCH 3/4] docker(install): simplify provision Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- src/docker/assets.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/docker/assets.ts b/src/docker/assets.ts index 57dc578a..30fe7699 100644 --- a/src/docker/assets.ts +++ b/src/docker/assets.ts @@ -256,10 +256,7 @@ cpuType: host provision: - mode: system script: | - mkdir -p /tmp/docker-bins - cd /tmp/docker-bins - wget -qO- "https://download.docker.com/linux/static/{{dockerBinChannel}}/{{dockerBinArch}}/docker-{{dockerBinVersion}}.tgz" | tar xvz --strip 1 - mv -f /tmp/docker-bins/* /usr/bin/ + wget -qO- "https://download.docker.com/linux/static/{{dockerBinChannel}}/{{dockerBinArch}}/docker-{{dockerBinVersion}}.tgz" | tar xvz --strip 1 -C /usr/bin/ # Modify ~/.ssh/config automatically to include a SSH config for the virtual machine. # SSH config will still be generated in ~/.colima/ssh_config regardless. From cef4c1617011e6b3a6863eae4647e49d354aa25e Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Mon, 13 Nov 2023 11:20:44 +0100 Subject: [PATCH 4/4] ci(test): add macos-13 to the matrix Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/test.yml | 3 +++ __tests__/docker/install.test.itg.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ed6c0e8b..5c0bc711 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,9 +78,12 @@ jobs: test: ${{ fromJson(needs.prepare-itg.outputs.matrix) }} os: - ubuntu-latest + - macos-13 - macos-latest - windows-latest exclude: + - os: macos-13 + test: buildx/bake.test.itg.ts - os: macos-latest test: buildx/bake.test.itg.ts - os: windows-latest diff --git a/__tests__/docker/install.test.itg.ts b/__tests__/docker/install.test.itg.ts index 7313b67a..b4a24263 100644 --- a/__tests__/docker/install.test.itg.ts +++ b/__tests__/docker/install.test.itg.ts @@ -30,7 +30,7 @@ describe('install', () => { process.env = { ...originalEnv, SIGN_QEMU_BINARY: '1', - COLIMA_START_ARGS: '--cpu 4 --memory 8 --disk 32 --dns 1.1.1.1 --dns 8.8.8.8 --dns-host example.com=1.2.3.4' + COLIMA_START_ARGS: '--cpu 4 --memory 8 --disk 32' }; }); afterEach(() => { @@ -52,5 +52,5 @@ describe('install', () => { await Docker.printInfo(); await install.tearDown(); })()).resolves.not.toThrow(); - }, 600000); + }, 1200000); });