diff mbox series

[isar-cip-core,v4,2/2] .gitlab-ci.yml: Add condition check in .build_base to build v2 image

Message ID 20240215135837.3557922-3-Sai.Sathujoda@toshiba-tsip.com (mailing list archive)
State Accepted
Headers show
Series Upload .swu file from v2 QEMU security image | expand

Commit Message

Sai.Sathujoda@toshiba-tsip.com Feb. 15, 2024, 1:58 p.m. UTC
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 build_swu_v2 is enabled,
then a consecutive build with a minor recipe change is done to get an .swu
artifact for swupdate testing in LAVA. deploy_file variable is default set
to wic so that after checking presence of .wic in the deploy script, all
the artifacts like wic, firmware etc. shall be deployed except .swu file.
Only .swu file will pushed when "swu" is passed to deploy script.

Signed-off-by: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com>
---
 .gitlab-ci.yml | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Comments

Jan Kiszka Feb. 15, 2024, 2:26 p.m. UTC | #1
On 15.02.24 14:58, 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 build_swu_v2 is enabled,
> then a consecutive build with a minor recipe change is done to get an .swu
> artifact for swupdate testing in LAVA. deploy_file variable is default set
> to wic so that after checking presence of .wic in the deploy script, all
> the artifacts like wic, firmware etc. shall be deployed except .swu file.
> Only .swu file will pushed when "swu" is passed to deploy script.
> 
> Signed-off-by: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com>
> ---
>  .gitlab-ci.yml | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 4f87ec3..1c6816c 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -25,6 +25,8 @@ variables:
>    dtb: none
>    deploy: enable
>    deploy_kernelci: disable
> +  build_swu_v2: disable
> +  deploy_file: wic

Why making deploy_file now a ci variable? No job changes that.

I'm dropping that, hard-coding the related deploy-cip-core.sh parameter
on invocation. So, no need for a v5.

>  
>  stages:
>    - build
> @@ -65,7 +67,13 @@ default:
>      - if [ "${encrypt}" = "enable" ]; then base_yaml="${base_yaml}:kas/opt/encrypt-partitions.yml"; fi
>      - 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
> +    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG} ${deploy_file}; fi
> +    - if [ "${build_swu_v2}" = "enable" ]; then
> +          echo "PV = \"2.0\"" >> recipes-core/images/cip-core-image-security.bb;
> +          kas build ${base_yaml};
> +          deploy_file="swu";
> +          scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG} ${deploy_file};
> +      fi
>      - if [ "${deploy_kernelci}" = "enable" ]; then scripts/deploy-kernelci.py ${release} ${target} ${extension} ${dtb}; fi
>  
>  # base image
> @@ -105,6 +113,7 @@ build:qemu-amd64-base:
>      use_rt: disable
>      wic_targz: disable
>      targz: enable
> +    build_swu_v2: enable
>  
>  build:qemu-amd64-base-kernelci:
>    extends:
> @@ -127,6 +136,7 @@ build:qemu-arm64-base:
>      use_rt: disable
>      wic_targz: disable
>      targz: enable
> +    build_swu_v2: enable
>  
>  build:qemu-arm64-base-kernelci:
>    extends:
> @@ -149,6 +159,7 @@ build:qemu-arm-base:
>      use_rt: disable
>      wic_targz: disable
>      targz: enable
> +    build_swu_v2: enable
>  
>  build:qemu-arm-base-kernelci:
>    extends:

Thanks, applied both with the mentioned adjustment.

Jan

Jan
diff mbox series

Patch

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4f87ec3..1c6816c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,6 +25,8 @@  variables:
   dtb: none
   deploy: enable
   deploy_kernelci: disable
+  build_swu_v2: disable
+  deploy_file: wic
 
 stages:
   - build
@@ -65,7 +67,13 @@  default:
     - if [ "${encrypt}" = "enable" ]; then base_yaml="${base_yaml}:kas/opt/encrypt-partitions.yml"; fi
     - 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
+    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG} ${deploy_file}; fi
+    - if [ "${build_swu_v2}" = "enable" ]; then
+          echo "PV = \"2.0\"" >> recipes-core/images/cip-core-image-security.bb;
+          kas build ${base_yaml};
+          deploy_file="swu";
+          scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG} ${deploy_file};
+      fi
     - if [ "${deploy_kernelci}" = "enable" ]; then scripts/deploy-kernelci.py ${release} ${target} ${extension} ${dtb}; fi
 
 # base image
@@ -105,6 +113,7 @@  build:qemu-amd64-base:
     use_rt: disable
     wic_targz: disable
     targz: enable
+    build_swu_v2: enable
 
 build:qemu-amd64-base-kernelci:
   extends:
@@ -127,6 +136,7 @@  build:qemu-arm64-base:
     use_rt: disable
     wic_targz: disable
     targz: enable
+    build_swu_v2: enable
 
 build:qemu-arm64-base-kernelci:
   extends:
@@ -149,6 +159,7 @@  build:qemu-arm-base:
     use_rt: disable
     wic_targz: disable
     targz: enable
+    build_swu_v2: enable
 
 build:qemu-arm-base-kernelci:
   extends: