From 2ad6dcd1a925cf7164f3ae7be82fa85f0c20dc03 Mon Sep 17 00:00:00 2001 From: Alan Peng Date: Tue, 6 Apr 2021 02:57:30 +0800 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fcd4bfd..bba0d27 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,12 @@ -include: - - project: 'alanpeng/kubeadm-version' - file: '/gitlab-ci-template.yml' - -variables: -# remove comment (or set variable in Settings) to build with BUILDX - #CI_BUILDX_ARCHS: "linux/arm64" - CI_BUILD_ARM64: "enabled" +build_image: + image: docker:git + services: + - docker:dind + before_script: + - docker run --privileged linuxkit/binfmt:v0.8 + - docker run -d --privileged -p 1234:1234 --name buildkit moby/buildkit:latest --addr tcp://0.0.0.0:1234 --oci-worker-platform linux/amd64 --oci-worker-platform linux/arm64 + - docker cp buildkit:/usr/bin/buildctl /usr/bin/ + - export BUILDKIT_HOST=tcp://0.0.0.0:1234 + script: + - sh build-images.sh + when: always