summaryrefslogtreecommitdiffstats
path: root/jjb/include-docker-login.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/include-docker-login.sh')
-rw-r--r--jjb/include-docker-login.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/jjb/include-docker-login.sh b/jjb/include-docker-login.sh
new file mode 100644
index 000000000..f583f73f2
--- /dev/null
+++ b/jjb/include-docker-login.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+DOCKER_REPOSITORIES=nexus3.openecomp.org:10001 \
+ nexus3.openecomp.org:10002 \
+ nexus3.openecomp.org:10003
+
+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
+done