Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
[content] Move fetching bundles to 'Content' stage
Browse files Browse the repository at this point in the history
Mixer step should only worry about consuming inputs prepared by the
previous stage ('Content'), so this patch formalizes that 'BUNDLES_DIR'
is the place where 'mixer.sh' is expected to find a bundle git repository
already fetched and that BUNDLE_REPO_SRC_DIR is the path inside that
folder where it can find bundle definitions files (**and only those
files**).

Signed-off-by: Murilo Belluzzo <murilo.belluzzo@intel.com>
  • Loading branch information
mbelluzzo-intel committed Nov 28, 2019
1 parent c5d70f8 commit 91c32a4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
7 changes: 7 additions & 0 deletions release/content.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ fi
log_line # Output too verbose
createrepo_c "${REPO_DIR}/x86_64/os" # TODO: log create_repo output and only print its result
log_line

section "Fetching Bundles"
if [[ -n "${BUNDLES_REPO}" ]]; then
fetch_git_repo "${BUNDLES_REPO}" "${BUNDLES_DIR}"
else
info "Local bundles not found" "'BUNDLES_REPO' is empty"
fi
24 changes: 11 additions & 13 deletions release/mixer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ if "${IS_UPSTREAM}" && [[ ${MIXER_OPTS} != *"--offline"* ]]; then
MIXER_OPTS="${MIXER_OPTS} --offline"
fi

fetch_bundles() {
log_line "Fetching bundles:"
git clone --quiet "${BUNDLES_REPO}" "${BUNDLES_DIR}"
rm -rf ./local-bundles
cp -r "${BUNDLES_DIR}/${BUNDLES_REPO_SRC_DIR}" ./local-bundles
log_line "OK!" 1
}

build_bundles() {
section "Bundles"
log_line "Updating Bundles List:"
Expand Down Expand Up @@ -218,14 +210,20 @@ fi

MCA_VERSIONS="${DS_LATEST}"

section "Preparing Mixer Content"
if [[ -z "${BUNDLES_REPO}" ]]; then
info "Custom bundles not found" "'BUNDLES_REPO' is empty"
section "Preparing Mix Content"

log_line "Checking Bundles:"
rm -rf ./local-bundles
if [[ -d "${BUNDLES_DIR}/${BUNDLES_REPO_SRC_DIR}" ]] \
&& [[ -n "$(ls -A "${BUNDLES_DIR}/${BUNDLES_REPO_SRC_DIR}")" ]]; then
cp -r "${BUNDLES_DIR}/${BUNDLES_REPO_SRC_DIR}" ./local-bundles
log_line "Bundles found. Adding it to the mix!" 1
else
fetch_bundles # Download the Downstream Bundles Repository
mkdir ./local-bundles
log_line "Bundles not found. Skipping it." 1
fi

log_line "Checking Downstream Repo:"
log_line "Checking Packages Repo:"
if [[ -n "$(ls -A "${PKGS_DIR}")" ]];then
mixer_cmd config set Mixer.LOCAL_RPM_DIR "${PKGS_DIR}"
mixer_cmd add-rpms > /dev/null
Expand Down

0 comments on commit 91c32a4

Please sign in to comment.