Skip to content

Commit

Permalink
Improve logging for common failure when using default config (#1801)
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonsteiner authored Jan 4, 2024
1 parent 9c62dd9 commit 1da9de8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
: "${JENKINS_HOME:="/var/jenkins_home"}"
: "${COPY_REFERENCE_FILE_LOG:="${JENKINS_HOME}/copy_reference_file.log"}"
: "${REF:="/usr/share/jenkins/ref"}"

if ! [ -r "${JENKINS_HOME}" ] || ! [ -w "${JENKINS_HOME}" ]; then
echo "INSTALL WARNING: User: ${USER} missing rw permissions on JENKINS_HOME: ${JENKINS_HOME}"
fi
touch "${COPY_REFERENCE_FILE_LOG}" || { echo "Can not write to ${COPY_REFERENCE_FILE_LOG}. Wrong volume permissions?"; exit 1; }
echo "--- Copying files at $(date)" >> "$COPY_REFERENCE_FILE_LOG"
find "${REF}" \( -type f -o -type l \) -exec bash -c '. /usr/local/bin/jenkins-support; for arg; do copy_reference_file "$arg"; done' _ {} +
Expand Down

0 comments on commit 1da9de8

Please sign in to comment.