From e8634053fc2b0ed44cc0c40a9ce9bfd174d768b4 Mon Sep 17 00:00:00 2001 From: Artem Khramov Date: Wed, 2 Aug 2023 13:36:37 +0300 Subject: [PATCH] FreeBSD CI Run logs retention This is a follow-up to https://github.com/moby/buildkit/pull/2376#issuecomment-1661948508. Currently, once the integration test has been run, there is no way to check the buildkitd / containerd logs. This change adds a step to print the logs Signed-off-by: Artem Khramov --- .github/workflows/test-os.yml | 4 ++++ hack/Vagrantfile.freebsd13 | 5 +++-- hack/dockerfiles/freebsd-smoke.Dockerfile | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-os.yml b/.github/workflows/test-os.yml index f02bc98ef..f5500400a 100644 --- a/.github/workflows/test-os.yml +++ b/.github/workflows/test-os.yml @@ -110,3 +110,7 @@ jobs: run: | vagrant ssh -- "cp /vagrant/hack/dockerfiles/freebsd-smoke.Dockerfile /vagrant/cmd/buildctl/Dockerfile" vagrant ssh -- "cd /vagrant/cmd/buildctl; go run . build --frontend dockerfile.v0 --local context=. --local dockerfile=." + + - name: Print BuildKit logs + if: always() + run: vagrant ssh -- "sudo cat /vagrant/run-logs/buildkitd" diff --git a/hack/Vagrantfile.freebsd13 b/hack/Vagrantfile.freebsd13 index b46a2316e..3ffa59feb 100644 --- a/hack/Vagrantfile.freebsd13 +++ b/hack/Vagrantfile.freebsd13 @@ -32,14 +32,15 @@ Vagrant.configure("2") do |config| pkg install -y go git containerd runj wait_on mkdir -p /vagrant/coverage - daemon -o /var/log/containerd.log containerd + mkdir -p /vagrant/run-logs + daemon -o /vagrant/run-logs/containerd containerd mkdir -p /run/buildkit cd /vagrant/cmd/buildkitd go build -buildvcs=false . echo "launching buildkitd..." mkdir -p /run/buildkit - daemon ./buildkitd + daemon -o /vagrant/run-logs/buildkitd ./buildkitd wait_on -t 5 /run/buildkit echo "launched buildkitd" SHELL diff --git a/hack/dockerfiles/freebsd-smoke.Dockerfile b/hack/dockerfiles/freebsd-smoke.Dockerfile index 0570bc7fc..3af67e4cf 100644 --- a/hack/dockerfiles/freebsd-smoke.Dockerfile +++ b/hack/dockerfiles/freebsd-smoke.Dockerfile @@ -1,3 +1,3 @@ -FROM dougrabson/freebsd-minimal:13.1 +FROM dougrabson/freebsd-minimal:13 RUN echo "Hello, buildkit!"