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

Update Drone CI to build and push webhook #28

Merged
merged 1 commit into from
Jan 24, 2024
Merged
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
122 changes: 122 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,46 @@ steps:
event:
- tag

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

- name: docker-publish-webhook
image: plugins/docker
settings:
dockerfile: package/Dockerfile.webhook
password:
from_secret: docker_password
repo: "rancher/harvester-node-manager-webhook"
tag: "${DRONE_TAG}-linux-amd64"
username:
from_secret: docker_username
when:
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

volumes:
- name: docker
host:
Expand Down Expand Up @@ -117,6 +157,46 @@ steps:
event:
- tag

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

volumes:
- name: docker
host:
Expand Down Expand Up @@ -169,6 +249,48 @@ steps:
event:
- tag

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

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

depends_on:
- amd64
- arm64