
This patch creates or updates the symlink "latest_iso_build" in the archive and publish areas, immediately after the ISO build succeeds, but before the other stages (docker images etc). This allows external users to reference that path to download the latest ISO, even if the overall build had failed due to docker image build errors. TESTS ================================================ Run a build where on of the docker images fails to compile Make sure the new ISO build symlink gets created, even though the overall build fails. Story: 2010226 Task: 47978 Signed-off-by: Davlet Panech <davlet.panech@windriver.com> Change-Id: Idd57b4e0bbe0f231f83304a600496a48a71fba9f
31 lines
598 B
Bash
Executable File
31 lines
598 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#
|
|
# Copyright (c) 2022 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
set -e
|
|
source $(dirname "$0")/lib/job_utils.sh
|
|
|
|
require_job_env BUILD_STATUS
|
|
|
|
load_build_env
|
|
|
|
if $DRY_RUN ; then
|
|
bail "DRY_RUN=true, bailing out..."
|
|
fi
|
|
|
|
set -x
|
|
|
|
if [[ "$BUILD_STATUS" == "success" ]] ; then
|
|
ln -sfn "$TIMESTAMP" "$BUILD_OUTPUT_ROOT/latest_iso_build"
|
|
|
|
if [[ -d "$PUBLISH_ROOT/$PUBLISH_TIMESTAMP" ]] ; then
|
|
if ! same_path "$BUILD_OUTPUT_ROOT" "$PUBLISH_ROOT" ; then
|
|
ln -sfn "$PUBLISH_TIMESTAMP" "$PUBLISH_ROOT/latest_iso_build"
|
|
fi
|
|
fi
|
|
fi
|