diff mbox series

[isar-cip-core,05/11] Ignore extension argument when not set

Message ID 20211115161724.19516-6-alice.ferrazzi@miraclelinux.com (mailing list archive)
State Handled Elsewhere
Headers show
Series cip-core-image-kernelci | expand

Commit Message

Alice Ferrazzi Nov. 15, 2021, 4:17 p.m. UTC
Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
---
 scripts/deploy-kernelci.py | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

Comments

Jan Kiszka Nov. 15, 2021, 6:36 p.m. UTC | #1
Reasoning missing.

Therefore it is tricky for me to judge if this separate patch makes
sense or is better folded into an earlier one.

On 15.11.21 17:17, Alice Ferrazzi wrote:
> Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> ---
>  scripts/deploy-kernelci.py | 21 ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/deploy-kernelci.py b/scripts/deploy-kernelci.py
> index 88c09d7..c234113 100755
> --- a/scripts/deploy-kernelci.py
> +++ b/scripts/deploy-kernelci.py
> @@ -16,11 +16,18 @@ release=sys.argv[1]
>  target=sys.argv[2]
>  extension=sys.argv[3]
>  
> -rootfs_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+".tar.gz"
> -initrd_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+"-initrd.img"
> +if extension == "security":
> +    rootfs_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+".tar.gz"
> +    initrd_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+"-initrd.img"
> +elif extension == "base":
> +    rootfs_filename="cip-core-image-cip-core-"+release+"-"+target+".tar.gz"
> +    initrd_filename="cip-core-image-cip-core-"+release+"-"+target+"-initrd.img"
>  
>  # initrd is actually gz compressed
> -initrd_gz_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+"-initrd.img.gz"
> +if extension == "security":
> +    initrd_gz_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+"-initrd.img.gz"
> +elif extension == "base":
> +    initrd_gz_filename="cip-core-image-cip-core-"+release+"-"+target+"-initrd.img.gz"
>  
>  input_dir="build/tmp/deploy/images/"+target
>  upload_path="/images/rootfs/cip/"+cdate+"/"+target+"/"
> @@ -28,6 +35,14 @@ upload_path_latest="/images/rootfs/cip/latest/"+target+"/"
>  rootfs=input_dir+"/"+rootfs_filename
>  initrd=input_dir+"/"+initrd_filename
>  
> +print("arguments:")
> +print(release)
> +print(target)
> +print(extension)
> +print("filenames:")
> +print(rootfs_filename)
> +print(initrd_filename)
> +print(initrd_gz_filename)
>  print("build directory contents:")
>  print(os.listdir(input_dir))
>  
> 
Jan
diff mbox series

Patch

diff --git a/scripts/deploy-kernelci.py b/scripts/deploy-kernelci.py
index 88c09d7..c234113 100755
--- a/scripts/deploy-kernelci.py
+++ b/scripts/deploy-kernelci.py
@@ -16,11 +16,18 @@  release=sys.argv[1]
 target=sys.argv[2]
 extension=sys.argv[3]
 
-rootfs_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+".tar.gz"
-initrd_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+"-initrd.img"
+if extension == "security":
+    rootfs_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+".tar.gz"
+    initrd_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+"-initrd.img"
+elif extension == "base":
+    rootfs_filename="cip-core-image-cip-core-"+release+"-"+target+".tar.gz"
+    initrd_filename="cip-core-image-cip-core-"+release+"-"+target+"-initrd.img"
 
 # initrd is actually gz compressed
-initrd_gz_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+"-initrd.img.gz"
+if extension == "security":
+    initrd_gz_filename="cip-core-image-"+extension+"-cip-core-"+release+"-"+target+"-initrd.img.gz"
+elif extension == "base":
+    initrd_gz_filename="cip-core-image-cip-core-"+release+"-"+target+"-initrd.img.gz"
 
 input_dir="build/tmp/deploy/images/"+target
 upload_path="/images/rootfs/cip/"+cdate+"/"+target+"/"
@@ -28,6 +35,14 @@  upload_path_latest="/images/rootfs/cip/latest/"+target+"/"
 rootfs=input_dir+"/"+rootfs_filename
 initrd=input_dir+"/"+initrd_filename
 
+print("arguments:")
+print(release)
+print(target)
+print(extension)
+print("filenames:")
+print(rootfs_filename)
+print(initrd_filename)
+print(initrd_gz_filename)
 print("build directory contents:")
 print(os.listdir(input_dir))