Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit 0f71b6a

Browse files
authored
Disable trace for docker login. (#285)
1 parent 81d810c commit 0f71b6a

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

tools/travis/build.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@ export OPENWHISK_HOME=$WHISKDIR
2828

2929
IMAGE_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
3843
cd $WHISKDIR

tools/travis/publish.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,16 @@ elif [ ${RUNTIME_VERSION} == "16" ]; then
2626
RUNTIME="nodejs20"
2727
fi
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

3340
if [[ ! -z ${RUNTIME} ]]; then
3441
TERM=dumb ./gradlew \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy