tests: Refresh COMPOSE_ID file if COMPOSE_URL was defined from ENV

This commit is contained in:
Aleksandar Todorov 2021-03-15 10:17:01 +02:00 committed by Alexander Todorov
parent 60e12212c5
commit 0716c32e97

View file

@ -10,10 +10,15 @@ ARCH=$(uname -m)
curl -L http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.4/COMPOSE_ID > COMPOSE_ID
COMPOSE_ID=$(cat COMPOSE_ID)
# default to a nightly tree but respect values passed from ENV so we can test rel-eng
# composes as well
COMPOSE_URL="${COMPOSE_URL:-http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/$COMPOSE_ID}"
# in case COMPOSE_URL was defined from the outside refresh COMPOSE_ID file,
# used for telegram messages in case of success/failure
curl -L "$COMPOSE_URL" > COMPOSE_ID
# Create a repository file for installing the osbuild-composer RPMs
greenprint "📜 Generating dnf repository file"
tee rhel8internal.repo << EOF