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 2/2] .gitlab-ci.yml: Add condition check in .build_base to build v2 image
Date: Thu, 15 Feb 2024 07:51:38 +0100	[thread overview]
Message-ID: <87c49bbe-ba08-4418-9309-57003dcbe417@siemens.com> (raw)
In-Reply-To: <OS3PR01MB6103B068B261D65EA7F23733C24D2@OS3PR01MB6103.jpnprd01.prod.outlook.com>

On 15.02.24 07:01, Sai.Sathujoda@toshiba-tsip.com wrote:
> Hi Jan,
> 
> Thank you for your comments.
> 
> Using 'build_swu_v2' switch to decide whether we need to build the second image for it's .swu while extending .build_base is more relevant. We ll make the change for that. 
> 
> Another thing is we want to completely occupy $6 parameter in both the places the deploy-cip-core.sh shall be called from now so that we can avoid conflict if some one wants to introduce 6th positional parameter in the first call to deploy script. For that we want to declare a new variable name 'deploy_file' with it's default as wic. We shall use 'deploy_file: swu' when we build the v2 image. We can also hardcode "wic" and "swu" as $6 parameters in deploy script calls instead of using a separate 'deploy_file' variable.

Actually, I'm not fully happy with the interface yet, even when using
"deploy_file: swu" because that mode still seems to deploy more than
just the swu. Maybe you can make sure that in this mode really only the
swu is pushed. That would allow in the future to push image, firmware,
you-name-it in one step and add the swu right after that without
uploading bits twice.

> 
> I also wanted to confirm that I added   - > under the script section is to run multiple commands as a yaml multi-line block.

Sure, but you are only adding a single shell command (the if-block
counts as one).

Jan

> 
> Please provide your opinion on this, Jan. We ll send v4 series once you confirm this approach.
> 
> Thanks and Regards,
> Sai Ashrith Sathujoda
> 
> 
> 
> -----Original Message-----
> From: Jan Kiszka <jan.kiszka@siemens.com> 
> Sent: Wednesday, February 14, 2024 10:55 PM
> To: ashrith sai(TSIP) <Sai.Sathujoda@toshiba-tsip.com>; cip-dev@lists.cip-project.org
> Cc: dinesh kumar(TSIP TMIEC ODG Porting) <dinesh.kumar@toshiba-tsip.com>; hayashi kazuhiro(林 和宏 DME ○DIG□MPS○MP4) <kazuhiro3.hayashi@toshiba.co.jp>
> Subject: Re: [isar-cip-core v3 2/2] .gitlab-ci.yml: Add condition check in .build_base to build v2 image
> 
> On 14.02.24 16:48, Sai.Sathujoda@toshiba-tsip.com wrote:
>> From: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com>
>>
>> To re-use the built artifacts of v1 image, the consecutive build must 
>> happen in the project directory of the job. So if use_swu is enabled, 
>> then a consecutive build with a minor recipe change is done to get an 
>> .swu artifact for swupdate testing in LAVA.
>>
>> Signed-off-by: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com>
>> ---
>>  .gitlab-ci.yml | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f87ec3..bbd534e 
>> 100644
>> --- a/.gitlab-ci.yml
>> +++ b/.gitlab-ci.yml
>> @@ -25,6 +25,7 @@ variables:
>>    dtb: none
>>    deploy: enable
>>    deploy_kernelci: disable
>> +  use_swu: disable
> 
> Also here: naming. This is rather "build_swu_v2", and deploy it, of course.
> 
>>  
>>  stages:
>>    - build
>> @@ -66,6 +67,12 @@ default:
>>      - echo "Building ${base_yaml}"
>>      - kas build ${base_yaml}
>>      - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh 
>> ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi
>> +    - >
> 
> Just wondering: Is there a technical reason to use "- >" here, rather then starting directly with the command?
> 
>> +      if [ "${use_swu}" = "enable" ]; then
>> +          echo "PV = \"2.0\"" >> recipes-core/images/cip-core-image-security.bb
>> +          kas build ${base_yaml}
>> +          scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG} ${use_swu}
>> +      fi
>>      - if [ "${deploy_kernelci}" = "enable" ]; then 
>> scripts/deploy-kernelci.py ${release} ${target} ${extension} ${dtb}; 
>> fi
>>  
>>  # base image
>> @@ -105,6 +112,7 @@ build:qemu-amd64-base:
>>      use_rt: disable
>>      wic_targz: disable
>>      targz: enable
>> +    use_swu: enable
>>  
>>  build:qemu-amd64-base-kernelci:
>>    extends:
>> @@ -127,6 +135,7 @@ build:qemu-arm64-base:
>>      use_rt: disable
>>      wic_targz: disable
>>      targz: enable
>> +    use_swu: enable
>>  
>>  build:qemu-arm64-base-kernelci:
>>    extends:
>> @@ -149,6 +158,7 @@ build:qemu-arm-base:
>>      use_rt: disable
>>      wic_targz: disable
>>      targz: enable
>> +    use_swu: enable
>>  
>>  build:qemu-arm-base-kernelci:
>>    extends:
> 
> Jan
> 
> --
> Siemens AG, Technology
> Linux Expert Center

-- 
Siemens AG, Technology
Linux Expert Center



      reply	other threads:[~2024-02-15  6:51 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
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 [this message]

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=87c49bbe-ba08-4418-9309-57003dcbe417@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.