From e6ff987ea38001ea30d5db7e04df7ed876cb9ea0 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 9 Jan 2021 23:35:00 +0100 Subject: [PATCH 01/10] test buildx multiarch support --- .drone.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index 534660d..374c2f7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,17 +28,15 @@ platform: steps: - name: dryrun - image: plugins/docker:19 - settings: - dockerfile: Dockerfile - dry_run: true - password: - from_secret: docker_password - repo: thegeeklab/${DRONE_REPO_NAME} - username: - from_secret: docker_username + image: jdrouet/docker-with-buildx:stable + commands: + - docker buildx ls + - docker buildx create --use + - docker buildx ls + - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/${DRONE_REPO_NAME}:latest . environment: - DOCKER_BUILDKIT: 1 + DOCKER_DRIVER: overlay2 + DOCKER_HOST: tcp://dind:2375/ when: ref: - refs/pull/** @@ -106,6 +104,10 @@ steps: - publish-dockerhub - publish-quay +services: +- name: dind + image: docker:dind + trigger: ref: - refs/heads/main @@ -181,6 +183,6 @@ depends_on: --- kind: signature -hmac: 14eb650adf452610ccb668009fadc51bbd44f9cede6a037ae2c4430c72458b5e +hmac: dddb86bc5f442e55752da00c78dd314ac7311513aa299caff92af7735730f4df ... From 9992d99ddc9924235d41a2403cb0747b3b2d5fd4 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 9 Jan 2021 23:40:11 +0100 Subject: [PATCH 02/10] add waitfor --- .drone.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 374c2f7..ec0c583 100644 --- a/.drone.yml +++ b/.drone.yml @@ -27,6 +27,13 @@ platform: arch: amd64 steps: +- name: wait-for + image: jdrouet/docker-with-buildx:stable + commands: + - wait-for dind:2375 + environment: + WAITFOR_TIMEOUT: 60 + - name: dryrun image: jdrouet/docker-with-buildx:stable commands: @@ -183,6 +190,6 @@ depends_on: --- kind: signature -hmac: dddb86bc5f442e55752da00c78dd314ac7311513aa299caff92af7735730f4df +hmac: 4054f37d8ffac079adb44abb995554768d7b8924f3007f5691b7e1e7f5699281 ... From f3edea454398e08731b7fb50e1deebe92ac9aebc Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 9 Jan 2021 23:42:17 +0100 Subject: [PATCH 03/10] debug --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index ec0c583..a2c9769 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,7 +28,7 @@ platform: steps: - name: wait-for - image: jdrouet/docker-with-buildx:stable + image: thegeeklab/wait-for commands: - wait-for dind:2375 environment: @@ -190,6 +190,6 @@ depends_on: --- kind: signature -hmac: 4054f37d8ffac079adb44abb995554768d7b8924f3007f5691b7e1e7f5699281 +hmac: 455a7f7116b32b38f2e8a4f8b5b78453f75f9a0d2f7af09bc65be6cd96d70e53 ... From 19536cd39e3202bdd31266fb7fcbab352d9174c3 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 9 Jan 2021 23:46:43 +0100 Subject: [PATCH 04/10] debug --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a2c9769..825bc80 100644 --- a/.drone.yml +++ b/.drone.yml @@ -114,6 +114,7 @@ steps: services: - name: dind image: docker:dind + privileged: true trigger: ref: @@ -190,6 +191,6 @@ depends_on: --- kind: signature -hmac: 455a7f7116b32b38f2e8a4f8b5b78453f75f9a0d2f7af09bc65be6cd96d70e53 +hmac: a6d185d7e8e26e2f9d3c04d0fdab26a209fa6784ce6f70373936e4ca3b72c2f0 ... From 793d9c314a0e91acd62d4c13cf66de40aa82f519 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 9 Jan 2021 23:52:31 +0100 Subject: [PATCH 05/10] debug --- .drone.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 825bc80..c7caead 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,7 +30,7 @@ steps: - name: wait-for image: thegeeklab/wait-for commands: - - wait-for dind:2375 + - wait-for dind:2376 environment: WAITFOR_TIMEOUT: 60 @@ -43,10 +43,12 @@ steps: - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/${DRONE_REPO_NAME}:latest . environment: DOCKER_DRIVER: overlay2 - DOCKER_HOST: tcp://dind:2375/ + DOCKER_HOST: tcp://dind:2376/ when: ref: - refs/pull/** + depends_on: + - wait-for - name: tags image: thegeeklab/docker-autotag @@ -59,6 +61,8 @@ steps: ref: - refs/heads/main - refs/tags/** + depends_on: + - wait-for - name: publish-dockerhub image: plugins/docker:19 @@ -191,6 +195,6 @@ depends_on: --- kind: signature -hmac: a6d185d7e8e26e2f9d3c04d0fdab26a209fa6784ce6f70373936e4ca3b72c2f0 +hmac: d9fac54830b42defff2474a26cd2f447a11fef84d9fa2626a50fed49c6baf4b8 ... From 8e758b739c468a7e40a28c0464c3c3587c94481a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 9 Jan 2021 23:57:23 +0100 Subject: [PATCH 06/10] debug --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index c7caead..c374353 100644 --- a/.drone.yml +++ b/.drone.yml @@ -37,13 +37,13 @@ steps: - name: dryrun image: jdrouet/docker-with-buildx:stable commands: + - docker version - docker buildx ls - docker buildx create --use - docker buildx ls - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/${DRONE_REPO_NAME}:latest . environment: - DOCKER_DRIVER: overlay2 - DOCKER_HOST: tcp://dind:2376/ + DOCKER_HOST: tcp://dind:2376 when: ref: - refs/pull/** @@ -195,6 +195,6 @@ depends_on: --- kind: signature -hmac: d9fac54830b42defff2474a26cd2f447a11fef84d9fa2626a50fed49c6baf4b8 +hmac: b1911be7b8b67c003fc851e88437220460fe7077eb79c6afd5014bbbd7a55806 ... From 946a00b963d179e77684be9b423d47aee61bc251 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 10 Jan 2021 00:04:18 +0100 Subject: [PATCH 07/10] debug --- .drone.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index c374353..657d1ea 100644 --- a/.drone.yml +++ b/.drone.yml @@ -42,8 +42,9 @@ steps: - docker buildx create --use - docker buildx ls - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/${DRONE_REPO_NAME}:latest . - environment: - DOCKER_HOST: tcp://dind:2376 + volumes: + - name: dockersock + path: /var/run when: ref: - refs/pull/** @@ -119,6 +120,13 @@ services: - name: dind image: docker:dind privileged: true + volumes: + - name: dockersock + path: /var/run + +volumes: +- name: dockersock + temp: {} trigger: ref: @@ -195,6 +203,6 @@ depends_on: --- kind: signature -hmac: b1911be7b8b67c003fc851e88437220460fe7077eb79c6afd5014bbbd7a55806 +hmac: 91cf547b368ff043cd62db7c317e57a34fe3f1dcf9bbfbc4346d8f46b59ed21f ... From 828945521e08301c23d58051bd0ead062eaeeb39 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 10 Jan 2021 00:43:01 +0100 Subject: [PATCH 08/10] debug --- .drone.yml | 41 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/.drone.yml b/.drone.yml index 657d1ea..5d31457 100644 --- a/.drone.yml +++ b/.drone.yml @@ -37,10 +37,7 @@ steps: - name: dryrun image: jdrouet/docker-with-buildx:stable commands: - - docker version - - docker buildx ls - docker buildx create --use - - docker buildx ls - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/${DRONE_REPO_NAME}:latest . volumes: - name: dockersock @@ -66,33 +63,19 @@ steps: - wait-for - name: publish-dockerhub - image: plugins/docker:19 - settings: - dockerfile: Dockerfile - password: + image: jdrouet/docker-with-buildx:stable + commands: + - docker login -u "$$DOCKER_USERNAME" -p "$$DOCKER_PASSWORD" + - docker buildx create --use + - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/${DRONE_REPO_NAME}:latest . + environment: + DOCKER_PASSWORD: from_secret: docker_password - repo: thegeeklab/${DRONE_REPO_NAME} - username: + DOCKER_USERNAME: from_secret: docker_username - environment: - DOCKER_BUILDKIT: 1 - when: - ref: - - refs/heads/main - - refs/tags/** - depends_on: - - tags - -- name: publish-quay - image: plugins/docker:19 - settings: - dockerfile: Dockerfile - password: - from_secret: quay_password - registry: quay.io - repo: quay.io/thegeeklab/${DRONE_REPO_NAME} - username: - from_secret: quay_username + volumes: + - name: dockersock + path: /var/run when: ref: - refs/heads/main @@ -203,6 +186,6 @@ depends_on: --- kind: signature -hmac: 91cf547b368ff043cd62db7c317e57a34fe3f1dcf9bbfbc4346d8f46b59ed21f +hmac: 6f3550035ea1332afe69f46751b6b54ef4472aa674c4ac732b064659e39ad21c ... From 7b7730e2406b8d0b0f072b8f903eb59e1f6f0df0 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 10 Jan 2021 00:44:59 +0100 Subject: [PATCH 09/10] debug --- .drone.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5d31457..6e87ede 100644 --- a/.drone.yml +++ b/.drone.yml @@ -97,7 +97,6 @@ steps: - refs/tags/** depends_on: - publish-dockerhub - - publish-quay services: - name: dind @@ -186,6 +185,6 @@ depends_on: --- kind: signature -hmac: 6f3550035ea1332afe69f46751b6b54ef4472aa674c4ac732b064659e39ad21c +hmac: d56948bad090ce9c214ddc1d4024849dc31e9702511eabfc2850db2ab2672891 ... From 3ddfa75d633fbeaf1486b16dead0bcdf3bd1c8b1 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 10 Jan 2021 00:45:44 +0100 Subject: [PATCH 10/10] debug --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6e87ede..57c1ef3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -38,7 +38,7 @@ steps: image: jdrouet/docker-with-buildx:stable commands: - docker buildx create --use - - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/${DRONE_REPO_NAME}:latest . + - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/buildx-alpine:latest . volumes: - name: dockersock path: /var/run @@ -67,7 +67,7 @@ steps: commands: - docker login -u "$$DOCKER_USERNAME" -p "$$DOCKER_PASSWORD" - docker buildx create --use - - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/${DRONE_REPO_NAME}:latest . + - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/buildx-alpine:latest . environment: DOCKER_PASSWORD: from_secret: docker_password @@ -185,6 +185,6 @@ depends_on: --- kind: signature -hmac: d56948bad090ce9c214ddc1d4024849dc31e9702511eabfc2850db2ab2672891 +hmac: fbe5a3e4d5b43aa5074eb9b614cab44043517e5747288eadf7621db6650da6de ...