Add printing debug messages during Jenkins master start

This commit is contained in:
Tomasz Sęk 2020-01-01 22:18:00 +01:00
parent c51fab9a2c
commit 044c0890c2
No known key found for this signature in database
GPG Key ID: DC356D23F6A644D0
1 changed files with 11 additions and 0 deletions

View File

@ -244,6 +244,17 @@ var initBashTemplate = template.Must(template.New(InitScriptName).Parse(`#!/usr/
set -e
set -x
if [ "${DEBUG}" == "true" ]; then
echo "Printing debug messages - begin"
whoami
id
env
ls -la {{ .JenkinsHomePath }}
echo "Printing debug messages - end"
else
echo "To print debug messages set environment variable 'DEBUG' to 'true'"
fi
# https://wiki.jenkins.io/display/JENKINS/Post-initialization+script
mkdir -p {{ .JenkinsHomePath }}/init.groovy.d
cp -n {{ .InitConfigurationPath }}/*.groovy {{ .JenkinsHomePath }}/init.groovy.d