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

enable ci for arm #67

Merged
merged 1 commit into from
Dec 20, 2023
Merged
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
190 changes: 132 additions & 58 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,67 +7,141 @@ platform:
arch: amd64

steps:
- name: fetch
image: alpine/git
commands:
- git fetch --tags
when:
instance:
- drone-publish.rancher.io
ref:
- refs/tags/*
event:
- tag
- name: fetch
image: alpine/git
commands:
- git fetch --tags
when:
instance:
- drone-publish.rancher.io
ref:
- refs/tags/*
event:
- tag

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

- name: docker-publish-master
image: plugins/docker
settings:
build_args:
- ARCH=amd64
- VERSION=${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}-head
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/harvester-node-disk-manager"
tag: ${DRONE_BRANCH}-head
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
password:
from_secret: docker_password
repo: "rancher/harvester-node-disk-manager"
tag: "${DRONE_TAG}"
username:
from_secret: docker_username
when:
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

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

---
kind: pipeline
name: arm64

- name: docker-publish-master
image: plugins/docker
settings:
build_args:
- ARCH=amd64
- VERSION=${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}-head
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/harvester-node-disk-manager"
tag: ${DRONE_BRANCH}-head
username:
from_secret: docker_username
when:
ref:
include:
- refs/heads/master
- refs/heads/release/v*
event:
- push
platform:
os: linux
arch: arm64

steps:
- name: fetch
image: alpine/git
commands:
- git fetch --tags
when:
instance:
- drone-publish.rancher.io
ref:
- refs/tags/*
event:
- tag

- name: docker-publish
image: plugins/docker
settings:
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/harvester-node-disk-manager"
tag: "${DRONE_TAG}"
username:
from_secret: docker_username
when:
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag
- name: build
image: rancher/dapper:v0.5.8
commands:
- dapper ci
volumes:
- name: docker
path: /var/run/docker.sock

- name: docker-publish-master
image: plugins/docker
settings:
build_args:
- ARCH=arm64
- VERSION=${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:8}-head
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/harvester-node-disk-manager"
tag: ${DRONE_BRANCH}-head
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
password:
from_secret: docker_password
repo: "rancher/harvester-node-disk-manager"
tag: "${DRONE_TAG}"
username:
from_secret: docker_username
when:
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

volumes:
- name: docker
host:
path: /var/run/docker.sock
- name: docker
host:
path: /var/run/docker.sock
10 changes: 4 additions & 6 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ 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

## install controller-gen
RUN if [ "${ARCH}" = "amd64" ]; then \
go install sigs.k8s.io/controller-tools/cmd/[email protected]; \
fi

RUN go install sigs.k8s.io/controller-tools/cmd/[email protected]


# install openapi-gen
RUN go install k8s.io/code-generator/cmd/[email protected]
Expand Down
Loading