Skip to content

Commit faaeca6

Browse files
committed
Add support for RISC-V
Signed-off-by: Antony Chazapis <[email protected]>
1 parent 525ecd2 commit faaeca6

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

.drone.yml

+48
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,52 @@ volumes:
136136
host:
137137
path: /var/run/docker.sock
138138

139+
---
140+
kind: pipeline
141+
name: riscv64
142+
type: docker
143+
144+
platform:
145+
os: linux
146+
arch: amd64
147+
148+
steps:
149+
- name: build
150+
image: docker:25.0-git
151+
environment:
152+
ARCH: "riscv64"
153+
commands:
154+
- apk add make
155+
- git config --global --add safe.directory /drone/src
156+
- make
157+
volumes:
158+
- name: docker
159+
path: /var/run/docker.sock
160+
161+
- name: docker-publish
162+
image: plugins/docker
163+
settings:
164+
dockerfile: Dockerfile
165+
password:
166+
from_secret: docker_password
167+
repo: "rancher/klipper-lb"
168+
tag: "${DRONE_TAG}-riscv64"
169+
username:
170+
from_secret: docker_username
171+
when:
172+
instance:
173+
- drone-publish.k3s.io
174+
ref:
175+
- refs/head/master
176+
- refs/tags/*
177+
event:
178+
- tag
179+
180+
volumes:
181+
- name: docker
182+
host:
183+
path: /var/run/docker.sock
184+
139185
---
140186
kind: pipeline
141187
name: manifest
@@ -157,6 +203,7 @@ steps:
157203
- linux/amd64
158204
- linux/arm64
159205
- linux/arm
206+
- linux/riscv64
160207
target: "rancher/klipper-lb:${DRONE_TAG}"
161208
template: "rancher/klipper-lb:${DRONE_TAG}-ARCH"
162209
when:
@@ -172,3 +219,4 @@ depends_on:
172219
- amd64
173220
- arm64
174221
- arm
222+
- riscv64

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
DOCKER_ARGS=
2+
ifeq ($(ARCH),riscv64)
3+
export DOCKER_BUILDKIT = 1
4+
DOCKER_ARGS=--platform=linux/riscv64
5+
endif
6+
17
.DEFAULT_GOAL := ci
28
.PHONY: ci
39
ci:
4-
@. ./scripts/version; docker build --build-arg BUILDDATE=$(date +%Y%m%d) -f Dockerfile -t $${IMAGE} .
10+
@. ./scripts/version; docker build ${DOCKER_ARGS} --build-arg BUILDDATE=$(date +%Y%m%d) -f Dockerfile -t $${IMAGE} .
511
@. ./scripts/version; echo Built $${IMAGE}

0 commit comments

Comments
 (0)