From 4c7b1fdcd0481474766771cbca11e23234a2e65a Mon Sep 17 00:00:00 2001 From: sdarwin Date: Tue, 28 Jun 2022 09:25:56 -0600 Subject: [PATCH] Add support for s390x architecture --- .drone.yml | 37 +++++++++++++++++++++++++++++++++++ docker/Dockerfile.linux.amd64 | 2 +- docker/Dockerfile.linux.s390x | 11 +++++++++++ docker/manifest.tmpl | 7 ++++++- 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 docker/Dockerfile.linux.s390x diff --git a/.drone.yml b/.drone.yml index 10262fd..5fd01d9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -99,6 +99,42 @@ steps: - push - tag +--- +kind: pipeline +type: docker +name: linux-s390x + +platform: + arch: amd64 + os: linux + +steps: +- name: build + image: golang:1.10 + commands: + - cd posix + - tar -xf fixtures.tar -C / + - go test -v + +- name: publish + image: thegeeklab/drone-docker-buildx + privileged: true + settings: + dockerfile: docker/Dockerfile.linux.s390x + repo: drone/git + platforms: + - linux/s390x + auto_tag: "true" + auto_tag_suffix: linux-s390x + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + event: + - push + - tag + --- kind: pipeline type: ssh @@ -221,6 +257,7 @@ depends_on: - linux-amd64 - linux-arm64 - linux-arm +- linux-s390x - windows-1909-amd64 - windows-1903-amd64 - windows-1809-amd64 diff --git a/docker/Dockerfile.linux.amd64 b/docker/Dockerfile.linux.amd64 index 76d96ad..604ca1d 100644 --- a/docker/Dockerfile.linux.amd64 +++ b/docker/Dockerfile.linux.amd64 @@ -8,4 +8,4 @@ ADD posix/* /usr/local/bin/ # USER drone:drone # RUN chmod -R 777 /home/drone -ENTRYPOINT ["/usr/local/bin/clone"] \ No newline at end of file +ENTRYPOINT ["/usr/local/bin/clone"] diff --git a/docker/Dockerfile.linux.s390x b/docker/Dockerfile.linux.s390x new file mode 100644 index 0000000..604ca1d --- /dev/null +++ b/docker/Dockerfile.linux.s390x @@ -0,0 +1,11 @@ +FROM alpine:3.12 +RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl aws-cli sudo + +ADD posix/* /usr/local/bin/ + +# RUN adduser -g Drone -s /bin/sh -D -u 1000 drone +# RUN echo 'drone ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/drone +# USER drone:drone +# RUN chmod -R 777 /home/drone + +ENTRYPOINT ["/usr/local/bin/clone"] diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl index 7a8ab73..776c4b3 100644 --- a/docker/manifest.tmpl +++ b/docker/manifest.tmpl @@ -17,6 +17,11 @@ manifests: variant: v8 architecture: arm64 os: linux + - + image: drone/git:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-s390x + platform: + architecture: s390x + os: linux - image: drone/git:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm platform: @@ -52,4 +57,4 @@ manifests: platform: architecture: amd64 os: windows - version: 1909 \ No newline at end of file + version: 1909