This is an automated email from the ASF dual-hosted git repository.
rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new af11418 docker creds in build-specific directory (#5167)
af11418 is described below
commit af11418df942e8d2cdc4c4ce933645fa723e9e45
Author: David Grove <[email protected]>
AuthorDate: Thu Oct 14 09:05:20 2021 -0400
docker creds in build-specific directory (#5167)
---
tools/jenkins/apache/dockerhub.groovy | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/jenkins/apache/dockerhub.groovy
b/tools/jenkins/apache/dockerhub.groovy
index c1b7c25..6ff1c59 100644
--- a/tools/jenkins/apache/dockerhub.groovy
+++ b/tools/jenkins/apache/dockerhub.groovy
@@ -26,15 +26,16 @@ node('ubuntu') {
stage("Build and Deploy to DockerHub") {
def JAVA_JDK_8=tool name: 'jdk_1.8_latest', type: 'hudson.model.JDK'
withEnv(["Path+JDK=$JAVA_JDK_8/bin","JAVA_HOME=$JAVA_JDK_8"]) {
+ sh "mkdir $WORKSPACE/local-docker-cfg"
withCredentials([usernamePassword(credentialsId: 'openwhisk_dockerhub',
passwordVariable: 'DOCKER_PASSWORD', usernameVariable: 'DOCKER_USER')]) {
- sh 'docker login -u ${DOCKER_USER} -p ${DOCKER_PASSWORD}'
+ sh 'HOME="$WORKSPACE/local-docker-cfg" docker login -u
${DOCKER_USER} -p ${DOCKER_PASSWORD}'
}
def PUSH_CMD = "./gradlew :core:controller:distDocker
:core:invoker:distDocker :core:standalone:distDocker
:core:monitoring:user-events:distDocker :tools:ow-utils:distDocker
:core:cosmos:cache-invalidator:distDocker -PdockerRegistry=docker.io
-PdockerImagePrefix=openwhisk"
def gitCommit = sh(returnStdout: true, script: 'git rev-parse
HEAD').trim()
def shortCommit = gitCommit.take(7)
sh "./gradlew clean"
- sh "${PUSH_CMD} -PdockerImageTag=nightly"
- sh "${PUSH_CMD} -PdockerImageTag=${shortCommit}"
+ sh "HOME=\"$WORKSPACE/local-docker-cfg\" ${PUSH_CMD}
-PdockerImageTag=nightly"
+ sh "HOME=\"$WORKSPACE/local-docker-cfg\" ${PUSH_CMD}
-PdockerImageTag=${shortCommit}"
}
}
@@ -42,6 +43,8 @@ node('ubuntu') {
sh "docker images"
sh 'docker rmi -f $(docker images -f "reference=openwhisk/*" -q) || true'
sh "docker images"
+ sh "docker logout"
+ sh "rm -rf $WORKSPACE/local-docker-cfg"
}
stage("Notify") {