Update jenkins-init script example 16/15416/1
authorTim Johnson <tijohnson@linuxfoundation.org>
Thu, 25 Apr 2019 15:18:36 +0000 (08:18 -0700)
committerTim Johnson <tijohnson@linuxfoundation.org>
Fri, 26 Apr 2019 18:21:36 +0000 (11:21 -0700)
Update example jenking-init script to send stdout/stderr to a file.

Change-Id: I5a91858d1724da41139255f2314c2c6f691070de
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
jenkins-init-scripts/README
releasenotes/notes/logging-for-jenkins-init-8053fc153adfd95d.yaml [new file with mode: 0644]

index 286b620..edc6d28 100644 (file)
@@ -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 (file)
index 0000000..ed665f4
--- /dev/null
@@ -0,0 +1,5 @@
+---
+other:
+  - |
+    Update example Jenkins Init Script in README to redirect all output to a
+    log file.