Compare commits

..

7 Commits

Author SHA1 Message Date
9360911106 add arg to docker build
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-09 16:01:44 +02:00
cc11c392ae use dind
Some checks failed
continuous-integration/drone/push Build is failing
2021-07-09 16:00:30 +02:00
1d357a43f4 update repo name
Some checks failed
continuous-integration/drone/push Build is failing
2021-07-09 15:49:06 +02:00
b49c2f9236 add drone config
Some checks failed
continuous-integration/drone/push Build is failing
2021-07-09 15:41:07 +02:00
5a2f9be429
update kaniko version 2021-07-09 15:33:47 +02:00
foosinn
ca7005705e
configurable cache repository and ttl (#36) 2020-05-25 10:39:26 +02:00
Nándor István Krácser
51aa742593 upgrade to v0.19.0 2020-03-20 08:21:22 +01:00
3 changed files with 41 additions and 1 deletions

30
.drone.yml Normal file
View 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: {}

View File

@ -1,4 +1,4 @@
FROM gcr.io/kaniko-project/executor:debug-v0.18.0 FROM gcr.io/kaniko-project/executor:debug
ENV HOME /root ENV HOME /root
ENV USER root ENV USER root

View File

@ -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:-}