[2.0] Use Toolchain RPMS when building Golden Container (#10473)
This commit is contained in:
Родитель
85a79aff0e
Коммит
9e01ea9ebe
|
@ -57,7 +57,7 @@ set -e
|
|||
# -j OUTPUT -k ./rpms.tar.gz -l ~/CBL-Mariner/.pipelines/containerSourceData \
|
||||
# -m "false" -n "false" -p development -q "false" -u "true"
|
||||
|
||||
while getopts ":a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:" OPTIONS; do
|
||||
while getopts ":a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:w:" OPTIONS; do
|
||||
case ${OPTIONS} in
|
||||
a ) BASE_IMAGE_NAME_FULL=$OPTARG;;
|
||||
b ) ACR=$OPTARG;;
|
||||
|
@ -81,6 +81,7 @@ while getopts ":a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:" OPTIONS; do
|
|||
t ) SBOM_SCRIPT=$OPTARG;;
|
||||
u ) DISTROLESS=$OPTARG;;
|
||||
v ) VERSION_EXTRACT_CMD=$OPTARG;;
|
||||
w ) TOOLCHAIN_RPMS_TARBALL=$OPTARG;;
|
||||
|
||||
\? )
|
||||
echo "Error - Invalid Option: -$OPTARG" 1>&2
|
||||
|
@ -124,6 +125,7 @@ function print_inputs {
|
|||
echo "SBOM_TOOL_PATH -> $SBOM_TOOL_PATH"
|
||||
echo "SBOM_SCRIPT -> $SBOM_SCRIPT"
|
||||
echo "DISTROLESS -> $DISTROLESS"
|
||||
echo "TOOLCHAIN_RPMS_TARBALL -> $TOOLCHAIN_RPMS_TARBALL"
|
||||
}
|
||||
|
||||
function validate_inputs {
|
||||
|
@ -167,6 +169,11 @@ function validate_inputs {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f $TOOLCHAIN_RPMS_TARBALL ]]; then
|
||||
echo "Error - No TOOLCHAIN_RPMS_TARBALL tarball found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$CONTAINER_SRC_DIR" ]; then
|
||||
echo "Error - Container source directory does not exist."
|
||||
exit 1
|
||||
|
@ -262,6 +269,7 @@ function prepare_docker_directory {
|
|||
|
||||
# Copy files into docker context directory
|
||||
tar -xf "$RPMS_TARBALL" -C "$HOST_MOUNTED_DIR"/
|
||||
tar -xf "$TOOLCHAIN_RPMS_TARBALL" -C "$HOST_MOUNTED_DIR/RPMS"/
|
||||
cp -v "$CONTAINER_SRC_DIR/marinerLocalRepo.repo" "$HOST_MOUNTED_DIR"/
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче