From a3bc47fcc7e53a7b97bd9a2cd71e459468524654 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 16 Mar 2021 10:31:46 -0500 Subject: [PATCH] Support ppc64le --- .drone.yml | 17 +++++++++++++++++ docker/Dockerfile.linux.ppc64le | 22 ++++++++++++++++++++++ docker/manifest.tmpl | 5 +++++ scripts/build.sh | 1 + 4 files changed, 45 insertions(+) create mode 100644 docker/Dockerfile.linux.ppc64le diff --git a/.drone.yml b/.drone.yml index 99c4b5d..c81c38d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -78,6 +78,23 @@ steps: - refs/heads/master - refs/tags/* +- name: publish_ppc64le + image: plugins/docker + pull: if-not-exists + settings: + repo: drone/drone-runner-docker + auto_tag: true + auto_tag_suffix: linux-ppc64le + dockerfile: docker/Dockerfile.linux.ppc64le + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + ref: + - refs/heads/master + - refs/tags/* + volumes: - name: go temp: {} diff --git a/docker/Dockerfile.linux.ppc64le b/docker/Dockerfile.linux.ppc64le new file mode 100644 index 0000000..52f515a --- /dev/null +++ b/docker/Dockerfile.linux.ppc64le @@ -0,0 +1,22 @@ +FROM alpine:3 as alpine +RUN apk add -U --no-cache ca-certificates + +RUN wget https://github.com/isuruf/tmate/releases/download/2.4.0/tmate-2.4.0-static-linux-ppc64le.tar.xz +RUN tar -xf tmate-2.4.0-static-linux-ppc64le.tar.xz +RUN mv tmate-2.4.0-static-linux-ppc64le/tmate /bin/ +RUN chmod +x /bin/tmate + +FROM scratch +EXPOSE 3000 + +ENV GODEBUG netdns=go +ENV DRONE_PLATFORM_OS linux +ENV DRONE_PLATFORM_ARCH ppc64le + +COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=alpine /bin/tmate /bin/ + +LABEL com.centurylinklabs.watchtower.stop-signal="SIGINT" + +ADD release/linux/ppc64le/drone-runner-docker /bin/ +ENTRYPOINT ["/bin/drone-runner-docker"] diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl index 552a217..2cd48bd 100644 --- a/docker/manifest.tmpl +++ b/docker/manifest.tmpl @@ -29,6 +29,11 @@ manifests: variant: v6 architecture: arm os: linux + - + image: drone/drone-runner-docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-ppc64le + platform: + architecture: ppc64le + os: linux - image: drone/drone-runner-docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64 platform: diff --git a/scripts/build.sh b/scripts/build.sh index c5d08eb..70b6064 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -13,6 +13,7 @@ set -x GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-runner-docker GOOS=linux GOARCH=arm64 go build -o release/linux/arm64/drone-runner-docker GOOS=linux GOARCH=arm go build -o release/linux/arm/drone-runner-docker +GOOS=linux GOARCH=ppc64le go build -o release/linux/ppc64le/drone-runner-docker # windows GOOS=windows go build -o release/windows/amd64/drone-runner-docker.exe