Skip to content

Commit

Permalink
Consistently run all CI steps with the same user.
Browse files Browse the repository at this point in the history
See #3610
  • Loading branch information
mp911de committed Oct 9, 2024
1 parent 4e36b16 commit 52ee55f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pipeline {
steps {
script {
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
"./mvnw -s settings.xml -Pci,artifactory " +
"-Dartifactory.server=${p['artifactory.url']} " +
Expand All @@ -177,8 +177,8 @@ pipeline {
"-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " +
"-Dartifactory.build-name=spring-data-jpa " +
"-Dartifactory.build-number=spring-data-jpa-${BRANCH_NAME}-build-${BUILD_NUMBER} " +
'-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa-enterprise ' +
'-Dmaven.test.skip=true clean deploy -U -B '
"-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa " +
"-Dmaven.test.skip=true clean deploy -U -B "
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -euo pipefail

mkdir -p /tmp/jenkins-home/.m2/spring-data-jpa
mkdir -p /tmp/jenkins-home/.m2/.develocity
chown -R 1001:1001 .

export JENKINS_USER=${JENKINS_USER_NAME}

Expand All @@ -14,5 +13,3 @@ MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \

MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa

chown -R 1001:1001 /tmp/jenkins-home/.m2/.develocity

0 comments on commit 52ee55f

Please sign in to comment.