[Enhancement] Improved Pipeline for Multiarch Images and SemVer Tags (#712)
* ci/drone: multiarch images for everything + auto_tagged semver manifests/images
This commit is contained in:
parent
2faeda2117
commit
aa6e902743
469
.drone.yml
469
.drone.yml
@ -103,58 +103,6 @@ steps:
|
|||||||
- "refs/tags/*test*"
|
- "refs/tags/*test*"
|
||||||
- "refs/tags/*dev*"
|
- "refs/tags/*dev*"
|
||||||
|
|
||||||
- name: docker_build_push_dind
|
|
||||||
image: plugins/docker
|
|
||||||
environment:
|
|
||||||
DOCKER_BUILDKIT: "1"
|
|
||||||
settings:
|
|
||||||
repo: rancher/k3d
|
|
||||||
tags:
|
|
||||||
- latest-dind
|
|
||||||
- "${DRONE_TAG}-dind"
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
target: dind
|
|
||||||
context: .
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
password:
|
|
||||||
from_secret: docker_password
|
|
||||||
build_args:
|
|
||||||
- GIT_TAG_OVERRIDE=${DRONE_TAG}
|
|
||||||
depends_on:
|
|
||||||
- lint
|
|
||||||
- test
|
|
||||||
- build
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
- name: docker_build_push_binary
|
|
||||||
environment:
|
|
||||||
DOCKER_BUILDKIT: "1"
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
repo: rancher/k3d
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
- "${DRONE_TAG}"
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
target: binary-only
|
|
||||||
context: .
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
password:
|
|
||||||
from_secret: docker_password
|
|
||||||
build_args:
|
|
||||||
- GIT_TAG_OVERRIDE=${DRONE_TAG}
|
|
||||||
depends_on:
|
|
||||||
- lint
|
|
||||||
- test
|
|
||||||
- build
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# Starting the docker service to be used by dind
|
# Starting the docker service to be used by dind
|
||||||
- name: docker
|
- name: docker
|
||||||
@ -215,61 +163,163 @@ trigger:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
---
|
---
|
||||||
#####################
|
###########################
|
||||||
##### k3d-proxy #####
|
###### Docker Images ######
|
||||||
#####################
|
###########################
|
||||||
|
#
|
||||||
|
# +++ Docker Images +++
|
||||||
|
# Tagged using the auto_tag feature of the docker plugin
|
||||||
|
# See http://plugins.drone.io/drone-plugins/drone-docker/#autotag
|
||||||
|
# > if event type is `tag`
|
||||||
|
# > > 1.0.0 produces docker tags 1, 1.0, 1.0.0
|
||||||
|
# > > 1.0.0-rc.1 produces docker tags 1.0.0-rc.1
|
||||||
|
# > if event type is `push` and target branch == default branch (main)
|
||||||
|
# > > tag `latest`
|
||||||
|
|
||||||
|
|
||||||
|
################################
|
||||||
|
##### Docker Images: amd64 #####
|
||||||
|
################################
|
||||||
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: proxy_linux_amd64
|
name: linux_amd64
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build_push
|
|
||||||
|
- name: build_push_binary
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: "1"
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: rancher/k3d
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-amd64
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: binary-only
|
||||||
|
context: .
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
build_args:
|
||||||
|
- GIT_TAG_OVERRIDE=${DRONE_TAG}
|
||||||
|
|
||||||
|
- name: build_push_dind
|
||||||
|
image: plugins/docker
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: "1"
|
||||||
|
settings:
|
||||||
|
repo: rancher/k3d
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-amd64
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: dind
|
||||||
|
context: .
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
build_args:
|
||||||
|
- GIT_TAG_OVERRIDE=${DRONE_TAG}
|
||||||
|
- ARCH=amd64
|
||||||
|
|
||||||
|
- name: build_push_proxy
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: rancher/k3d-proxy
|
repo: rancher/k3d-proxy
|
||||||
tags:
|
auto_tag: true
|
||||||
- latest-linux-amd64
|
auto_tag_suffix: linux-amd64
|
||||||
- "${DRONE_TAG}-linux-amd64"
|
|
||||||
dockerfile: proxy/Dockerfile
|
dockerfile: proxy/Dockerfile
|
||||||
context: proxy/
|
context: proxy/
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
when:
|
|
||||||
event:
|
- name: build_push_tools
|
||||||
- tag
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: rancher/k3d-tools
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-amd64
|
||||||
|
dockerfile: tools/Dockerfile
|
||||||
|
context: tools/
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag # see note at the start of the "Docker Images" section: creates SemVer tagged images using the `auto_tag` option of the docker plugin
|
||||||
|
- push # `auto_tag` option only creates the `latest` tag if target branch is default branch (i.e. `main`)
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
################################
|
||||||
|
##### Docker Images: arm #####
|
||||||
|
################################
|
||||||
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: proxy_linux_arm
|
name: linux_arm
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: arm
|
arch: arm
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build_push
|
- name: build_push_binary
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: "1"
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: rancher/k3d
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-arm
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: binary-only
|
||||||
|
context: .
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
build_args:
|
||||||
|
- GIT_TAG_OVERRIDE=${DRONE_TAG}
|
||||||
|
|
||||||
|
- name: build_push_dind
|
||||||
|
image: plugins/docker
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: "1"
|
||||||
|
settings:
|
||||||
|
repo: rancher/k3d
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-arm64
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: dind
|
||||||
|
context: .
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
build_args:
|
||||||
|
- GIT_TAG_OVERRIDE=${DRONE_TAG}
|
||||||
|
- ARCH=arm
|
||||||
|
|
||||||
|
- name: build_push_proxy
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: rancher/k3d-proxy
|
repo: rancher/k3d-proxy
|
||||||
tags:
|
auto_tag: true
|
||||||
- latest-linux-arm
|
auto_tag_suffix: linux-arm
|
||||||
- "${DRONE_TAG}-linux-arm"
|
|
||||||
dockerfile: proxy/Dockerfile
|
dockerfile: proxy/Dockerfile
|
||||||
context: proxy/
|
context: proxy/
|
||||||
username:
|
username:
|
||||||
@ -278,35 +328,87 @@ steps:
|
|||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
build_args:
|
build_args:
|
||||||
- ARCH=arm
|
- ARCH=arm
|
||||||
when:
|
|
||||||
event:
|
- name: build_push_tools
|
||||||
- tag
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: rancher/k3d-tools
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-arm
|
||||||
|
dockerfile: tools/Dockerfile
|
||||||
|
context: tools/
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag # see note at the start of the "Docker Images" section: creates SemVer tagged images using the `auto_tag` option of the docker plugin
|
||||||
|
- push # `auto_tag` option only creates the `latest` tag if target branch is default branch (i.e. `main`)
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
################################
|
||||||
|
##### Docker Images: arm64 #####
|
||||||
|
################################
|
||||||
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: proxy_linux_arm64
|
name: linux_arm64
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: arm64
|
arch: arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build_push
|
|
||||||
|
- name: build_push_binary
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: "1"
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: rancher/k3d
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-arm64
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: binary-only
|
||||||
|
context: .
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
build_args:
|
||||||
|
- GIT_TAG_OVERRIDE=${DRONE_TAG}
|
||||||
|
|
||||||
|
- name: build_push_dind
|
||||||
|
image: plugins/docker
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: "1"
|
||||||
|
settings:
|
||||||
|
repo: rancher/k3d
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-arm64
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: dind
|
||||||
|
context: .
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
build_args:
|
||||||
|
- GIT_TAG_OVERRIDE=${DRONE_TAG}
|
||||||
|
- ARCH=arm64
|
||||||
|
|
||||||
|
- name: build_push_proxy
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: rancher/k3d-proxy
|
repo: rancher/k3d-proxy
|
||||||
tags:
|
auto_tag: true
|
||||||
- latest-linux-arm64
|
auto_tag_suffix: linux-arm64
|
||||||
- "${DRONE_TAG}-linux-arm64"
|
|
||||||
dockerfile: proxy/Dockerfile
|
dockerfile: proxy/Dockerfile
|
||||||
context: proxy/
|
context: proxy/
|
||||||
username:
|
username:
|
||||||
@ -315,195 +417,94 @@ steps:
|
|||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
build_args:
|
build_args:
|
||||||
- ARCH=arm64
|
- ARCH=arm64
|
||||||
when:
|
|
||||||
event:
|
- name: build_push_tools
|
||||||
- tag
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: rancher/k3d-tools
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: linux-arm64
|
||||||
|
dockerfile: tools/Dockerfile
|
||||||
|
context: tools/
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag # see note at the start of the "Docker Images" section: creates SemVer tagged images using the `auto_tag` option of the docker plugin
|
||||||
|
- push # `auto_tag` option only creates the `latest` tag if target branch is default branch (i.e. `main`)
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
##############################
|
||||||
|
###### Docker Manifests ######
|
||||||
|
##############################
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: proxy_manifest
|
name: manifests
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: push_manifest
|
- name: push_manifest_binary
|
||||||
image: plugins/manifest
|
image: plugins/manifest
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
target: "rancher/k3d-proxy:${DRONE_TAG}"
|
spec: manifest.tmpl
|
||||||
template: "rancher/k3d-proxy:${DRONE_TAG}-OS-ARCH"
|
auto_tag: true
|
||||||
platforms:
|
ignore_missing: false
|
||||||
- linux/amd64
|
|
||||||
- linux/arm
|
|
||||||
- linux/arm64
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
trigger:
|
- name: push_manifest_dind
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- main
|
|
||||||
- proxy_linux_amd64
|
|
||||||
- proxy_linux_arm
|
|
||||||
- proxy_linux_arm64
|
|
||||||
|
|
||||||
---
|
|
||||||
#####################
|
|
||||||
##### k3d-tools #####
|
|
||||||
#####################
|
|
||||||
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: tools_linux_amd64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build_push
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
repo: rancher/k3d-tools
|
|
||||||
tags:
|
|
||||||
- latest-linux-amd64
|
|
||||||
- "${DRONE_TAG}-linux-amd64"
|
|
||||||
dockerfile: tools/Dockerfile
|
|
||||||
context: tools/
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
password:
|
|
||||||
from_secret: docker_password
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- main
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: tools_linux_arm
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: arm
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build_push
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
repo: rancher/k3d-tools
|
|
||||||
tags:
|
|
||||||
- latest-linux-arm
|
|
||||||
- "${DRONE_TAG}-linux-arm"
|
|
||||||
dockerfile: tools/Dockerfile
|
|
||||||
context: tools/
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
password:
|
|
||||||
from_secret: docker_password
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- main
|
|
||||||
---
|
|
||||||
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: tools_linux_arm64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: arm64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build_push
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
repo: rancher/k3d-tools
|
|
||||||
tags:
|
|
||||||
- latest-linux-arm64
|
|
||||||
- "${DRONE_TAG}-linux-arm64"
|
|
||||||
dockerfile: tools/Dockerfile
|
|
||||||
context: tools/
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
password:
|
|
||||||
from_secret: docker_password
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- main
|
|
||||||
---
|
|
||||||
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: tools_manifest
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: push_manifest
|
|
||||||
image: plugins/manifest
|
image: plugins/manifest
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
target: "rancher/k3d-tools:${DRONE_TAG}"
|
spec: dind-manifest.tmpl
|
||||||
template: "rancher/k3d-tools:${DRONE_TAG}-OS-ARCH"
|
auto_tag: true
|
||||||
platforms:
|
ignore_missing: false
|
||||||
- linux/amd64
|
|
||||||
- linux/arm
|
- name: push_manifest_proxy
|
||||||
- linux/arm64
|
image: plugins/manifest
|
||||||
when:
|
settings:
|
||||||
event:
|
username:
|
||||||
- tag
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
spec: proxy/manifest.tmpl
|
||||||
|
auto_tag: true
|
||||||
|
ignore_missing: false
|
||||||
|
|
||||||
|
- name: push_manifest_tools
|
||||||
|
image: plugins/manifest
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
spec: tools/manifest.tmpl
|
||||||
|
auto_tag: true
|
||||||
|
ignore_missing: false
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag # see note at the start of the "Docker Images" section: creates SemVer tagged images using the `auto_tag` option of the manifest plugin
|
||||||
|
- push # `auto_tag` option only creates the `latest` tag if target branch is default branch (i.e. `main`)
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- main
|
- main
|
||||||
- tools_linux_amd64
|
- linux_amd64
|
||||||
- tools_linux_arm
|
- linux_arm
|
||||||
- tools_linux_arm64
|
- linux_arm64
|
||||||
|
|
||||||
|
21
Dockerfile
21
Dockerfile
@ -5,12 +5,23 @@ COPY . .
|
|||||||
RUN make build -e GIT_TAG_OVERRIDE=${GIT_TAG_OVERRIDE} && bin/k3d version
|
RUN make build -e GIT_TAG_OVERRIDE=${GIT_TAG_OVERRIDE} && bin/k3d version
|
||||||
|
|
||||||
FROM docker:20.10-dind as dind
|
FROM docker:20.10-dind as dind
|
||||||
RUN apk update && apk add bash curl sudo jq git make netcat-openbsd
|
ARG OS=linux
|
||||||
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl && \
|
ARG ARCH=amd64
|
||||||
chmod +x ./kubectl && \
|
|
||||||
mv ./kubectl /usr/local/bin/kubectl
|
# install some basic packages needed for testing, etc.
|
||||||
|
RUN echo "building for ${OS}/${ARCH}" && \
|
||||||
|
apk update && \
|
||||||
|
apk add bash curl sudo jq git make netcat-openbsd
|
||||||
|
|
||||||
|
# install kubectl to interact with the k3d cluster
|
||||||
|
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/${OS}/${ARCH}/kubectl -o /usr/local/bin/kubectl && \
|
||||||
|
chmod +x /usr/local/bin/kubectl
|
||||||
|
|
||||||
|
# install yq (yaml processor) from source, as the busybox yq had some issues
|
||||||
|
RUN curl -L https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_${OS}_${ARCH} -o /usr/bin/yq &&\
|
||||||
|
chmod +x /usr/bin/yq
|
||||||
COPY --from=builder /app/bin/k3d /bin/k3d
|
COPY --from=builder /app/bin/k3d /bin/k3d
|
||||||
|
|
||||||
FROM scratch as binary-only
|
FROM scratch as binary-only
|
||||||
COPY --from=builder /app/bin/k3d /bin/k3d
|
COPY --from=builder /app/bin/k3d /bin/k3d
|
||||||
ENTRYPOINT ["/bin/k3d"]
|
ENTRYPOINT ["/bin/k3d"]
|
||||||
|
27
dind-manifest.tmpl
Normal file
27
dind-manifest.tmpl
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
image: rancher/k3d:{{#if build.tag}}{{build.tag}}{{else}}latest{{/if}}dind
|
||||||
|
{{#if build.tags}}
|
||||||
|
tags:
|
||||||
|
{{#each build.tags}}
|
||||||
|
- {{this}}
|
||||||
|
{{/each}}
|
||||||
|
{{/if}}
|
||||||
|
manifests:
|
||||||
|
- image: rancher/k3d:{{#if build.tag}}{{build.tag}}-{{/if}}dind-linux-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d:{{#if build.tag}}{{build.tag}}-{{/if}}dind-linux-arm64
|
||||||
|
platform:
|
||||||
|
variant: v8
|
||||||
|
architecture: arm64
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d:{{#if build.tag}}{{build.tag}}-{{/if}}dind-linux-arm
|
||||||
|
platform:
|
||||||
|
variant: v7
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d:{{#if build.tag}}{{build.tag}}-{{/if}}dind-linux-arm
|
||||||
|
platform:
|
||||||
|
variant: v6
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
27
manifest.tmpl
Normal file
27
manifest.tmpl
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
image: rancher/k3d:{{#if build.tag}}{{build.tag}}{{else}}latest{{/if}}
|
||||||
|
{{#if build.tags}}
|
||||||
|
tags:
|
||||||
|
{{#each build.tags}}
|
||||||
|
- {{this}}
|
||||||
|
{{/each}}
|
||||||
|
{{/if}}
|
||||||
|
manifests:
|
||||||
|
- image: rancher/k3d:{{#if build.tag}}{{build.tag}}-{{/if}}linux-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d:{{#if build.tag}}{{build.tag}}-{{/if}}linux-arm64
|
||||||
|
platform:
|
||||||
|
variant: v8
|
||||||
|
architecture: arm64
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d:{{#if build.tag}}{{build.tag}}-{{/if}}linux-arm
|
||||||
|
platform:
|
||||||
|
variant: v7
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d:{{#if build.tag}}{{build.tag}}-{{/if}}linux-arm
|
||||||
|
platform:
|
||||||
|
variant: v6
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
27
proxy/manifest.tmpl
Normal file
27
proxy/manifest.tmpl
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
image: rancher/k3d-proxy:{{#if build.tag}}{{build.tag}}{{else}}latest{{/if}}
|
||||||
|
{{#if build.tags}}
|
||||||
|
tags:
|
||||||
|
{{#each build.tags}}
|
||||||
|
- {{this}}
|
||||||
|
{{/each}}
|
||||||
|
{{/if}}
|
||||||
|
manifests:
|
||||||
|
- image: rancher/k3d-proxy:{{#if build.tag}}{{build.tag}}-{{/if}}linux-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d-proxy:{{#if build.tag}}{{build.tag}}-{{/if}}linux-arm64
|
||||||
|
platform:
|
||||||
|
variant: v8
|
||||||
|
architecture: arm64
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d-proxy:{{#if build.tag}}{{build.tag}}-{{/if}}linux-arm
|
||||||
|
platform:
|
||||||
|
variant: v7
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d-proxy:{{#if build.tag}}{{build.tag}}-{{/if}}linux-arm
|
||||||
|
platform:
|
||||||
|
variant: v6
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
27
tools/manifest.tmpl
Normal file
27
tools/manifest.tmpl
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
image: rancher/k3d-tools:{{#if build.tag}}{{build.tag}}{{else}}latest{{/if}}
|
||||||
|
{{#if build.tags}}
|
||||||
|
tags:
|
||||||
|
{{#each build.tags}}
|
||||||
|
- {{this}}
|
||||||
|
{{/each}}
|
||||||
|
{{/if}}
|
||||||
|
manifests:
|
||||||
|
- image: rancher/k3d-tools:{{#if build.tag}}{{build.tag}}-{{/if}}linux-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d-tools:{{#if build.tag}}{{build.tag}}-{{/if}}linux-arm64
|
||||||
|
platform:
|
||||||
|
variant: v8
|
||||||
|
architecture: arm64
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d-tools:{{#if build.tag}}{{build.tag}}-{{/if}}linux-arm
|
||||||
|
platform:
|
||||||
|
variant: v7
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
||||||
|
- image: rancher/k3d-tools:{{#if build.tag}}{{build.tag}}-{{/if}}linux-arm
|
||||||
|
platform:
|
||||||
|
variant: v6
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
Loading…
Reference in New Issue
Block a user