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:
John Blum
2021-04-07 21:31:22 -07:00
parent 56ca80ff73
commit 11e8e7aa3b
5 changed files with 27 additions and 17 deletions

View 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