All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Sai.Sathujoda@toshiba-tsip.com, cip-dev@lists.cip-project.org
Cc: dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp
Subject: Re: [isar-cip-core v3 1/2] deploy-cip-core.sh: Upload only .swu file for v2 QEMU security targets
Date: Wed, 14 Feb 2024 18:22:06 +0100	[thread overview]
Message-ID: <2ae87a46-f5ae-470d-b8ec-4837107a63f6@siemens.com> (raw)
In-Reply-To: <20240214154820.3544080-2-Sai.Sathujoda@toshiba-tsip.com>

On 14.02.24 16:48, Sai.Sathujoda@toshiba-tsip.com wrote:
> From: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com>
> 
> Currently software update testing is enabled for QEMU security targets,
> so if "USE_SWU" switch is enabled then only the .swu file is uploaded
> ignoring the v2 .wic image. Since the project directory in CI will be
> cleaned after every job, so the compressed wic file is moved to s3 bucket
> instead of copying to avoid "file exists" error in case of two consecutive
> builds in a single job.
> 
> U-boot binaries are also uploaded for usage
> when required in LAVA job definitionss.
> 
> Signed-off-by: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com>
> ---
>  scripts/deploy-cip-core.sh | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh
> index 7f6cbe9..aece4d1 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
> +USE_SWU=$6

Naming: DEPLOY={swu|wic} would be a nicer interface IMHO.

>  
>  BASE_FILENAME=cip-core-image-cip-core-$RELEASE-$TARGET
>  if [ "${EXTENSION}" != "none" ]; then
> @@ -33,7 +34,17 @@ if [ -f "${BASE_PATH}.wic" ]; then
>  	xz -9 -k -T0 "${BASE_PATH}.wic"
>  
>  	echo "Uploading artifacts..."
> -	aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}"
> +	# Condition check to avoid deploying v2 security image and prefer only it's .swu artifact

The deployment script should not worry about who is using it. Its
interface are the command line options. So, let's drop this comment.

> +	if [ "$USE_SWU" = "enable" ]; then
> +		aws s3 cp --no-progress --acl public-read "${BASE_PATH}.swu" "${S3_TARGET}"
> +	else
> +		# Move the first wic.xz file to aws s3 bucket to avoid error while compressing v2 image
> +		aws s3 mv --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}"
> +	fi
> +
> +	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
>  else
>  	if [ -f "${BASE_PATH}.tar.gz" ]; then
>  		echo "Uploading artifacts..."

Jan

-- 
Siemens AG, Technology
Linux Expert Center



  reply	other threads:[~2024-02-14 17:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 15:48 [isar-cip-core v3 0/2] Upload .swu file and firmware for LAVA testing Sai.Sathujoda
2024-02-14 15:48 ` [isar-cip-core v3 1/2] deploy-cip-core.sh: Upload only .swu file for v2 QEMU security targets Sai.Sathujoda
2024-02-14 17:22   ` Jan Kiszka [this message]
2024-02-14 15:48 ` [isar-cip-core v3 2/2] .gitlab-ci.yml: Add condition check in .build_base to build v2 image Sai.Sathujoda
2024-02-14 17:24   ` Jan Kiszka
2024-02-15  6:01     ` Sai.Sathujoda
2024-02-15  6:51       ` 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=2ae87a46-f5ae-470d-b8ec-4837107a63f6@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=Sai.Sathujoda@toshiba-tsip.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=dinesh.kumar@toshiba-tsip.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.