Skip to content

Commit 98716a8

Browse files
committed
Consistently run all CI steps with the same user.
See #2982
1 parent d55947b commit 98716a8

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Jenkinsfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,17 @@ pipeline {
9999
steps {
100100
script {
101101
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
102-
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
102+
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
103103
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
104-
"./mvnw -s settings.xml -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch-non-root " +
104+
"./mvnw -s settings.xml -Pci,artifactory " +
105+
"-Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root " +
105106
"-Dartifactory.server=${p['artifactory.url']} " +
106107
"-Dartifactory.username=${ARTIFACTORY_USR} " +
107108
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
108109
"-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " +
109110
"-Dartifactory.build-name=spring-data-elasticsearch " +
110111
"-Dartifactory.build-number=spring-data-elasticsearch-${BRANCH_NAME}-build-${BUILD_NUMBER} " +
112+
"-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch " +
111113
"-Dmaven.test.skip=true clean deploy -U -B"
112114
}
113115
}

ci/clean.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -euo pipefail
55
export JENKINS_USER=${JENKINS_USER_NAME}
66

77
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
8-
./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch
8+
./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root

ci/verify.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
set -euo pipefail
44

55
mkdir -p /tmp/jenkins-home/.m2/spring-data-elasticsearch
6-
chown -R 1001:1001 .
76
export JENKINS_USER=${JENKINS_USER_NAME}
87

98
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
109
./mvnw -s settings.xml \
11-
-P${PROFILE} clean dependency:list verify -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch
10+
-P${PROFILE} clean dependency:list verify -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root

0 commit comments

Comments
 (0)