From 5d999a44829989a3698fe7f827e6c5ae98f66ca8 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 30 Oct 2023 08:51:32 -0400 Subject: [PATCH 1/5] Add buildx multiarch to prcheck as a test --- pr_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_check.sh b/pr_check.sh index e163655c..0c09729a 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -14,7 +14,7 @@ docker rm -f $CONTAINER_NAME-run # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it -docker build -t $CONTAINER_NAME -f build/Dockerfile.pr . +docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr . docker run -i --name $CONTAINER_NAME-run -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh From 143d34efcc49b6d10a9e7af0c2b5b7265e5da9c6 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 30 Oct 2023 08:56:33 -0400 Subject: [PATCH 2/5] Builder management --- pr_check.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pr_check.sh b/pr_check.sh index 0c09729a..625062a1 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -14,7 +14,9 @@ docker rm -f $CONTAINER_NAME-run # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it +docker buildx create --name feo-builder --use --bootstrap docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr . +docker buildx rm feo-builder docker run -i --name $CONTAINER_NAME-run -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh From ac1def8027355081f518328499bb35eca60fadfe Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 30 Oct 2023 08:58:41 -0400 Subject: [PATCH 3/5] Update pr_check.sh --- pr_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_check.sh b/pr_check.sh index 625062a1..a2741bab 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -14,7 +14,7 @@ docker rm -f $CONTAINER_NAME-run # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it -docker buildx create --name feo-builder --use --bootstrap +docker buildx create --name feo-builder --use --bootstrap --driver docker-container --driver-opt image=quay.io/domino/buildkit:v0.12.0 docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr . docker buildx rm feo-builder From 7efdb5dce3113d894fe71d0cc3fa771f4a27c2ea Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 30 Oct 2023 08:59:50 -0400 Subject: [PATCH 4/5] Try again --- pr_check.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pr_check.sh b/pr_check.sh index a2741bab..8c4a847d 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -14,6 +14,7 @@ docker rm -f $CONTAINER_NAME-run # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it +docker buildx rm feo-builder || true docker buildx create --name feo-builder --use --bootstrap --driver docker-container --driver-opt image=quay.io/domino/buildkit:v0.12.0 docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr . docker buildx rm feo-builder From eab270110fe2c52d35a47d587d7a46fd2ea455c6 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 30 Oct 2023 09:22:22 -0400 Subject: [PATCH 5/5] Try again --- pr_check.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pr_check.sh b/pr_check.sh index 8c4a847d..96aadbe9 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -14,20 +14,23 @@ docker rm -f $CONTAINER_NAME-run # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it -docker buildx rm feo-builder || true -docker buildx create --name feo-builder --use --bootstrap --driver docker-container --driver-opt image=quay.io/domino/buildkit:v0.12.0 -docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr . -docker buildx rm feo-builder +docker buildx inspect --bootstrap +docker buildx ls +#docker buildx rm feo-builder || true +#docker buildx create --name feo-builder --use --bootstrap --driver docker-container --driver-opt image=quay.io/domino/buildkit:v0.12.0 +#docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr . +#docker buildx rm feo-builder -docker run -i --name $CONTAINER_NAME-run -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh +#docker run -i --name $CONTAINER_NAME-run -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh +true TEST_RESULT=$? -mkdir -p artifacts +#mkdir -p artifacts -docker cp $CONTAINER_NAME-run:/container_workspace/artifacts/ $PWD +#docker cp $CONTAINER_NAME-run:/container_workspace/artifacts/ $PWD -docker rm -f $CONTAINER_NAME -docker rm -f $CONTAINER_NAME-run +#docker rm -f $CONTAINER_NAME +#docker rm -f $CONTAINER_NAME-run exit $TEST_RESULT