
Currently errors in docker image builds fail the entire build. Docker images are in flux, and are likely to cause every build to fail. Workaround: don't fail the main build if some docker images failed (but print out a warning in Jenkins log). Changes: - Ignore docker image build errors with a warning - Misc changes to scripts to make sure various steps happen in the right order Story: 2010226 Task: 46146 Signed-off-by: Davlet Panech <davlet.panech@windriver.com> Change-Id: Ib8869ce263731f7bce3157890c303ec5cec59fde
43 lines
960 B
Bash
Executable File
43 lines
960 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_env BUILD_STATUS
|
|
|
|
load_build_env
|
|
|
|
if $DRY_RUN ; then
|
|
bail "DRY_RUN=true, bailing out..."
|
|
fi
|
|
|
|
set -x
|
|
|
|
touch "$BUILD_OUTPUT_HOME/FAIL"
|
|
|
|
ARCHIVE_ROOT=$(dirname "$BUILD_OUTPUT_HOME")
|
|
|
|
if [[ "$BUILD_STATUS" == "success" ]] ; then
|
|
ARCHIVE_ROOT=$(dirname "$BUILD_OUTPUT_HOME")
|
|
link_target=$(basename "$BUILD_OUTPUT_HOME")
|
|
cp "$BUILD_OUTPUT_HOME/LAST_COMMITS" "$ARCHIVE_ROOT/"
|
|
ln -sfn "$link_target" "$ARCHIVE_ROOT/latest_build"
|
|
|
|
rm -f "$BUILD_OUTPUT_HOME/FAIL"
|
|
touch "$BUILD_OUTPUT_HOME/SUCCESS"
|
|
|
|
if [[ -d "$PUBLISH_ROOT/$TIMESTAMP" ]] ; then
|
|
mkdir -p "$PUBLISH_DIR/outputs"
|
|
touch "$PUBLISH_DIR/outputs/Success"
|
|
if ! same_path "$ARCHIVE_ROOT" "$PUBLISH_ROOT" ; then
|
|
ln -sfn "$link_target" "$PUBLISH_ROOT/latest_build"
|
|
fi
|
|
fi
|
|
fi
|