aboutsummaryrefslogtreecommitdiffstats
path: root/common/scripts/dumpjournal.sh
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2021-03-30 09:11:33 +0000
committerCorentin LABBE <clabbe@baylibre.com>2021-06-30 12:12:59 +0000
commit840e93ebc56a57ab7557001fd15b68ee408e229f (patch)
tree90949d8fefb687898dde6e062f8109b7988c388c /common/scripts/dumpjournal.sh
parent38c434c01285b284367d2533636770f2ea6aff56 (diff)
SPEC-4003: Use pyartiproxy for uploading a file to artyfactory
Dumpjournal will now dump to artyfactory by default. Bug-AGL: SPEC-4003 Change-Id: I2ae89be507062bceb84a6a7cbd054dcce09b6874 Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
Diffstat (limited to 'common/scripts/dumpjournal.sh')
-rwxr-xr-xcommon/scripts/dumpjournal.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/scripts/dumpjournal.sh b/common/scripts/dumpjournal.sh
index 696b994..9316676 100755
--- a/common/scripts/dumpjournal.sh
+++ b/common/scripts/dumpjournal.sh
@@ -19,6 +19,18 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
+if [ -x ./artiproxy-upload.sh ];then
+ DUMP_FILE=/tmp/dump
+ SYSTEMD_COLORS=false journalctl -a --no-pager > $DUMP_FILE
+ ./artiproxy-upload.sh $DUMP_FILE dumpjournal
+ # still dump to output if any error arise
+ if [ $? -eq 0 ];then
+ exit 0
+ fi
+else
+ echo "No upload, fallback to dump to console"
+fi
+
SYSTEMD_COLORS=false journalctl -a --no-pager
echo "dumpjournal: pass"
exit 0