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 {
50
50
exit 1
51
51
fi
52
52
}
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
+ }
53
66
54
67
# Record start time in a format appropriate for journalctl --since
55
68
start_time=$( date +" %Y-%m-%d %H:%M:%S" )
@@ -132,6 +145,8 @@ ulimit -a
132
145
echo " Info: hard limits"
133
146
ulimit -aH
134
147
148
+ dockerLogin
149
+
135
150
echo ' Info: Run build...'
136
151
mvn clean install
137
152
You can’t perform that action at this time.
0 commit comments