From 57fc7083433da89bc1fa238ffbf4d9ec22dd9ba8 Mon Sep 17 00:00:00 2001 From: Tim Johnson Date: Thu, 25 Apr 2019 08:18:36 -0700 Subject: [PATCH] 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 --- jenkins-init-scripts/README | 4 ++++ releasenotes/notes/logging-for-jenkins-init-8053fc153adfd95d.yaml | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 releasenotes/notes/logging-for-jenkins-init-8053fc153adfd95d.yaml 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. -- 2.16.6