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 #56

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

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

platform:
os: linux
arch: amd64

steps:
- name: build
image: docker:25.0-git
environment:
ARCH: "riscv64"
commands:
- apk add make
- git config --global --add safe.directory /drone/src
- make
volumes:
- name: docker
path: /var/run/docker.sock

- name: docker-publish
image: plugins/docker
settings:
dockerfile: Dockerfile
password:
from_secret: docker_password
repo: "rancher/klipper-lb"
tag: "${DRONE_TAG}-riscv64"
username:
from_secret: docker_username
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 @@ -157,6 +203,7 @@ steps:
- linux/amd64
- linux/arm64
- linux/arm
- linux/riscv64
target: "rancher/klipper-lb:${DRONE_TAG}"
template: "rancher/klipper-lb:${DRONE_TAG}-ARCH"
when:
Expand All @@ -172,3 +219,4 @@ depends_on:
- amd64
- arm64
- arm
- riscv64
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
DOCKER_ARGS=
ifeq ($(ARCH),riscv64)
export DOCKER_BUILDKIT = 1
DOCKER_ARGS=--platform=linux/riscv64
endif

.DEFAULT_GOAL := ci
.PHONY: ci
ci:
@. ./scripts/version; docker build --build-arg BUILDDATE=$(date +%Y%m%d) -f Dockerfile -t $${IMAGE} .
@. ./scripts/version; docker build ${DOCKER_ARGS} --build-arg BUILDDATE=$(date +%Y%m%d) -f Dockerfile -t $${IMAGE} .
@. ./scripts/version; echo Built $${IMAGE}