mockbuild: reuse nightly repos from redhat.repo
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
c25e58bc9d
commit
0737136bc8
1 changed files with 5 additions and 3 deletions
|
|
@ -87,12 +87,14 @@ greenprint "🧬 Using mock config: ${MOCK_CONFIG}"
|
|||
greenprint "📦 SHA: ${COMMIT}"
|
||||
greenprint "📤 RPMS will be uploaded to: ${REPO_URL}"
|
||||
|
||||
if [[ $VERSION_ID == 8.5 ]]; then
|
||||
greenprint "📋 Updating RHEL 8 mock template for unsubscribed image"
|
||||
if [[ "$ID" == rhel && ${VERSION_ID%.*} == 8 ]] && ! sudo subscription-manager status; then
|
||||
greenprint "📋 Updating RHEL 8 mock template with the latest nightly repositories"
|
||||
# strip everything after line with # repos
|
||||
sudo sed -i '/# repos/q' /etc/mock/templates/rhel-8.tpl
|
||||
# remove the subscription check
|
||||
sudo sed -i "s/config_opts\['redhat_subscription_required'\] = True/config_opts['redhat_subscription_required'] = False/" /etc/mock/templates/rhel-8.tpl
|
||||
cat "$RHEL85_NIGHTLY_REPO" | sudo tee -a /etc/mock/templates/rhel-8.tpl > /dev/null
|
||||
# reuse redhat.repo
|
||||
cat /etc/yum.repos.d/rhel8internal.repo | sudo tee -a /etc/mock/templates/rhel-8.tpl > /dev/null
|
||||
# We need triple quotes at the end of the template to mark the end of the repo list.
|
||||
echo '"""' | sudo tee -a /etc/mock/templates/rhel-8.tpl
|
||||
elif [[ $VERSION_ID == 9.0 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue