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

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jackjii79 committed Feb 22, 2024
1 parent 0ea3cfe commit f1cfd7d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ pipeline {
steps {
timeout(time: 30, unit: 'MINUTES') {
script {
sh 'rm -rf ~/.config/google-cloud-tools-java && mkdir -p ~/.config/google-cloud-tools-java/jib && echo "{ \"disableUpdateCheck\": false }" > ~/.config/google-cloud-tools-java/jib/config.json'
def gitCommitHash = env.GIT_COMMIT
def imageTags = isMasterBranch() || isReleaseBranch() ? "${versionText},${gitCommitHash}" : "${gitCommitHash}"
withDockerCredentials(DOCKERHUB_CREDS, "FROM_") {
withDockerCredentials("harbor.h2o.ai", "TO_") {
sh "./gradlew --init-script init.gradle jib \
sh 'rm -rf /tmp/google-cloud-tools-java && mkdir -p /tmp/google-cloud-tools-java/jib && echo "{ \"disableUpdateCheck\": false }" > /tmp/google-cloud-tools-java/jib/config.json && chmod 666 /tmp/google-cloud-tools-java/jib/config.json'
sh "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 @@ -202,12 +202,12 @@ pipeline {
steps {
timeout(time: 30, unit: 'MINUTES') {
script {
sh 'rm -rf ~/.config/google-cloud-tools-java && mkdir -p ~/.config/google-cloud-tools-java/jib && echo "{ \"disableUpdateCheck\": false }" > ~/.config/google-cloud-tools-java/jib/config.json'
def gitCommitHash = env.GIT_COMMIT
def imageTags = isMasterBranch() || isReleaseBranch() ? "${versionText},${gitCommitHash}" : "${gitCommitHash}"
withDockerCredentials(DOCKERHUB_CREDS, "FROM_") {
withDockerCredentials(DOCKERHUB_CREDS, "TO_") {
sh "./gradlew --init-script init.gradle jib \
sh 'rm -rf /tmp/google-cloud-tools-java && mkdir -p /tmp/google-cloud-tools-java/jib && echo "{ \"disableUpdateCheck\": false }" > /tmp/google-cloud-tools-java/jib/config.json && chmod 666 /tmp/google-cloud-tools-java/jib/config.json'
sh "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 @@ -238,14 +238,14 @@ pipeline {
steps {
timeout(time: 30, unit: 'MINUTES') {
script {
sh 'rm -rf ~/.config/google-cloud-tools-java && mkdir -p ~/.config/google-cloud-tools-java/jib && echo "{ \"disableUpdateCheck\": false }" > ~/.config/google-cloud-tools-java/jib/config.json'
def gitCommitHash = env.GIT_COMMIT
def imageTags = isMasterBranch() || isReleaseBranch() ? "${versionText},${gitCommitHash}" : "${gitCommitHash}"
withDockerCredentials(DOCKERHUB_CREDS, "FROM_") {
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 'rm -rf /tmp/google-cloud-tools-java && mkdir -p /tmp/google-cloud-tools-java/jib && echo "{ \"disableUpdateCheck\": false }" > /tmp/google-cloud-tools-java/jib/config.json && chmod 666 /tmp/google-cloud-tools-java/jib/config.json'
sh "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

0 comments on commit f1cfd7d

Please sign in to comment.