pti-rtp: update for the upload images change 04/8404/1
authorJackie Huang <jackie.huang@windriver.com>
Tue, 17 May 2022 09:37:35 +0000 (17:37 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Wed, 25 May 2022 01:24:24 +0000 (09:24 +0800)
The project prt-rtp will change to release two ISO images,
so update the upload.sh for the image dir and name changes.
And we also want to upload the images to a dir based on
the gerrit branch name, so add stream for branch master
and f-release.

Issue-ID: INF-274

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: Idd20f3c81331f0dffafc871eea33692f09852acf

jjb/pti-rtp/pti-rtp.yaml
jjb/pti-rtp/upload-inf.sh

index 4991caa..58181a4 100644 (file)
@@ -62,3 +62,8 @@
         - upload-inf.sh
     jobs:
       - oran-shell-release
+    stream:
+      - master:
+          branch: master
+      - f-release:
+          branch: f-release
index afcdd26..4482691 100644 (file)
@@ -38,17 +38,24 @@ nexus_repo_url="$NEXUS_URL/content/sites/$nexus_repo_id"
 echo "INFO: upload to $nexus_repo_url"
 
 repo_dir="$WORKSPACE/nexus/$nexus_repo_id"
-# TODO: get build or version string; use latest for now
-repo_iso_dir="$repo_dir/org/o-ran-sc/pti/rtp/latest"
-echo "INFO: create staging directory $repo_iso_dir"
-mkdir -p "$repo_iso_dir"
-
-# Expect ISO file: oran-image-inf-host-intel-x86-64.iso
-# in build subdir: workspace/prj_oran-inf/tmp-glibc/deploy/images/intel-x86-64/
-#iso="workspace/prj_oran-inf/tmp-glibc/deploy/images/intel-x86-64/oran-image-inf-host-intel-x86-64.iso"
-iso="workspace/prj_oran_inf_anaconda/tmp-glibc/deploy/images/intel-corei7-64/inf-image-aio-installer-intel-corei7-64.iso"
-echo "INFO: copy $iso to staging directory $repo_iso_dir"
-cp "$iso" "$repo_iso_dir"
+repo_iso_dir_latest="$repo_dir/org/o-ran-sc/pti/rtp/latest"
+repo_iso_dir_branch="$repo_dir/org/o-ran-sc/pti/rtp/$GERRIT_BRANCH"
+echo "INFO: create staging directory $repo_iso_dir_latest and $repo_iso_dir_branch"
+mkdir -p "$repo_iso_dir_latest" "$repo_iso_dir_branch"
+
+# Expect Yocto based ISO file: inf-image-yocto-aio-x86-64.iso
+# in build subdir: workspace/workspace_yocto/prj_output/
+iso_yocto="workspace/workspace_yocto/prj_output/inf-image-yocto-aio-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"
 
 cmd="lftools deploy nexus $nexus_repo_url $repo_dir"
 echo "INFO: Upload ISO to Nexus: $cmd"