Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
fix jenkins ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
jackjii79 committed Feb 22, 2024
1 parent ed38903 commit 40df12b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ pipeline {
def imageTags = isMasterBranch() || isReleaseBranch() ? "${versionText},${gitCommitHash}" : "${gitCommitHash}"
withDockerCredentials(DOCKERHUB_CREDS, "FROM_") {
withDockerCredentials("harbor.h2o.ai", "TO_") {
sh "./gradlew --init-script init.gradle jib \
sh "mkdir -p /tmp/.config/google-cloud-tools-java/jib && \
touch /tmp/.config/google-cloud-tools-java/jib/config.json && \
XDG_CONFIG_HOME=/tmp && ./gradlew --init-script init.gradle jib \
-Djib.to.auth.username=${TO_DOCKER_USERNAME} \
-Djib.to.auth.password=${TO_DOCKER_PASSWORD} \
-Djib.from.auth.username=${FROM_DOCKER_USERNAME} \
Expand Down Expand Up @@ -205,7 +207,9 @@ pipeline {
def imageTags = isMasterBranch() || isReleaseBranch() ? "${versionText},${gitCommitHash}" : "${gitCommitHash}"
withDockerCredentials(DOCKERHUB_CREDS, "FROM_") {
withDockerCredentials(DOCKERHUB_CREDS, "TO_") {
sh "./gradlew --init-script init.gradle jib \
sh "mkdir -p /tmp/.config/google-cloud-tools-java/jib && \
touch /tmp/.config/google-cloud-tools-java/jib/config.json && \
XDG_CONFIG_HOME=/tmp && ./gradlew --init-script init.gradle jib \
-Djib.to.auth.username=${TO_DOCKER_USERNAME} \
-Djib.to.auth.password=${TO_DOCKER_PASSWORD} \
-Djib.from.auth.username=${FROM_DOCKER_USERNAME} \
Expand Down Expand Up @@ -242,7 +246,9 @@ pipeline {
withGCRCredentials(VORVAN_CRED) {
def gcrCreds = readFile("${GCR_JSON_KEY}")
withEnv(['TO_DOCKER_USERNAME=_json_key', "TO_DOCKER_PASSWORD=${gcrCreds}"]) {
sh "./gradlew --init-script init.gradle jib \
sh "mkdir -p /tmp/.config/google-cloud-tools-java/jib && \
touch /tmp/.config/google-cloud-tools-java/jib/config.json && \
XDG_CONFIG_HOME=/tmp && ./gradlew --init-script init.gradle jib \
-Djib.from.auth.username=${FROM_DOCKER_USERNAME} \
-Djib.from.auth.password=${FROM_DOCKER_PASSWORD} \
-Djib.to.tags=${imageTags} \
Expand Down Expand Up @@ -318,4 +324,3 @@ void withGCRCredentials(final String credentialsId, final Closure body) {
body()
}
}

4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 1.1.21-SNAPSHOT
version = 1.2.1-SNAPSHOT

# Versions of dependencies. Try to keep these at the same version across the deployment templates to facilitate
# issue resolution.
Expand Down Expand Up @@ -40,7 +40,7 @@ tomcatVersion = 9.0.75
springBootPluginVersion = 3.2.0
swaggerGradlePluginVersion = 2.19.2
errorpronePluginVersion = 3.1.0
jibPluginVersion = 2.7.1
jibPluginVersion = 3.2.1
openApiGeneratorGradlePluginVersion = 7.0.1

# External tools:
Expand Down

0 comments on commit 40df12b

Please sign in to comment.