diff mbox series

[yocto-autobuilder-helper,2/2] scripts/run-dashboard-index: add ability to override the destination for testing

Message ID 20250305164443.3080640-2-ross.burton@arm.com
State New
Headers show
Series [yocto-autobuilder-helper,1/2] dashboard: add new bug triage page | expand

Commit Message

Ross Burton March 5, 2025, 4:44 p.m. UTC
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 scripts/run-dashboard-index | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/scripts/run-dashboard-index b/scripts/run-dashboard-index
index b898c9b9..129493e1 100755
--- a/scripts/run-dashboard-index
+++ b/scripts/run-dashboard-index
@@ -2,7 +2,8 @@ 
 #
 # SPDX-License-Identifier: GPL-2.0-only
 #
-# Called with $1 as the build directory
+# Called with $1 as the build directory.
+# Set DEST in the environment to override the destination for testing purposes.
 
 set -e
 set -u
@@ -12,10 +13,12 @@  set -x
 builddir=$(realpath "$1")
 scriptdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
 
+dest=${DEST:-docs@docs.yoctoproject.org:dashboard/}
+
 cd $builddir
 $scriptdir/release-parser.py 
 $scriptdir/layer-parser.py
 
-rsync -irlp --checksum --ignore-times releases.json docs@docs.yoctoproject.org:dashboard/
-rsync -irlp --checksum --ignore-times parsed-layers.json docs@docs.yoctoproject.org:dashboard/
-rsync -irlp --checksum --ignore-times $scriptdir/dashboard/ docs@docs.yoctoproject.org:dashboard/
+rsync -irlp --checksum --ignore-times releases.json ${dest}
+rsync -irlp --checksum --ignore-times parsed-layers.json ${dest}
+rsync -irlp --checksum --ignore-times $scriptdir/dashboard/ ${dest}