root/build-tools/wheel-utils.sh
Scott Little e3460d7d11 Enable build of docker images, charts and wheels from a layered build
1) create merged wheels.inc file(s) as part of build-pkgs.
These files can be published by CENGN layer builds, and
be referenced by the 'container' layer build.

2) get-stx-wheels.sh needs to find wheels.inc files from
lower layer builds.  The will be fould under
${MY_REPO}/cgcs-centos-repo/layer_wheels_inc.

3) build-helm-charts.sh must now also search for helm
rpms under ${MY_REPO}/cgcs-centos-repo/Binary/noarch
for chart packages built by lower layers.

Story: 2006166
Task: 38979
Depends-On: https://review.opendev.org/711773
Depends-On: https://review.opendev.org/711774
Change-Id: I91650d3e1746a45c8ac118cca58e9b64f30c5b72
Signed-off-by: Scott Little <scott.little@windriver.com>
2020-04-08 13:58:41 -04:00

37 lines
798 B
Bash
Executable File

#
# Copyright (c) 2020 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# A place for any functions related to wheels.inc files
#
WHEEL_UTILS_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
source "${WHEEL_UTILS_DIR}/git-utils.sh"
#
# wheels_inc_list <stream> <distro> [<layer>]
#
# Parameters:
# stream: One of 'stable', 'dev'
# distro: One of 'centos', ...
#
# Returns: A list of unique rpm packages that contain needed wheel
# files. This is the union per git wheels.inc files.
wheels_inc_list () {
local stream=$1
local distro=$2
local search_target=${distro}_${stream}_wheels.inc
(
for d in $GIT_LIST; do
find $d/ -maxdepth 1 -name "${search_target}" -exec grep '^[^#]' {} +
done
) | sort --unique
}