Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for s390x architecture - method 2 #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,38 @@ steps:
- push
- tag

---
kind: pipeline
type: vm
name: linux-s390x

pool:
use: ubuntu-20.04

steps:
- name: publish
commands:
- apt-get update
- apt-get install -y jq
- mkdir -p ~/.docker/cli-plugins
- export BUILDX_URL=$(curl https://api.github.com/repos/docker/buildx/releases/latest | jq -r '.assets[].browser_download_url' | grep linux-amd64)
- wget $BUILDX_URL -O ~/.docker/cli-plugins/docker-buildx
- chmod +x ~/.docker/cli-plugins/docker-buildx
- ls -al ~/.docker/cli-plugins/
- apt-get install -y binfmt-support qemu-user-static
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker login -u $USERNAME -p $PASSWORD
- docker buildx build --rm=true -f docker/Dockerfile.linux.s390x . --push --pull=true --platform linux/s390x -t drone/git:linux-s390x
environment:
PASSWORD:
from_secret: docker_password
USERNAME:
from_secret: docker_username
when:
event:
- push
- tag

---
kind: pipeline
type: ssh
Expand Down Expand Up @@ -221,6 +253,7 @@ depends_on:
- linux-amd64
- linux-arm64
- linux-arm
- linux-s390x
- windows-1909-amd64
- windows-1903-amd64
- windows-1809-amd64
2 changes: 1 addition & 1 deletion docker/Dockerfile.linux.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ ADD posix/* /usr/local/bin/
# USER drone:drone
# RUN chmod -R 777 /home/drone

ENTRYPOINT ["/usr/local/bin/clone"]
ENTRYPOINT ["/usr/local/bin/clone"]
11 changes: 11 additions & 0 deletions docker/Dockerfile.linux.s390x
Original file line number Diff line number Diff line change
@@ -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"]
7 changes: 6 additions & 1 deletion docker/manifest.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -52,4 +57,4 @@ manifests:
platform:
architecture: amd64
os: windows
version: 1909
version: 1909