This repository was archived by the owner on Jan 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +20
-8
lines changed Expand file tree Collapse file tree 2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,16 @@ export OPENWHISK_HOME=$WHISKDIR
2828
2929IMAGE_PREFIX=" testing"
3030
31- # Login to hub.docker.com to get user specific pull rate.
32- if [ ! -z " ${DOCKER_USER} " ] && [ ! -z " ${DOCKER_PASSWORD} " ]; then
33- echo " Run docker login..."
34- echo ${DOCKER_PASSWORD} | docker login -u " ${DOCKER_USER} " --password-stdin
35- fi
31+ # run login in a subshell with disabled trace to avoid having credentials in the logs
32+ # when trace is on (set -x)
33+ (
34+ set +x # disable trace in this subshell
35+ # Login to hub.docker.com to get user specific pull rate.
36+ if [ ! -z " ${DOCKER_USER} " ] && [ ! -z " ${DOCKER_PASSWORD} " ]; then
37+ echo " Run docker login..."
38+ echo ${DOCKER_PASSWORD} | docker login -u " ${DOCKER_USER} " --password-stdin
39+ fi
40+ )
3641
3742# Build OpenWhisk
3843cd $WHISKDIR
Original file line number Diff line number Diff line change @@ -26,9 +26,16 @@ elif [ ${RUNTIME_VERSION} == "16" ]; then
2626 RUNTIME=" nodejs20"
2727fi
2828
29- if [[ ! -z ${DOCKER_USER} ]] && [[ ! -z ${DOCKER_PASSWORD} ]]; then
30- docker login -u " ${DOCKER_USER} " -p " ${DOCKER_PASSWORD} "
31- fi
29+ # run login in a subshell with disabled trace to avoid having credentials in the logs
30+ # when trace is on (set -x)
31+ (
32+ set +x # disable trace in this subshell
33+ # Login to hub.docker.com to get user specific pull rate.
34+ if [ ! -z " ${DOCKER_USER} " ] && [ ! -z " ${DOCKER_PASSWORD} " ]; then
35+ echo " Run docker login..."
36+ echo ${DOCKER_PASSWORD} | docker login -u " ${DOCKER_USER} " --password-stdin
37+ fi
38+ )
3239
3340if [[ ! -z ${RUNTIME} ]]; then
3441TERM=dumb ./gradlew \
You can’t perform that action at this time.
0 commit comments