From c1b9401b4d32c86f90b734ad5b88b418635f1d46 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Tue, 17 May 2022 17:37:35 +0800 Subject: [PATCH] pti-rtp: update for the upload images change The project prt-rtp will change to release three ISO images, so update the upload-inf.sh for the image dir and name changes. Issue-ID: INF-285 Signed-off-by: Jackie Huang Change-Id: Idbc00178c0eacd22da083cb454e7525032cfd4ff --- jjb/pti-rtp/upload-inf.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/jjb/pti-rtp/upload-inf.sh b/jjb/pti-rtp/upload-inf.sh index 7a5d10d5..4d999448 100644 --- a/jjb/pti-rtp/upload-inf.sh +++ b/jjb/pti-rtp/upload-inf.sh @@ -52,15 +52,23 @@ mkdir -p "$repo_iso_dir_latest" "$repo_iso_dir_branch" # in build subdir: workspace/workspace_yocto/prj_output/ iso_yocto="workspace/workspace_yocto/prj_output/inf-image-yocto-aio-x86-64.iso" +# Expect Debian based ISO file: inf-image-debian-all-x86-64.iso +# in build subdir: workspace/workspace_debian/prj_output/ +iso_debian="workspace/workspace_debian/prj_output/inf-image-debian-all-x86-64.iso" + # Expect CentOS based ISO file: inf-image-centos-all-x86-64.iso # in build subdir: workspace/workspace_centos/prj_output/ iso_centos="workspace/workspace_centos/prj_output/inf-image-centos-all-x86-64.iso" -echo "INFO: copy $iso_yocto and $iso_centos to staging directory $repo_iso_dir_latest" -cp "$iso_yocto" "$iso_centos" "$repo_iso_dir_latest" - -echo "INFO: copy $iso_yocto and $iso_centos to staging directory $repo_iso_dir_branch" -cp "$iso_yocto" "$iso_centos" "$repo_iso_dir_branch" +for iso_dir in $repo_iso_dir_latest $repo_iso_dir_branch; do + echo "INFO: copy ISO images to staging directory $iso_dir" + for iso_img in $iso_yocto $iso_centos $iso_debian; do + if [[ -f $iso_img ]]; then + echo "INFO: copying $iso_img" + cp "$iso_img" "$iso_dir" + fi + done +done cmd="lftools deploy nexus $nexus_repo_url $repo_dir" echo "INFO: Upload ISO to Nexus: $cmd" -- 2.16.6