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 +21
-8
lines changed Expand file tree Collapse file tree 2 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,16 @@ IMAGE_PREFIX="testing"
1010
1111export OPENWHISK_HOME=$WHISKDIR
1212
13- # Login to hub.docker.com to get user specific pull rate.
14- if [ ! -z " ${DOCKER_USER} " ] && [ ! -z " ${DOCKER_PASSWORD} " ]; then
15- echo " Run docker login..."
16- echo ${DOCKER_PASSWORD} | docker login -u " ${DOCKER_USER} " --password-stdin
17- fi
13+ # run login in a subshell with disabled trace to avoid having credentials in the logs
14+ # when trace is on (set -x)
15+ (
16+ set +x # disable trace in this subshell
17+ # Login to hub.docker.com to get user specific pull rate.
18+ if [ ! -z " ${DOCKER_USER} " ] && [ ! -z " ${DOCKER_PASSWORD} " ]; then
19+ echo " Run docker login..."
20+ echo ${DOCKER_PASSWORD} | docker login -u " ${DOCKER_USER} " --password-stdin
21+ fi
22+ )
1823
1924# Build OpenWhisk
2025cd $WHISKDIR
Original file line number Diff line number Diff line change @@ -24,9 +24,17 @@ elif [ ${RUNTIME_VERSION} == "3.11" ]; then
2424 RUNTIME=" python3.11"
2525fi
2626
27- if [[ ! -z ${DOCKER_USER} ]] && [[ ! -z ${DOCKER_PASSWORD} ]]; then
28- docker login -u " ${DOCKER_USER} " -p " ${DOCKER_PASSWORD} "
29- fi
27+ # run login in a subshell with disabled trace to avoid having credentials in the logs
28+ # when trace is on (set -x)
29+ (
30+ set +x # disable trace in this subshell
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
36+ )
37+
3038
3139if [[ ! -z ${RUNTIME} ]]; then
3240TERM=dumb ./gradlew \
You can’t perform that action at this time.
0 commit comments