aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/common/include-agl-run-test-rsync-changeid.sh
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2020-03-24 10:08:54 +0100
committerCorentin LABBE <clabbe@baylibre.com>2020-03-27 09:30:04 +0100
commit47533a77f8826718e7f79cce01ec9bc1e03bfadb (patch)
tree358f0c2899f5d15fe1df258f80e61ed4187a0fe3 /jjb/common/include-agl-run-test-rsync-changeid.sh
parentc78d5cb2dabb9600e50e082ea6a8e0de74bb292a (diff)
SPEC-2962: permit to have more than one board per build
The current way to generate jobs assume that only one board exists per build. For handing more than one board per build, we need to introduce a sort of loop. So for each build, we will produce a list of boards in BOARDOUT In the BOARDOUT/$board, we will have: - an "info" file with all necessary VARIABLES for copying artifacts So for each board, some artifact will be copied. Then only one job for the "main" board of the CIBT job will be handled. The extra boards of a build will need to have their own CIBT, but at least they dont need to do a real build/copyartifact. Change-Id: I6c6999e549c7f1216f466410896b3058efc5882d Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
Diffstat (limited to 'jjb/common/include-agl-run-test-rsync-changeid.sh')
-rw-r--r--jjb/common/include-agl-run-test-rsync-changeid.sh46
1 files changed, 21 insertions, 25 deletions
diff --git a/jjb/common/include-agl-run-test-rsync-changeid.sh b/jjb/common/include-agl-run-test-rsync-changeid.sh
index e576da04..41fe2b48 100644
--- a/jjb/common/include-agl-run-test-rsync-changeid.sh
+++ b/jjb/common/include-agl-run-test-rsync-changeid.sh
@@ -10,7 +10,6 @@ echo "\n\n\n"
export RSYNCDST="/srv/download/AGL/upload/ci/${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}"
export RSYNCSRC=$(pwd)/UPLOAD/
-export RSYNCSRCstorage=$(pwd)/UPLOADstorage/
# construct upload folder
mv UPLOAD UPLOAD2 || true
@@ -18,9 +17,6 @@ rm -rf UPLOAD2 || true
mkdir -p UPLOAD/${MACHINE}
export DEST=$(pwd)/UPLOAD/${MACHINE}
-export DEST2=$(pwd)/UPLOADstorage/AGL/upload/ci/${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}/
-mkdir -p ${DEST2}
-
cd $REPODIR
cd output
@@ -30,30 +26,30 @@ ls -alhR tmp/deploy/images
#set -x
-echo "tmp/deploy/images/${TARGETMACHINE}/${DEVICE_DTB}"
-echo "tmp/deploy/images/${TARGETMACHINE}/${DEVICE_DTB#"$DEVICE_KERNEL"-}"
-
-## fixed in releng with --branch
-# workaround for thud until fixed in templates:
-#if [ ! -e tmp/deploy/images/${TARGETMACHINE}/${DEVICE_DTB} -a -e tmp/deploy/images/${TARGETMACHINE}/${DEVICE_DTB#"$DEVICE_KERNEL"-} ] ; then
-# cp -avL tmp/deploy/images/${TARGETMACHINE}/${DEVICE_DTB#"$DEVICE_KERNEL"-} tmp/deploy/images/${TARGETMACHINE}/${DEVICE_DTB}
-#fi
-
-if [ -e tmp/deploy/images/${TARGETMACHINE}/build-info ] ; then
- cp -avL tmp/deploy/images/${TARGETMACHINE}/build-info ${DEST}/
- cp -avL tmp/deploy/images/${TARGETMACHINE}/build-info ${DEST2}/
-fi
-
-# copy files to $DEST (only if variable is non-empty)
-for i in DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_NBDROOT; do
- FILE=$(eval echo \$${i})
- if [ -n "$FILE" ]; then
- cp -avL tmp/deploy/images/${TARGETMACHINE}/${FILE} ${DEST}/
- cp -avL tmp/deploy/images/${TARGETMACHINE}/${FILE} ${DEST2}/
- fi
+for board in $(ls $BOARDOUT)
+do
+ . $BOARDOUT/$board/info
+ echo "INFO: copy artifact for $x_releng_device/$x_lava_device"
+ echo "tmp/deploy/images/${TARGETMACHINE}/${DEVICE_DTB}"
+ echo "tmp/deploy/images/${TARGETMACHINE}/${DEVICE_DTB#"$DEVICE_KERNEL"-}"
+
+ if [ -e tmp/deploy/images/${TARGETMACHINE}/build-info ] ; then
+ cp -avL tmp/deploy/images/${TARGETMACHINE}/build-info ${DEST}/
+ fi
+
+ # copy files to $DEST (only if variable is non-empty)
+ for i in DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_NBDROOT; do
+ FILE=$(eval echo \$${i})
+ if [ -n "$FILE" ]; then
+ cp -avL tmp/deploy/images/${TARGETMACHINE}/${FILE} ${DEST}/
+ fi
+ done
done
set +x
+# for the moment, nothing more use this directory, clean it
+rm -r $BOARDOUT
+
tree $DEST
ls -alhR $DEST