patch-iso: Secondary ISO input
To generate the pre-patched ISO, take some content from a secondary input ISO. Specifically, all ISO content should be taken from 24.09 GA, expect for the "patches", "kickstart" and "upgrades" folders. The ostree_repo remains the same as it is, being taken from "ostree_base" Test Plan: pass - Mock pipeline Story: 2011318 Task: 51506 Depends-On: https://review.opendev.org/c/starlingx/root/+/938229 Change-Id: I3cc5151c97cf374cf04586c29f76528f83bd6658 Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
This commit is contained in:
parent
0215b0dcbc
commit
6e24ea853b
@ -43,6 +43,12 @@ pipeline {
|
||||
booleanParam(
|
||||
name: 'DRY_RUN'
|
||||
)
|
||||
string(
|
||||
name: 'REMOTE_SERVER'
|
||||
)
|
||||
string(
|
||||
name: 'REMOTE_BUILD_HOME'
|
||||
)
|
||||
string(
|
||||
name: 'BUILD_HOME'
|
||||
)
|
||||
|
@ -17,6 +17,8 @@ load_build_env
|
||||
|
||||
require_job_env SIGNING_SERVER
|
||||
require_job_env SIGNING_USER
|
||||
require_job_env REMOTE_BUILD_HOME
|
||||
require_job_env REMOTE_SERVER
|
||||
require_job_env BUILD_HOME
|
||||
|
||||
declare_job_env MY_REPO "$REPO_ROOT/cgcs-root"
|
||||
@ -31,13 +33,29 @@ PATCHES_LIST=$(find $FULL_PATH_PATCH_OUTPUT -type f -name "*.patch" -printf '%f\
|
||||
# Prepare the patches list to be used in lat container, adding -p prefix and the path
|
||||
PATCHES_FLAG=$(printf '%s\n' ${PATCHES_LIST[*]} | xargs -I {} echo "-p ${DEFAULT_PATCH_OUTPUT}{}")
|
||||
|
||||
# We use the iso generated by build-iso step
|
||||
ISO_BASE="/localdisk/deploy/starlingx-intel-x86-64-cd.iso"
|
||||
# Base ISO
|
||||
# We collect the iso from the remote build home to be used as base
|
||||
REMOTE_ISO="${REMOTE_SERVER}/${REMOTE_BUILD_HOME}/localdisk/deploy/starlingx-intel-x86-64-cd.iso"
|
||||
curl -L ${REMOTE_ISO} --output ${BUILD_HOME}/localdisk/starlingx-base.iso
|
||||
BASE_ISO="/localdisk/starlingx-base.iso"
|
||||
|
||||
# Secondary ISO
|
||||
# And use the iso generated by build-iso step as a secondary source
|
||||
SECONDARY_ISO="/localdisk/deploy/starlingx-intel-x86-64-cd.iso"
|
||||
|
||||
# We need these contents from the secondary ISO
|
||||
SECONDARY_CONTENT=" -sc kickstart -sc patches -sc upgrades "
|
||||
|
||||
|
||||
# Create pre-patched ISO
|
||||
stx_docker_cmd ${DRY_RUN_ARG} "--container=lat" "create-prepatched-iso -i ${ISO_BASE} \
|
||||
stx_docker_cmd ${DRY_RUN_ARG} "--container=lat" "create-prepatched-iso.py \
|
||||
-i ${BASE_ISO} \
|
||||
-b /localdisk/deploy/ostree_base \
|
||||
${PATCHES_FLAG[*]} -o /localdisk/deploy/${PREPATCHED_NAME}"
|
||||
${PATCHES_FLAG[*]} \
|
||||
-o /localdisk/deploy/${PREPATCHED_NAME} \
|
||||
-si ${SECONDARY_ISO} \
|
||||
${SECONDARY_CONTENT} \
|
||||
-v"
|
||||
|
||||
if ! $DRY_RUN ; then
|
||||
(
|
||||
|
Loading…
x
Reference in New Issue
Block a user