
* 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>
53 lines
1.7 KiB
Bash
Executable File
53 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
source $(dirname "$0")/lib/job_utils.sh || exit 1
|
|
source $(dirname "$0")/lib/publish_utils.sh || exit 1
|
|
|
|
load_build_env || exit 1
|
|
|
|
if $DRY_RUN ; then
|
|
bail "DRY_RUN=false is not supported, bailing out"
|
|
fi
|
|
|
|
TEMP_DIR="$BUILD_OUTPUT_HOME/tmp"
|
|
mkdir -p "$TEMP_DIR" || exit 1
|
|
|
|
checksum_files_list_file="$TEMP_DIR/published_iso_checksum_files"
|
|
find_checksum_files "${PUBLISH_SUBDIR}/outputs/std/iso" \
|
|
"${PUBLISH_SUBDIR}/outputs/rt/iso" \
|
|
"${PUBLISH_SUBDIR}/outputs/iso" \
|
|
>"$checksum_files_list_file" || exit 1
|
|
|
|
dst_dir="${PUBLISH_DIR}/outputs/iso"
|
|
checksum_file="$dst_dir/$CHECKSUMS_FILENAME"
|
|
regfile_list_file="$TEMP_DIR/iso_files"
|
|
|
|
src_dir="$BUILD_OUTPUT_HOME/localdisk/deploy"
|
|
abs_src_dir="$(readlink -e "$src_dir")" || continue
|
|
|
|
rm -rf --one-file-system "$dst_dir" || exit 1
|
|
rm -f "$regile_list_file"
|
|
|
|
find "$src_dir" -xtype f -name 'starlingx*.iso' | sort | {
|
|
declare -a reg_files
|
|
while read iso_filename ; do
|
|
for filename in "$iso_filename" "${iso_filename%.iso}.sig" ; do
|
|
real_filename="$(readlink -e "$filename")" || continue
|
|
if ! in_list "$real_filename" "${reg_files[@]}" ; then
|
|
mkdir -p "$dst_dir" || exit 1
|
|
publish_file "$real_filename" "$dst_dir" "$checksum_files_list_file" >>"$checksum_file" || exit 1
|
|
reg_files+=("$real_filename")
|
|
fi
|
|
if [[ -L "$filename" ]] ; then
|
|
dst_link_target="$(basename "$real_filename")"
|
|
dst_link="$dst_dir/$(basename "$filename")"
|
|
ln -s -f -n "$dst_link_target" "$dst_link" || exit 1
|
|
echo "SYMLINK $dst_link" || exit 1
|
|
fi
|
|
done
|
|
done
|
|
}
|
|
check_pipe_status || exit 1
|
|
|
|
|