This is an automated email from the ASF dual-hosted git repository.

djwang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry-pxf.git

commit b22fc99453d7e6b51054087f30f5126109df3349
Author: Ashuka Xue <[email protected]>
AuthorDate: Thu Sep 15 15:21:14 2022 -0700

    ci: allow existing artifacts to remain if there is no pivnet product (#868)
    
    In the case that there is no pivnet artifact to pull down, do not error
    out. Instead, keep whatever artifact was already present in the bucket.
---
 concourse/scripts/get_product_files.bash | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/concourse/scripts/get_product_files.bash 
b/concourse/scripts/get_product_files.bash
index 361975f3..4c1e233a 100755
--- a/concourse/scripts/get_product_files.bash
+++ b/concourse/scripts/get_product_files.bash
@@ -68,12 +68,18 @@ for ((i = 0; i < ${#product_files[@]}; i++)); do
 
        if [[ -z "${id}" ]]; then
                echo "Did not find '${file}' in product files for GPDB 
'${gpdb_version}'"
-               os_regex='^.*rhel8.*$'
-               if [[ $file =~ ${os_regex} ]]; then
-                       echo "RHEL 8 artifact unavailable for the given GPDB 
version. Keeping existing rpm: $(find ${product_dirs[$i]}/ -name *rhel8*.rpm)"
-                       continue
-               fi
-               exit 1
+
+               case "${file}" in
+                       *rhel7*) existing_file="$(find ${product_dirs[$i]}/ 
-name *rhel7*.rpm)" ;;
+                       *rhel8*) existing_file="$(find ${product_dirs[$i]}/ 
-name *rhel8*.rpm)" ;;
+                       *ubuntu18*) existing_file="$(find ${product_dirs[$i]}/ 
-name *ubuntu18*.deb)" ;;
+                       *)
+                               echo "Unexpected file: ${file}"
+                               exit 1;;
+               esac
+
+               echo "Keeping existing file: ${existing_file}"
+               continue
        fi
        echo "Cleaning ${product_dirs[$i]} and downloading ${file} with id 
${id} to ${product_dirs[$i]}..."
        rm -f "${product_dirs[$i]}"/*.{rpm,deb}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to