#4 - Add logging of environment variables and build actions
This change introduces logging of key environment variables used during the build process, with sensitive values partially masked for security. It also provides clear messaging on whether the build includes a push to the registry, improving transparency and debugging capabilities.
This commit is contained in:
parent
59791e36bb
commit
47dac6b4ef
1 changed files with 22 additions and 0 deletions
22
build.sh
22
build.sh
|
@ -69,6 +69,28 @@ fi
|
|||
|
||||
echo "Kaniko will be called with:${DEST_FLAGS}"
|
||||
|
||||
###############################################################################
|
||||
# resume what will be done
|
||||
###############################################################################
|
||||
echo "Environment Variables:"
|
||||
echo "KANIKO_CONTEXT=${KANIKO_CONTEXT}"
|
||||
echo "GITHUB_REF_NAME=${GITHUB_REF_NAME}"
|
||||
echo "GIT_USERNAME=${GIT_USERNAME}"
|
||||
echo "GIT_PASSWORD=$(echo "${GIT_PASSWORD}" | sed 's/\(^..\).*\(..$\)/\1...\2/')"
|
||||
echo "REGISTRY_HOST=${REGISTRY_HOST}"
|
||||
echo "REGISTRY_USER=${REGISTRY_USER}"
|
||||
[ -n "${REGISTRY_PASS}" ] && echo "REGISTRY_PASS=$(echo "${REGISTRY_PASS}" | sed 's/\(^..\).*\(..$\)/\1...\2/')"
|
||||
echo "KANIKO_DESTINATION=${KANIKO_DESTINATION}"
|
||||
echo "KANIKO_VERBOSITY=${KANIKO_VERBOSITY}"
|
||||
echo "KANIKO_DOCKERFILE=${KANIKO_DOCKERFILE}"
|
||||
echo ""
|
||||
if [ "${DEST_FLAGS}" = "--no-push" ]; then
|
||||
echo "Action: Build only (no push)"
|
||||
else
|
||||
echo "Action: Build and push"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
###############################################################################
|
||||
# Invoke Kaniko
|
||||
###############################################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue