Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
9360911106 | |||
cc11c392ae | |||
1d357a43f4 | |||
b49c2f9236 | |||
5a2f9be429 | |||
![]() |
ca7005705e |
30
.drone.yml
Normal file
30
.drone.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
steps:
|
||||||
|
- name: build-image
|
||||||
|
image: docker:dind
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
environment:
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: DOCKER_USERNAME
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: DOCKER_PASSWORD
|
||||||
|
commands:
|
||||||
|
- sleep 10
|
||||||
|
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin registry.kmlabz.com
|
||||||
|
- docker build -t registry.kmlabz.com/tormakris/drone-kaniko .
|
||||||
|
- docker push registry.kmlabz.com/tormakris/drone-kaniko
|
||||||
|
|
||||||
|
services:
|
||||||
|
- name: docker
|
||||||
|
image: docker:dind
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
temp: {}
|
@ -1,4 +1,4 @@
|
|||||||
FROM gcr.io/kaniko-project/executor:debug-v0.19.0
|
FROM gcr.io/kaniko-project/executor:debug
|
||||||
|
|
||||||
ENV HOME /root
|
ENV HOME /root
|
||||||
ENV USER root
|
ENV USER root
|
||||||
|
10
plugin.sh
10
plugin.sh
@ -42,6 +42,14 @@ if [[ "${PLUGIN_CACHE:-}" == "true" ]]; then
|
|||||||
CACHE="--cache=true"
|
CACHE="--cache=true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "${PLUGIN_CACHE_REPO:-}" ]; then
|
||||||
|
CACHE_REPO="--cache-repo=${REGISTRY}/${PLUGIN_CACHE_REPO}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${PLUGIN_CACHE_TTL:-}" ]; then
|
||||||
|
CACHE_TTL="--cache-ttl=${PLUGIN_CACHE_TTL}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "${PLUGIN_BUILD_ARGS:-}" ]; then
|
if [ -n "${PLUGIN_BUILD_ARGS:-}" ]; then
|
||||||
BUILD_ARGS=$(echo "${PLUGIN_BUILD_ARGS}" | tr ',' '\n' | while read build_arg; do echo "--build-arg=${build_arg}"; done)
|
BUILD_ARGS=$(echo "${PLUGIN_BUILD_ARGS}" | tr ',' '\n' | while read build_arg; do echo "--build-arg=${build_arg}"; done)
|
||||||
fi
|
fi
|
||||||
@ -94,6 +102,8 @@ fi
|
|||||||
${EXTRA_OPTS} \
|
${EXTRA_OPTS} \
|
||||||
${DESTINATIONS} \
|
${DESTINATIONS} \
|
||||||
${CACHE:-} \
|
${CACHE:-} \
|
||||||
|
${CACHE_TTL:-} \
|
||||||
|
${CACHE_REPO:-} \
|
||||||
${TARGET:-} \
|
${TARGET:-} \
|
||||||
${BUILD_ARGS:-} \
|
${BUILD_ARGS:-} \
|
||||||
${BUILD_ARGS_FROM_ENV:-}
|
${BUILD_ARGS_FROM_ENV:-}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user