diff options
author | Anaël Closson <ac2550@intl.att.com> | 2017-02-15 16:31:01 +0100 |
---|---|---|
committer | Anaël Closson <ac2550@intl.att.com> | 2017-02-15 19:21:49 +0000 |
commit | 31bbccab06a05b6ca533004d24c3cf4da67cea8c (patch) | |
tree | d97afb0ab39fadda8d672d2f440d8d36e987f164 | |
parent | 34a12ba9b3eb93653ab919d6fc3577a2873f7777 (diff) |
Adding debugging information
Change-Id: I4397c05aba9ecfd55d655f4cac47d415bb25c8e7
Signed-off-by: Anaël Closson <ac2550@intl.att.com>
-rw-r--r-- | jjb/include-docker-login.sh | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/jjb/include-docker-login.sh b/jjb/include-docker-login.sh index 89b25163a..3b677b46d 100644 --- a/jjb/include-docker-login.sh +++ b/jjb/include-docker-login.sh @@ -6,7 +6,21 @@ DOCKER_REPOSITORIES="nexus3.openecomp.org:10001 \ for DOCKER_REPOSITORY in $DOCKER_REPOSITORIES; do - USER=$(xpath -q -e "//servers/server[id='$DOCKER_REPOSITORY']/username/text()" "$SETTINGS_FILE") - PASS=$(xpath -q -e "//servers/server[id='$DOCKER_REPOSITORY']/password/text()" "$SETTINGS_FILE") - docker login $DOCKER_REPOSITORY -u $USER -p $PASS + echo $DOCKER_REPOSITORY + USER=$(xpath -e "//servers/server[id='$DOCKER_REPOSITORY']/username/text()" "$SETTINGS_FILE") + PASS=$(xpath -e "//servers/server[id='$DOCKER_REPOSITORY']/password/text()" "$SETTINGS_FILE") + + if [ -z "$USER" ]; + then + echo "Error: no user provided" + fi + + if [ -z "$PASS" ]; + then + echo "Error: no password provided" + fi + + [ -z "$PASS" ] && PASS_PROVIDED="<empty>" || PASS_PROVIDED="<password>" + echo docker login $DOCKER_REPOSITORY -u "$USER" -p "$PASS_PROVIDED" + docker login $DOCKER_REPOSITORY -u "$USER" -p "$PASS" done |