
This step was missed when we created these scripts for Debian. Story: 2010226 Task: 48670 Change-Id: I73f90b5a018fc32b39ab6d265acfbbb7fc275415 Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
47 lines
1.4 KiB
Bash
Executable File
47 lines
1.4 KiB
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
|
|
load_build_env
|
|
require_job_env DOCKER_BASE_OS
|
|
require_job_env BUILD_STREAM stable
|
|
|
|
PLATFORM_IMAGE="stx-platformclients"
|
|
APPLICATION_IMAGE="stx-openstackclients"
|
|
|
|
notice "building remote CLI tarball"
|
|
|
|
# Usage: filter_image IMAGE_NAME LIST_FILE
|
|
filter_image() {
|
|
\grep --no-filename -E "^([^#].*/)*$1:" "$2" | tail -n 1
|
|
}
|
|
|
|
# Find images we built during this run
|
|
full_platform_image=
|
|
full_application_image=
|
|
if [[ -f "$WORKSPACE_ROOT/std/build-images/images-debian-stable-versioned.lst" ]] ; then
|
|
full_platform_image=$(filter_image "$PLATFORM_IMAGE" "$WORKSPACE_ROOT/std/build-images/images-debian-stable-versioned.lst")
|
|
full_application_image=$(filter_image "$APPLICATION_IMAGE" "$WORKSPACE_ROOT/std/build-images/images-debian-stable-versioned.lst")
|
|
fi
|
|
|
|
build_args=
|
|
if [[ "$full_platform_image" ]] ; then
|
|
build_args+=" --platform-image $full_platform_image"
|
|
else
|
|
warn "docker image $PLATFORM_IMAGE not built, using default"
|
|
fi
|
|
if [[ "$full_application_image" ]] ; then
|
|
build_args+=" --application-image $full_application_image"
|
|
else
|
|
warn "docker image $APPLICATION_IMAGE not built, using default"
|
|
fi
|
|
|
|
# Creates $MY_WORKSPACE/std/build-remote-cli/*.tgz
|
|
stx_docker_cmd $DRY_RUN_ARG "\$MY_REPO/build-tools/build-remote-cli.sh $build_args"
|