Login as 'root' when forking the Docker containers used to deploy artifacts & docs.
Reinstate the declaration of the 'user.name' Java System System Property set to 'jenkins' during the Build phase (check). Execute chown command to change the owner of the SBDG build directory to 'jenkins' prior to deploying artifacts & docs. Declare the 'user.name' (set to 'jenkins') and `java.io.tmpdir' (set to '/tmp') Java System Properties in Gradle Options prior to deploying artifacts & docs.
This commit is contained in:
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@@ -68,7 +68,7 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
|
||||
docker.image('adoptopenjdk/openjdk8:latest') {
|
||||
docker.image('adoptopenjdk/openjdk8:latest').inside("-u root") {
|
||||
withCredentials([file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')]) {
|
||||
withCredentials([string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')]) {
|
||||
withCredentials([usernamePassword(credentialsId: 'oss-token', passwordVariable: 'OSSRH_PASSWORD', usernameVariable: 'OSSRH_USERNAME')]) {
|
||||
@@ -93,7 +93,7 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
|
||||
docker.image('adoptopenjdk/openjdk8:latest') {
|
||||
docker.image('adoptopenjdk/openjdk8:latest').inside("-u root") {
|
||||
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
|
||||
try {
|
||||
sh "ci/deployDocs.sh"
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
set -eou pipefail
|
||||
|
||||
GRADLE_OPTS="-Djava.io.tmpdir=/tmp -Dgradle.user.home=/tmp/geode-build-cache" \
|
||||
GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp -Dgradle.user.home=/tmp/geode-build-cache" \
|
||||
./gradlew clean check --no-daemon --refresh-dependencies --stacktrace
|
||||
|
||||
@@ -2,13 +2,17 @@
|
||||
|
||||
set -eou pipefail
|
||||
|
||||
echo "Logged in as user [$USER] with home directory [$HOME] in the current working directory [$PWD]"
|
||||
# User ID 1001 is "jenkins"
|
||||
# Group ID 1001 is "jenkins"
|
||||
# Syntax: `chown -R userId:groupId .`
|
||||
chown -R 1001:1001 .
|
||||
|
||||
./gradlew deployArtifacts finalizeDeployArtifacts --no-build-cache- --no-configuration-cache --no-daemon --stacktrace \
|
||||
-PartifactoryUsername=$ARTIFACTORY_USERNAME \
|
||||
-PartifactoryPassword=$ARTIFACTORY_PASSWORD \
|
||||
-PossrhUsername=$OSSRH_USERNAME \
|
||||
-PossrhPassword=$OSSRH_PASSWORD \
|
||||
-Psigning.keyId=$SPRING_SIGNING_KEYID \
|
||||
-Psigning.password=$SIGNING_PASSWORD \
|
||||
-Psigning.secretKeyRingFile=$SIGNING_KEYRING_FILE
|
||||
GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp" \
|
||||
./gradlew deployArtifacts finalizeDeployArtifacts --no-build-cache- --no-configuration-cache --no-daemon --stacktrace \
|
||||
-PartifactoryUsername=$ARTIFACTORY_USERNAME \
|
||||
-PartifactoryPassword=$ARTIFACTORY_PASSWORD \
|
||||
-PossrhUsername=$OSSRH_USERNAME \
|
||||
-PossrhPassword=$OSSRH_PASSWORD \
|
||||
-Psigning.keyId=$SPRING_SIGNING_KEYID \
|
||||
-Psigning.password=$SIGNING_PASSWORD \
|
||||
-Psigning.secretKeyRingFile=$SIGNING_KEYRING_FILE
|
||||
|
||||
@@ -2,8 +2,12 @@
|
||||
|
||||
set -eou pipefail
|
||||
|
||||
echo "Logged in as user [$USER] with home directory [$HOME] in the current working directory [$PWD]"
|
||||
# User ID 1001 is "jenkins"
|
||||
# Group ID 1001 is "jenkins"
|
||||
# Syntax: `chown -R userId:groupId .`
|
||||
chown -R 1001:1001 .
|
||||
|
||||
./gradlew deployDocs --no-daemon --stacktrace \
|
||||
-PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY \
|
||||
-PdeployDocsSshUsername=$SPRING_DOCS_USERNAME
|
||||
GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp" \
|
||||
./gradlew deployDocs --no-daemon --stacktrace \
|
||||
-PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY \
|
||||
-PdeployDocsSshUsername=$SPRING_DOCS_USERNAME
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
## User ID 1001 is "jenkins"
|
||||
# User ID 1001 is "jenkins"
|
||||
# Group ID 1001 is "jenkins"
|
||||
# Syntax: `chown -R userId:groupId .`
|
||||
|
||||
echo "Logged in as user [$USER] with home directory [$HOME] in the current working directory [$PWD]"
|
||||
chown -R 1001:1001 .
|
||||
|
||||
Reference in New Issue
Block a user