Name the Docker container forks for the deployment of artifacts & docs after the hostname.

Log (echo) the $HOSTNAME for the host running each deployment.
This commit is contained in:
John Blum
2021-04-08 21:23:12 -07:00
parent 3550f3c124
commit 30b7c66f23
3 changed files with 6 additions and 2 deletions

4
Jenkinsfile vendored
View File

@@ -68,7 +68,7 @@ pipeline {
steps {
script {
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
docker.image('adoptopenjdk/openjdk8:latest').inside("-u root -v /tmp:/tmp") {
docker.image('adoptopenjdk/openjdk8:latest').inside("--name ${env.HOSTNAME}One -u root -v /tmp:/tmp") {
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').inside("-u root -v /tmp:/tmp") {
docker.image('adoptopenjdk/openjdk8:latest').inside("--name ${env.HOSTNAME}Two -u root -v /tmp:/tmp") {
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
try {
sh "ci/deployDocs.sh"

View File

@@ -2,6 +2,8 @@
set -eou pipefail
echo "Running on host [$HOSTNAME]"
# User ID 1001 is "jenkins"
# Group ID 1001 is "jenkins"
# Syntax: `chown -R userId:groupId .`

View File

@@ -2,6 +2,8 @@
set -eou pipefail
echo "Running on host [$HOSTNAME]"
# User ID 1001 is "jenkins"
# Group ID 1001 is "jenkins"
# Syntax: `chown -R userId:groupId .`