Skip to content

Commit

Permalink
Migrate off harbor proxy.
Browse files Browse the repository at this point in the history
Closes #873
  • Loading branch information
mp911de committed Aug 2, 2024
1 parent a162165 commit 3437572
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
14 changes: 9 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ pipeline {
}
steps {
script {
docker.image("${p['docker.image']}").inside(p['docker.java.inside.basic']) {
sh 'src/test/bash/create_certificates.sh'
sh '/opt/vault/vault server -config=$(pwd)/src/test/bash/vault.conf &'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean dependency:list verify -Dsort -U -B'
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
docker.image("${p['docker.image']}").inside(p['docker.java.inside.basic']) {
sh 'src/test/bash/create_certificates.sh'
sh '/opt/vault/vault server -config=$(pwd)/src/test/bash/vault.conf &'
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml clean dependency:list verify -Dsort -U -B'
}
}
}
}
Expand All @@ -80,13 +82,15 @@ pipeline {
docker {
image "${p['docker.image']}"
args "${p['docker.java.inside.basic']}"
registryUrl "${p['docker.proxy.registry']}"
registryCredentialsId "${p['docker.proxy.credentials']}"
}
}
options { timeout(time: 20, unit: 'MINUTES') }

environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
SONATYPE = credentials('oss-login')
SONATYPE = credentials('oss-s01-token')
KEYRING = credentials('spring-signing-secring.gpg')
PASSPHRASE = credentials('spring-gpg-passphrase')
}
Expand Down
11 changes: 9 additions & 2 deletions ci/pipeline.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
java.main.tag=17.0.3_7-jdk

# Docker container images - standard
docker.java.main.image=harbor-repo.vmware.com/dockerhub-proxy-cache/library/eclipse-temurin:${java.main.tag}
docker.java.main.image=eclipse-temurin:${java.main.tag}

# Main docker image name using during the CI build
docker.build.image.name=springci/spring-vault-openjdk17-vault:${java.main.tag}-${docker.vault.version}
docker.image=harbor-repo.vmware.com/dockerhub-proxy-cache/${docker.build.image.name}
docker.image=${docker.build.image.name}

# Supported versions of Vault
docker.vault.version=1.11.1
Expand All @@ -15,7 +15,14 @@ docker.vault.version=1.11.1
docker.java.inside.basic=-v $HOME:/tmp/jenkins-home
docker.java.inside.docker=-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home

# Credentials
# Credentials
docker.registry=
docker.credentials=hub.docker.com-springbuildmaster
docker.proxy.registry=https://docker-hub.usw1.packages.broadcom.com
docker.proxy.credentials=usw1_packages_broadcom_com-jenkins-token
artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c
artifactory.url=https://repo.spring.io
artifactory.repository.snapshot=libs-snapshot-local
develocity.access-key=gradle_enterprise_secret_access_key
jenkins.user.name=spring-builds+jenkins

0 comments on commit 3437572

Please sign in to comment.