Skip to content

Commit

Permalink
Merge pull request #3108 from gleidi-suse/product-composer-systemd-osrt
Browse files Browse the repository at this point in the history
verify-build-and-generatelists: Adjust to use --engine and --git-url for SLFO based products.
  • Loading branch information
dirkmueller committed Jun 17, 2024
2 parents 864dffa + 8673da0 commit abf142e
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions verify-build-and-generatelists
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

PROJECT=$1
LOG_DIR="/var/log/openSUSE-release-tools/${PROJECT}"
IBS_PRODUCT_PREFIX="SUSE:SLFO:Products:"
GITEA_PRODUCTS_URL="https://src.suse.de/products/"
[ ! -d "${LOG_DIR}" ] && mkdir ${LOG_DIR}


ibs_to_gitea_product() {
printf '%s' "${GITEA_PRODUCTS_URL}$(printf '%s' "${PROJECT}" | sed "s/${IBS_PRODUCT_PREFIX}//" | sed -E 's/:/\#/g')"
}


pkglistgen_extra_args() {
if [[ ${PROJECT} =~ ^${IBS_PRODUCT_PREFIX}.* ]] ; then
printf '%s' "--engine product_composer --git-url $(ibs_to_gitea_product)"
else
printf ''
fi
}

logger() {
date -Is >> ${LOG_DIR}/pkglistgen.log
echo "$1" >> ${LOG_DIR}/pkglistgen.log
}

polling_repo() {
logger "[CHECKING] Checking standard repository from ${PROJECT}"
OUTPUT=$(timeout 3m /usr/share/openSUSE-release-tools/verify-repo-built-successful.py -A ${API_URL} -p ${PROJECT} -r standard 2>&1)
OUTPUT=$(timeout 3m /usr/share/openSUSE-release-tools/verify-repo-built-successful.py -A ${API_URL} -p ${PROJECT} -r standard $(pkglistgen_extra_args) 2>&1)
RETURNCODE=$?
if [ ${RETURNCODE} -eq 0 ]; then
logger "[READY] Repository is NOT building"
Expand Down

0 comments on commit abf142e

Please sign in to comment.