allow registry to be set
This commit is contained in:
parent
b8589dbbb8
commit
554ce3534a
10
plugin.sh
10
plugin.sh
@ -4,17 +4,21 @@ set -euo pipefail
|
|||||||
|
|
||||||
export PATH=$PATH:/kaniko/
|
export PATH=$PATH:/kaniko/
|
||||||
|
|
||||||
DOCKER_AUTH=`echo -n "${DOCKER_USERNAME}:${DOCKER_PASSWORD}" | base64`
|
if [[ -n "${PLUGIN_USERNAME}" ]]; then
|
||||||
|
DOCKER_AUTH=`echo -n "${PLUGIN_USERNAME}:${PLUGIN_PASSWORD}" | base64`
|
||||||
|
|
||||||
cat > /kaniko/.docker/config.json <<DOCKERJSON
|
REGISTRY=${PLUGIN_REGISTRY:-https://index.docker.io/v1/}
|
||||||
|
|
||||||
|
cat > /kaniko/.docker/config.json <<DOCKERJSON
|
||||||
{
|
{
|
||||||
"auths": {
|
"auths": {
|
||||||
"https://index.docker.io/v1/": {
|
"${REGISTRY}": {
|
||||||
"auth": "${DOCKER_AUTH}"
|
"auth": "${DOCKER_AUTH}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DOCKERJSON
|
DOCKERJSON
|
||||||
|
fi
|
||||||
|
|
||||||
DOCKERFILE=${PLUGIN_DOCKERFILE:-Dockerfile}
|
DOCKERFILE=${PLUGIN_DOCKERFILE:-Dockerfile}
|
||||||
DESTINATION=${PLUGIN_REPO}:${PLUGIN_TAGS:-latest}
|
DESTINATION=${PLUGIN_REPO}:${PLUGIN_TAGS:-latest}
|
||||||
|
Reference in New Issue
Block a user