
* moved lib/ => scripts/lib/ * moved pipelines/vars => vars/ * lib/job_utils.sh: protect /home/{localdisk,loadbuild} * lib/publish_utils.sh: don't copy xattrs when publishing * pipelines/monolithic.Jenkinsfile: print BUILD_OUTPUT_HOME_URL & PUBLISH_URL at the end * pipelines/parts/*.Jenkinsfile: add missing job parameters * scripts/00_junk: deleted unused directory * scripts/{build,archive}-helm-charts.sh: don't clobber helm charts output with multiple invocations * scripts/build-docker*.sh: omit --registry if not defined * scripts/docker-login.sh: - handle empty registry (ie docker.io) - fix $DOCKER_CONFIG_FILE being absolute * scripts/print-config.sh: - also print PUBLISH_URL * scripts/record-build-status.sh: - add missing function "same_path" Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
30 lines
765 B
Bash
Executable File
30 lines
765 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
source $(dirname "$0")/lib/job_utils.sh
|
|
|
|
load_build_env
|
|
|
|
#VERBOSE_ARG="--verbose"
|
|
|
|
dir_is_empty() {
|
|
if [[ -d "$1" ]] ; then
|
|
[[ $(find "$1" -mindepth 1 -maxdepth 1 -print -quit | wc -l) -le 0 ]]
|
|
else
|
|
return 0
|
|
fi
|
|
}
|
|
|
|
if ! dir_is_empty "$BUILD_HOME/workspace/helm-charts" ; then
|
|
my_user="$(id -u)"
|
|
my_group="$(id -g)"
|
|
if [[ ! -d "$BUILD_OUTPUT_HOME/workspace/helm-charts" ]] ; then
|
|
mkdir "$BUILD_OUTPUT_HOME/workspace/helm-charts"
|
|
fi
|
|
safe_copy_dir $DRY_RUN_ARG $VERBOSE_ARG --delete --chown $my_user:$my_group \
|
|
"$BUILD_HOME/workspace/helm-charts/" \
|
|
"$BUILD_OUTPUT_HOME/workspace/helm-charts/"
|
|
|
|
notice "Helm charts archived in $BUILD_OUTPUT_HOME/workspace/helm-charts"
|
|
fi
|