Skip to content
This repository was archived by the owner on Sep 3, 2020. It is now read-only.

Commit 3da5de2

Browse files
cloudowskibonifaido
authored andcommitted
Allow skip-tls-verify option for testing
1 parent 4340afa commit 3da5de2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ steps:
1616
repo: registry.example.com/example-project
1717
tags: ${DRONE_COMMIT_SHA}
1818
cache: true
19+
skip_tls_verify: false # set to true for testing registries ONLY with self-signed certs
1920
build_args:
2021
- COMMIT_SHA=${DRONE_COMMIT_SHA}
2122
- COMMIT_AUTHOR_EMAIL=${DRONE_COMMIT_AUTHOR_EMAIL}

plugin.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@ fi
2828
DOCKERFILE=${PLUGIN_DOCKERFILE:-Dockerfile}
2929
CONTEXT=${PLUGIN_CONTEXT:-$PWD}
3030
LOG=${PLUGIN_LOG:-info}
31+
EXTRA_OPTS=""
3132

3233
if [[ -n "${PLUGIN_TARGET:-}" ]]; then
3334
TARGET="--target=${PLUGIN_TARGET}"
3435
fi
3536

37+
if [[ "${PLUGIN_SKIP_TLS_VERIFY:-}" == "true" ]]; then
38+
EXTRA_OPTS="--skip-tls-verify=true"
39+
fi
40+
3641
if [[ "${PLUGIN_CACHE:-}" == "true" ]]; then
3742
CACHE="--cache=true"
3843
fi
@@ -54,6 +59,7 @@ fi
5459
/kaniko/executor -v ${LOG} \
5560
--context=${CONTEXT} \
5661
--dockerfile=${DOCKERFILE} \
62+
${EXTRA_OPTS} \
5763
${DESTINATIONS} \
5864
${CACHE:-} \
5965
${TARGET:-} \

0 commit comments

Comments
 (0)