#!/bin/bash
-# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
#
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
-jenkins-jobs -l DEBUG test --recursive -o archives/job-configs jjb/
+jenkins-jobs -l DEBUG test --recursive -o archives/job-configs --config-xml jjb/
# Sort job output into sub-directories. On large Jenkins systems that have
# many jobs archiving so many files into the same directory makes NGINX return
fi
done
popd
+
+if [ -n "$(ls -A archives/job-configs)" ]; then
+ tar cJvf archives/job-configs.tar.xz archives/job-configs
+ rm -rf archives/job-configs
+fi