From: Tim Johnson Date: Thu, 25 Apr 2019 15:18:36 +0000 (-0700) Subject: Update jenkins-init script example X-Git-Tag: v0.37.0~2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=57fc7083433da89bc1fa238ffbf4d9ec22dd9ba8;p=releng%2Fglobal-jjb.git Update jenkins-init script example Update example jenking-init script to send stdout/stderr to a file. Change-Id: I5a91858d1724da41139255f2314c2c6f691070de Signed-off-by: Tim Johnson --- diff --git a/jenkins-init-scripts/README b/jenkins-init-scripts/README index 286b620f..edc6d28e 100644 --- a/jenkins-init-scripts/README +++ b/jenkins-init-scripts/README @@ -12,6 +12,8 @@ To use this create a Jenkins Managed File with the contents: #!/bin/bash + exec > /var/log/jenkins-init.log 2>&1 + gerrit_host=gerrit.example.org ciman_root=/opt/ciman @@ -31,3 +33,5 @@ To use this create a Jenkins Managed File with the contents: $ciman_root/global-jjb/jenkins-init-scripts/init.sh rm -rf $ciman_root + + echo "jenkins-init: Done" diff --git a/releasenotes/notes/logging-for-jenkins-init-8053fc153adfd95d.yaml b/releasenotes/notes/logging-for-jenkins-init-8053fc153adfd95d.yaml new file mode 100644 index 00000000..ed665f44 --- /dev/null +++ b/releasenotes/notes/logging-for-jenkins-init-8053fc153adfd95d.yaml @@ -0,0 +1,5 @@ +--- +other: + - | + Update example Jenkins Init Script in README to redirect all output to a + log file.