Fix misspelled variables

* Fix spelling of BUILD_BRANCH_FOR_IMAGE_TAG references
* Add build stream ("stable") to image tag names

Change-Id: I4ab175b665a1eaefed251a62a35bd6590caeba6a
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
This commit is contained in:
Davlet Panech 2023-02-09 09:26:59 -05:00
parent 639ee9fe40
commit 228b9f7721
3 changed files with 8 additions and 8 deletions

View File

@ -25,12 +25,12 @@ fi
# Backward compatibility for folks with old configs.
# Remove, or convert to bail/die after sufficient time has passed.
if [[ -n "BUILD_BRANCH_FOR_IMAGE_TAG" ]] ; then
BUILD_BRANCH_FOR_IMAGE_TAG="{BUILD_BRANCH/#r\//rc-}"
if [[ -z "$BUILD_BRANCH_FOR_IMAGE_TAG" ]] ; then
BUILD_BRANCH_FOR_IMAGE_TAG="${BUILD_BRANCH/#r\//rc-}"
fi
base_image_tag="${BUILD_BRANCH_FOR_IMAGE_TAG=}-$TIMESTAMP"
base_image_latest_tag="${BUILD_BRANCH_FOR_IMAGE_TAG=}-latest"
base_image_tag="${BUILD_BRANCH_FOR_IMAGE_TAG=}-${BUILD_STREAM}-$TIMESTAMP"
base_image_latest_tag="${BUILD_BRANCH_FOR_IMAGE_TAG=}-${BUILD_STREAM}-latest"
declare -a cmd=(
"./build-stx-base.sh"

View File

@ -25,8 +25,8 @@ require_job_env DOCKER_OS_LIST
# Backward compatibility for folks with old configs.
# Remove, or convert to bail/die after sufficient time has passed.
if [[ -n "BUILD_BRANCH_FOR_IMAGE_TAG" ]] ; then
BUILD_BRANCH_FOR_IMAGE_TAG="{BUILD_BRANCH/#r\//rc-}"
if [[ -z "$BUILD_BRANCH_FOR_IMAGE_TAG" ]] ; then
BUILD_BRANCH_FOR_IMAGE_TAG="${BUILD_BRANCH/#r\//rc-}"
fi
HOST_WORKSPACE="$BUILD_HOME/workspace"
@ -51,7 +51,7 @@ declare -a cmd=(
if [[ -n "$DOCKER_BASE_IMAGE" ]] ; then
cmd+=("--base=$DOCKER_BASE_IMAGE")
elif $BUILD_DOCKER_BASE_IMAGE ; then
base_image_tag="${BUILD_BRANCH_FOR_IMAGE_TAG}-$TIMESTAMP"
base_image_tag="${BUILD_BRANCH_FOR_IMAGE_TAG}-${BUILD_STREAM}-$TIMESTAMP"
docker_base_image="$DOCKER_REGISTRY_ORG/stx-$DOCKER_BASE_OS:$base_image_tag"
if [[ -n "$DOCKER_REGISTRY" ]] ; then
docker_base_image="$DOCKER_REGISTRY/$docker_base_image"

View File

@ -15,7 +15,7 @@ BUILD_BRANCH="master"
# Branch name in Docker tag compatible format. e.g. no '/' allowed
# StarlingX release branches use r/stx.8.0 so we transform that to
# rc-stx.8.0
BUILD_BRANCH_FOR_IMAGE_TAG="{BUILD_BRANCH/#r\//rc-}"
BUILD_BRANCH_FOR_IMAGE_TAG="${BUILD_BRANCH/#r\//rc-}"
# Project name, must be unique for a given BUILD_USER
PROJECT_ID="dpanech-debian"