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

Commit

Permalink
fix ci (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackjii79 authored Feb 22, 2024
1 parent 58c5a16 commit 90667c5
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 21 deletions.
36 changes: 20 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,16 @@ pipeline {
def imageTags = isMasterBranch() || isReleaseBranch() ? "${versionText},${gitCommitHash}" : "${gitCommitHash}"
withDockerCredentials(DOCKERHUB_CREDS, "FROM_") {
withDockerCredentials("harbor.h2o.ai", "TO_") {
sh "./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} \
-Djib.from.auth.password=${FROM_DOCKER_PASSWORD} \
-Djib.to.tags=${imageTags} \
-Djib.allowInsecureRegistries=true \
-DsendCredentialsOverHttp=true"
withEnv(["XDG_CONFIG_HOME=/tmp", "XDG_CACHE_HOME=/tmp"]) {
sh "./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} \
-Djib.from.auth.password=${FROM_DOCKER_PASSWORD} \
-Djib.to.tags=${imageTags} \
-Djib.allowInsecureRegistries=true \
-DsendCredentialsOverHttp=true"
}
}
}
}
Expand Down Expand Up @@ -205,13 +207,15 @@ pipeline {
def imageTags = isMasterBranch() || isReleaseBranch() ? "${versionText},${gitCommitHash}" : "${gitCommitHash}"
withDockerCredentials(DOCKERHUB_CREDS, "FROM_") {
withDockerCredentials(DOCKERHUB_CREDS, "TO_") {
sh "./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} \
-Djib.from.auth.password=${FROM_DOCKER_PASSWORD} \
-Djib.to.tags=${imageTags} \
-PdockerRepositoryPrefix=h2oai/"
withEnv(["XDG_CONFIG_HOME=/tmp", "XDG_CACHE_HOME=/tmp"]) {
sh "./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} \
-Djib.from.auth.password=${FROM_DOCKER_PASSWORD} \
-Djib.to.tags=${imageTags} \
-PdockerRepositoryPrefix=h2oai/"
}
}
}
}
Expand Down Expand Up @@ -241,7 +245,7 @@ pipeline {
withDockerCredentials(DOCKERHUB_CREDS, "FROM_") {
withGCRCredentials(VORVAN_CRED) {
def gcrCreds = readFile("${GCR_JSON_KEY}")
withEnv(['TO_DOCKER_USERNAME=_json_key', "TO_DOCKER_PASSWORD=${gcrCreds}"]) {
withEnv(['TO_DOCKER_USERNAME=_json_key', "TO_DOCKER_PASSWORD=${gcrCreds}", "XDG_CONFIG_HOME=/tmp", "XDG_CACHE_HOME=/tmp"]) {
sh "./gradlew --init-script init.gradle jib \
-Djib.from.auth.username=${FROM_DOCKER_USERNAME} \
-Djib.from.auth.password=${FROM_DOCKER_PASSWORD} \
Expand Down
2 changes: 1 addition & 1 deletion aws-sagemaker-hosted-scorer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jib {
}
}
container {
jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }
jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }.toList()
ports = ['8080']
volumes = [
// mojo pipeline and license file will live here
Expand Down
2 changes: 1 addition & 1 deletion gcp-cloud-run/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jib {
}
}
container {
jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }
jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }.toList()
ports = ['8080']
environment = [
// The expected path to the DAI license file.
Expand Down
2 changes: 1 addition & 1 deletion gcp-vertex-ai-mojo-scorer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jib {
}
}
container {
jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }
jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }.toList()
ports = ['8080']
environment = [
// The expected path to the DAI license file.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
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.4.0
openApiGeneratorGradlePluginVersion = 7.0.1

# External tools:
Expand Down
2 changes: 1 addition & 1 deletion local-rest-scorer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jib {
}
}
container {
jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }
jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }.toList()
ports = ['8080']
volumes = [
// For storing the mojo2 file with the model to be used for scoring.
Expand Down

0 comments on commit 90667c5

Please sign in to comment.