From e740a7bc766701aa4c8dae4400b1910e1d90921a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 15 Feb 2021 20:18:31 +0100 Subject: [PATCH] fix: normalize version variable in buildx download url --- .drone.jsonnet | 3 ++- docker/Dockerfile.amd64 | 3 ++- docker/Dockerfile.arm | 3 ++- docker/Dockerfile.arm64 | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 3292808..4314988 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -87,8 +87,9 @@ local PipelineBuildBinaries = { commands: [ '[ -z "${DRONE_TAG}" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}', 'mkdir -p release/', - "cd cmd/drone-docker-buildx && xgo -ldflags \"-s -w -X main.version=$BUILD_VERSION\" -tags netgo -targets 'linux/amd64,linux/arm-6,linux/arm64' -out drone-docker-buildx .", + "cd cmd/drone-docker-buildx && xgo -ldflags \"-s -w -X main.version=$BUILD_VERSION\" -tags netgo -targets 'linux/amd64,linux/arm-6,linux/arm-7,linux/arm64' -out drone-docker-buildx .", 'mv /build/* /drone/src/release/', + 'ls -l /drone/src/release/' ], }, { diff --git a/docker/Dockerfile.amd64 b/docker/Dockerfile.amd64 index e7d60a8..59a0e46 100644 --- a/docker/Dockerfile.amd64 +++ b/docker/Dockerfile.amd64 @@ -11,11 +11,12 @@ ARG BUILDX_VERSION # renovate: datasource=github-releases depName=docker/buildx ENV BUILDX_VERSION="${BUILDX_VERSION:-v0.5.1}" + ENV DOCKER_HOST=unix:///var/run/docker.sock RUN apk --update add --virtual .build-deps curl && \ mkdir -p /usr/lib/docker/cli-plugins/ && \ - curl -SsL -o /usr/lib/docker/cli-plugins/docker-buildx "https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-amd64" && \ + curl -SsL -o /usr/lib/docker/cli-plugins/docker-buildx "https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION##v}/buildx-v${BUILDX_VERSION##v}.linux-amd64" && \ chmod 755 /usr/lib/docker/cli-plugins/docker-buildx && \ apk del .build-deps && \ rm -rf /var/cache/apk/* && \ diff --git a/docker/Dockerfile.arm b/docker/Dockerfile.arm index f45b2c4..78cc41b 100644 --- a/docker/Dockerfile.arm +++ b/docker/Dockerfile.arm @@ -11,11 +11,12 @@ ARG BUILDX_VERSION # renovate: datasource=github-releases depName=docker/buildx ENV BUILDX_VERSION="${BUILDX_VERSION:-v0.5.1}" + ENV DOCKER_HOST=unix:///var/run/docker.sock RUN apk --update add --virtual .build-deps curl && \ mkdir -p /usr/lib/docker/cli-plugins/ && \ - curl -SsL -o /usr/lib/docker/cli-plugins/docker-buildx "https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-arm-v7" && \ + curl -SsL -o /usr/lib/docker/cli-plugins/docker-buildx "https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION##v}/buildx-v${BUILDX_VERSION##v}.linux-arm-v7" && \ chmod 755 /usr/lib/docker/cli-plugins/docker-buildx && \ apk del .build-deps && \ rm -rf /var/cache/apk/* && \ diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 index 012e3f5..b5e3242 100644 --- a/docker/Dockerfile.arm64 +++ b/docker/Dockerfile.arm64 @@ -11,11 +11,12 @@ ARG BUILDX_VERSION # renovate: datasource=github-releases depName=docker/buildx ENV BUILDX_VERSION="${BUILDX_VERSION:-v0.5.1}" + ENV DOCKER_HOST=unix:///var/run/docker.sock RUN apk --update add --virtual .build-deps curl && \ mkdir -p /usr/lib/docker/cli-plugins/ && \ - curl -SsL -o /usr/lib/docker/cli-plugins/docker-buildx "https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-arm64" && \ + curl -SsL -o /usr/lib/docker/cli-plugins/docker-buildx "https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION##v}/buildx-v${BUILDX_VERSION##v}.linux-arm64" && \ chmod 755 /usr/lib/docker/cli-plugins/docker-buildx && \ apk del .build-deps && \ rm -rf /var/cache/apk/* && \