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

Commit

Permalink
[content] Handle the creation of the package list
Browse files Browse the repository at this point in the history
This is to allow the use of multiple content providers. This silly first
version just concatenates all package lists found in a single file that
will be published, but already stablishes a way for content providers to
add this information.

Each content provider should create a file on
${WORK_DIR}/${PKG_LIST_TMP}<provider name> with the plain list of
packages nvr's to be consumed by this process.

In the future, we will need to address duplicates, sorting and version
mismatch to reflect the final state found on the content repo used by
mixer and published with the release.

Signed-off-by: Murilo Belluzzo <[email protected]>
  • Loading branch information
mbelluzzo-intel committed Oct 5, 2018
1 parent 0fdee7a commit ccbe6d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions globals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ MIX_INCREMENT=${MIX_INCREMENT:-10}

BUILD_FILE=build-env
PKG_LIST_FILE=packages-nvr
PKG_LIST_TMP=packages_
RELEASE_NOTES=release-notes
5 changes: 5 additions & 0 deletions release/content.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ if [[ -z "$(ls -A ${PKGS_DIR})" ]]; then
exit 0
fi

log_line "Building package list:"
# If no content providers fetched packages, this will act as 'touch'
cat ${WORK_DIR}/${PKG_LIST_TMP}* > ${WORK_DIR}/${PKG_LIST_FILE} 2>/dev/null || true
log_line "OK!" 1

section "Creating Content Repository"
pushd ${PKGS_DIR} > /dev/null
log_line
Expand Down
6 changes: 4 additions & 2 deletions release/koji.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ SCRIPT_DIR=$(dirname $(realpath ${BASH_SOURCE[0]}))
# ==============================================================================
stage "Content Provider - Koji"

pkg_list="${WORK_DIR}/${PKG_LIST_TMP}koji"

log_line "Fetching Package List:"
if result=$(koji_cmd list-tagged --latest --quiet ${KOJI_TAG}); then
awk '{print $1}' <<< ${result} > ${WORK_DIR}/${PKG_LIST_FILE}
awk '{print $1}' <<< ${result} > ${pkg_list}
else
log_line "No custom content was found." 1
exit 0
Expand All @@ -27,7 +29,7 @@ log_line "OK!" 1

section "Downloading RPMs"
pushd ${PKGS_DIR} > /dev/null
for rpm in $(cat ${WORK_DIR}/${PKG_LIST_FILE}); do
for rpm in $(cat ${pkg_list}); do
log_line "${rpm}:"
koji_cmd download-build -a x86_64 --quiet ${rpm}
log_line "OK!" 1
Expand Down

0 comments on commit ccbe6d2

Please sign in to comment.