Skip to content

Commit e809fd1

Browse files
committed
Simplified.
1 parent abc6fc1 commit e809fd1

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

kaniko.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
#!/bin/bash
22
# This script calls kaniko (in docker) for the current directory. You can put it in your path
33
# It's actually calling the scripts/script.sh in ghcr.io/npo-poms/kaniko
4+
DOCKER_CONFIG=${DOCKER_CONFIG:-config-gitlab.json}
5+
DOCKER_AUTH_CONFIG=${DOCKER_AUTH_CONFIG:-/root/.docker/${DOCKER_CONFIG}}
46

57
$(dirname "${BASH_SOURCE[0]}")/local-setup.sh
68
cat job.env
79

8-
#KANIKO_IMAGE=npo-poms/kaniko
9-
KANIKO_IMAGE=ghcr.io/npo-poms/kaniko:5
10+
KANIKO_IMAGE=npo-poms/kaniko
11+
#KANIKO_IMAGE=ghcr.io/npo-poms/kaniko:5
1012

1113
docker run -v ~/conf:/root/conf -v ~/.docker:/root/.docker -v "$(pwd)":/workspace \
1214
-e PROJECT_VERSION="$PROJECT_VERSION" \
1315
-e IMAGE_TAG=${IMAGE_TAG} \
1416
-e NAMESPACE=${NAMESPACE} \
1517
-e REGISTRY="${REGISTRY}" \
16-
-e DOCKER_AUTH_CONFIG="/root/.docker/config-gitlab.json" \
18+
-e DOCKER_AUTH_CONFIG="${DOCKER_AUTH_CONFIG} \
1719
-e CI_COMMIT_REF_NAME="${CI_COMMIT_REF_NAME}" \
1820
-e CI_COMMIT_SHA="$(git show --format="%H" --no-patch)" \
1921
-e CI_COMMIT_TIMESTAMP="$(git show --format="%aI" --no-patch)" \

scripts/script.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ fi
2727
fun=$1
2828
if [ "$fun" = "help" ] ;then
2929
echo usage
30-
echo $0 Default 'package_all_docker' to deploy all found docker deployables
30+
echo $0 Default 'run_kaniko_all' to deploy all found docker deployables
3131
echo or if OS_APPLICATIONS is defined in all the subdirectories it
3232
exit
3333
fi
3434
if [ -z "$fun" ] ; then
35-
fun="package_all_docker"
35+
fun="run_kaniko_all"
3636
fi
37+
echo "Calling $fun"
3738
$fun .

0 commit comments

Comments
 (0)