Skip to content
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
115 changes: 113 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ steps:
password:
from_secret: docker_password
repo: "rancher/harvester-eventrouter"
tag: ${DRONE_BRANCH}-head
tag: ${DRONE_BRANCH}-head-linux-amd64
username:
from_secret: docker_username
when:
Expand All @@ -43,7 +43,7 @@ steps:
password:
from_secret: docker_password
repo: "rancher/harvester-eventrouter"
tag: "${DRONE_TAG}"
tag: "${DRONE_TAG}-linux-amd64"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need build_args here?

username:
from_secret: docker_username
when:
Expand All @@ -57,3 +57,114 @@ volumes:
- name: docker
host:
path: /var/run/docker.sock

---
kind: pipeline
name: arm64

platform:
os: linux
arch: arm64

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

- name: docker-publish-master
image: plugins/docker
settings:
build_args:
- ARCH=amd64
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ARCH=amd64
- ARCH=arm64

Although it's not used in the dockerfile.

- VERSION=${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}-head
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/harvester-eventrouter"
tag: ${DRONE_BRANCH}-head-linux-arm64
username:
from_secret: docker_username
when:
ref:
include:
- refs/heads/master
- refs/heads/release/v*
event:
- push

- name: docker-publish
image: plugins/docker
settings:
dockerfile: package/Dockerfile
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need build_args here? for completeness

password:
from_secret: docker_password
repo: "rancher/harvester-eventrouter"
tag: "${DRONE_TAG}-linux-arm64"
username:
from_secret: docker_username
when:
ref:
- refs/tags/*
- refs/head/master
event:
- tag

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

---
kind: pipeline
name: manifest

steps:
- name: push-manifest-head
image: plugins/manifest
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
target: "rancher/harvester-eventrouter:${DRONE_BRANCH}-head"
template: "rancher/harvester-eventrouter:${DRONE_BRANCH}-head-OS-ARCH"
ignore_missing: true
platforms:
- linux/amd64
- linux/arm64
when:
ref:
include:
- refs/heads/master
- refs/heads/release/v*
event:
- push

- name: push-manifest-tag
image: plugins/manifest
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
target: "rancher/harvester-eventrouter:${DRONE_TAG}"
template: "rancher/harvester-eventrouter:${DRONE_TAG}-OS-ARCH"
ignore_missing: true
platforms:
- linux/amd64
- linux/arm64
when:
ref:
include:
- refs/head/master
- refs/tags/*
event:
- tag

depends_on:
- amd64
- arm64
4 changes: 1 addition & 3 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ RUN zypper -n rm container-suseconnect && \
zypper -n install git curl docker gzip tar wget awk

## install golangci
RUN if [ "${ARCH}" == "amd64" ]; then \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.52.0; \
fi
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.52.0

ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS
ENV DAPPER_SOURCE /go/src/github.com/heptiolabs/eventrouter/
Expand Down