From: Sai.Sathujoda@toshiba-tsip.com
To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com
Cc: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com>,
dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp
Subject: [isar-cip-core v4 1/2] deploy-cip-core.sh: Deploy .swu only if "swu" is passed from .gitlab-ci.yml
Date: Thu, 15 Feb 2024 19:28:36 +0530 [thread overview]
Message-ID: <20240215135837.3557922-2-Sai.Sathujoda@toshiba-tsip.com> (raw)
In-Reply-To: <20240215135837.3557922-1-Sai.Sathujoda@toshiba-tsip.com>
From: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com>
The .swu file is only deployed if "swu" is recieved by DEPLOY variable. Otherwise
.wic image, firmware binaries are deployed.
Signed-off-by: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com>
---
scripts/deploy-cip-core.sh | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh
index 7f6cbe9..8ff75a5 100755
--- a/scripts/deploy-cip-core.sh
+++ b/scripts/deploy-cip-core.sh
@@ -15,6 +15,7 @@ TARGET=$2
EXTENSION=$3
DTB=$4
REF=$5
+DEPLOY=$6
BASE_FILENAME=cip-core-image-cip-core-$RELEASE-$TARGET
if [ "${EXTENSION}" != "none" ]; then
@@ -29,11 +30,18 @@ BASE_PATH=build/tmp/deploy/images/$TARGET/$BASE_FILENAME
S3_TARGET=s3://download2.cip-project.org/cip-core/$REF/$TARGET/
if [ -f "${BASE_PATH}.wic" ]; then
- echo "Compressing $BASE_FILENAME.wic..."
- xz -9 -k -T0 "${BASE_PATH}.wic"
-
echo "Uploading artifacts..."
- aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}"
+ if [ "$DEPLOY" = "swu" ]; then
+ aws s3 cp --no-progress --acl public-read "${BASE_PATH}.swu" "${S3_TARGET}"
+ else
+ echo "Compressing $BASE_FILENAME.wic..."
+ xz -9 -k -T0 "${BASE_PATH}.wic"
+ aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}"
+
+ if [ -f "build/tmp/deploy/images/$TARGET/firmware.bin" ]; then
+ aws s3 cp --no-progress --acl public-read "build/tmp/deploy/images/$TARGET/firmware.bin" "${S3_TARGET}"
+ fi
+ fi
else
if [ -f "${BASE_PATH}.tar.gz" ]; then
echo "Uploading artifacts..."
--
2.30.2
next prev parent reply other threads:[~2024-02-15 13:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 13:58 [isar-cip-core v4 0/2] Upload .swu file from v2 QEMU security image Sai.Sathujoda
2024-02-15 13:58 ` Sai.Sathujoda [this message]
2024-02-15 13:58 ` [isar-cip-core v4 2/2] .gitlab-ci.yml: Add condition check in .build_base to build v2 image Sai.Sathujoda
2024-02-15 14:26 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240215135837.3557922-2-Sai.Sathujoda@toshiba-tsip.com \
--to=sai.sathujoda@toshiba-tsip.com \
--cc=cip-dev@lists.cip-project.org \
--cc=dinesh.kumar@toshiba-tsip.com \
--cc=jan.kiszka@siemens.com \
--cc=kazuhiro3.hayashi@toshiba.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.