#!/bin/bash # # Copyright (c) 2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # set -e source $(dirname "$0")/lib/job_utils.sh load_build_env $DRY_RUN && bail "DRY_RUN not supported, bailing out" || : helm_dir="$BUILD_OUTPUT_HOME/$WORKSPACE_ROOT_SUBDIR/helm-charts" src_dir="$BUILD_OUTPUT_HOME/$WORKSPACE_ROOT_SUBDIR/helm-charts/stx" dst_dir="$PUBLISH_DIR/outputs/helm-charts" extra_lst="$src_dir/extra-helm-charts.lst" files="$( if [[ -d "$src_dir" ]] ; then find "$src_dir" -mindepth 1 -maxdepth 1 -xtype f -name "*.tgz" || exit 1 fi )" if [[ -n "$files" ]] ; then notice "copying helm charts to $dst_dir" mkdir -p "$dst_dir" echo "$files" | xargs -r \cp --force --no-dereference --preserve=mode,timestamps,links -t "$dst_dir" fi #Check for oututs of extra helm charts build if [[ -f "$extra_lst" ]] ; then while IFS= read -r "file"; do file_path="$helm_dir/$file" if [[ -f "$file_path" ]] ; then echo "copying $file to $dst_dir" \cp --force --no-dereference --preserve=mode,timestamps,links -t "$dst_dir" "$file_path" else echo "$file not found" fi done < "$extra_lst" else echo "No files found from extra helm build " fi