cicd: build and push binary-only and dind images containing k3d

pull/383/head v3.1.5
iwilltry42 4 years ago
parent cdd672a523
commit 27a133a8c3
No known key found for this signature in database
GPG Key ID: 7BA57AD1CFF16110
  1. 44
      .drone.yml
  2. 4
      Dockerfile

@ -101,6 +101,50 @@ steps:
- "refs/tags/*beta*"
- "refs/tags/*alpha*"
- name: docker_build_push_dind
image: plugins/docker
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
depends_on:
- lint
- test
- build
when:
event:
- tag
- name: docker_build_push_binary
image: plugins/docker
settings:
repo: rancher/k3d
tags:
- latest
- "${DRONE_TAG}"
dockerfile: Dockerfile
target: dind
context: .
username:
from_secret: docker_username
password:
from_secret: docker_password
depends_on:
- lint
- test
- build
when:
event:
- tag
services:
# Starting the docker service to be used by dind
- name: docker

@ -9,3 +9,7 @@ RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl
COPY --from=builder /app/bin/k3d /bin/k3d
FROM scratch as binary-only
COPY --from=builder /app/bin/k3d /bin/k3d
ENTRYPOINT ["/bin/k3d"]
Loading…
Cancel
Save