Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
9360911106 | |||
cc11c392ae | |||
1d357a43f4 | |||
b49c2f9236 | |||
5a2f9be429 | |||
![]() |
ca7005705e | ||
![]() |
51aa742593 | ||
![]() |
8379941aeb |
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.16.0
|
||||
FROM gcr.io/kaniko-project/executor:debug
|
||||
|
||||
ENV HOME /root
|
||||
ENV USER root
|
||||
|
10
plugin.sh
10
plugin.sh
@ -42,6 +42,14 @@ if [[ "${PLUGIN_CACHE:-}" == "true" ]]; then
|
||||
CACHE="--cache=true"
|
||||
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
|
||||
BUILD_ARGS=$(echo "${PLUGIN_BUILD_ARGS}" | tr ',' '\n' | while read build_arg; do echo "--build-arg=${build_arg}"; done)
|
||||
fi
|
||||
@ -94,6 +102,8 @@ fi
|
||||
${EXTRA_OPTS} \
|
||||
${DESTINATIONS} \
|
||||
${CACHE:-} \
|
||||
${CACHE_TTL:-} \
|
||||
${CACHE_REPO:-} \
|
||||
${TARGET:-} \
|
||||
${BUILD_ARGS:-} \
|
||||
${BUILD_ARGS_FROM_ENV:-}
|
||||
|
Loading…
x
Reference in New Issue
Block a user