File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,19 @@ function checkJavaVersion {
5050 exit 1
5151 fi
5252}
53+ function dockerLogin {
54+ echo " Info: about to do docker login"
55+ if [ ! -z ${DOCKER_USERNAME+x} ] && [ ! -z ${DOCKER_PASSWORD+x} ]; then
56+ out=$( echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin)
57+ res=$?
58+ if [ $res -ne 0 ]; then
59+ echo ' docker login failed'
60+ exit 1
61+ fi
62+ else
63+ echo " Info: Docker credentials DOCKER_USERNAME and DOCKER_PASSWORD are not set."
64+ fi
65+ }
5366
5467# Record start time in a format appropriate for journalctl --since
5568start_time=$( date +" %Y-%m-%d %H:%M:%S" )
@@ -132,6 +145,8 @@ ulimit -a
132145echo " Info: hard limits"
133146ulimit -aH
134147
148+ dockerLogin
149+
135150echo ' Info: Run build...'
136151mvn clean install
137152
You can’t perform that action at this time.
0 commit comments