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 RISC-V #64

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
46 changes: 46 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,50 @@ volumes:
host:
path: /var/run/docker.sock

---
kind: pipeline
name: riscv64
type: docker

platform:
os: linux
arch: amd64

steps:
- name: build
image: rancher/dapper:v0.5.0
commands:
- dapper ci
volumes:
- name: docker
path: /var/run/docker.sock

- name: docker-publish
image: plugins/docker
settings:
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/klipper-helm"
tag: "${DRONE_TAG}-riscv64"
username:
from_secret: docker_username
build_args:
- ARCH=riscv64
when:
instance:
- drone-publish.k3s.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

volumes:
- name: docker
host:
path: /var/run/docker.sock

---
kind: pipeline
name: manifest
Expand All @@ -151,6 +195,7 @@ steps:
- linux/amd64
- linux/arm64
- linux/arm
- linux/riscv64
target: "rancher/klipper-helm:${DRONE_TAG}"
template: "rancher/klipper-helm:${DRONE_TAG}-ARCH"
when:
Expand All @@ -166,6 +211,7 @@ depends_on:
- amd64
- arm64
- arm
- riscv64

...

2 changes: 1 addition & 1 deletion Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH

RUN apk -U add bash docker-cli docker-cli-buildx git
ENV DAPPER_ENV REPO TAG DRONE_TAG
ENV DAPPER_ENV REPO TAG DRONE_TAG ARCH
ENV DAPPER_SOURCE /go/src/github.com/k3s-io/klipper-helm/
ENV DAPPER_OUTPUT ./bin ./dist
ENV DAPPER_DOCKER_SOCKET true
Expand Down
2 changes: 1 addition & 1 deletion package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN curl -sL https://get.helm.sh/helm-v3.16.1-linux-${ARCH}.tar.gz | tar xvzf -
COPY entry /usr/bin/

FROM golang:1.23-alpine3.20 as plugins
RUN apk add -U curl ca-certificates build-base binutils-gold
RUN apk add -U curl ca-certificates build-base
ARG ARCH
COPY --from=extract /usr/bin/helm /usr/bin/helm
RUN mkdir -p /go/src/github.com/k3s-io/helm-set-status && \
Expand Down
6 changes: 5 additions & 1 deletion scripts/package
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ if [ -e ${DOCKERFILE}.${ARCH} ]; then
DOCKERFILE=${DOCKERFILE}.${ARCH}
fi

docker build --build-arg ARCH=${ARCH} --build-arg BUILDDATE=$(date +%Y%m%d) -f ${DOCKERFILE} -t ${IMAGE} .
if [ "$ARCH" = "riscv64" ]; then
export DOCKER_BUILDKIT=1
DOCKER_ARGS="--platform=$ARCH"
fi
docker build ${DOCKER_ARGS} --build-arg ARCH=${ARCH} --build-arg BUILDDATE=$(date +%Y%m%d) -f ${DOCKERFILE} -t ${IMAGE} .
echo Built ${IMAGE}