[tests] Update download server URLs in tests
It's not possible anymore to use latest-RHEL-$major in the URLs, it's necessary to also supply the minor version for rel-eng composes. Also the URL structure had to be updated due to changes on the download servers. Related: rhbz#1828808
This commit is contained in:
parent
3e985d60ca
commit
7a3916d09e
@ -8,13 +8,14 @@ yum -y remove lorax lorax-composer composer-cli
|
|||||||
|
|
||||||
LATEST_REPO="/etc/yum.repos.d/rhel7-rel-eng-latest.repo"
|
LATEST_REPO="/etc/yum.repos.d/rhel7-rel-eng-latest.repo"
|
||||||
if [ ! -f "$LATEST_REPO" ]; then
|
if [ ! -f "$LATEST_REPO" ]; then
|
||||||
|
RHEL_VERSION=$(. /etc/os-release; echo $VERSION_ID)
|
||||||
cat > $LATEST_REPO << __EOF__
|
cat > $LATEST_REPO << __EOF__
|
||||||
[rhel7-rel-eng-latest]
|
[rhel7-rel-eng-latest]
|
||||||
gpgcheck=0
|
gpgcheck=0
|
||||||
enabled=1
|
enabled=1
|
||||||
skip_if_unavailable=0
|
skip_if_unavailable=0
|
||||||
name=rhel7-rel-eng-latest
|
name=rhel7-rel-eng-latest
|
||||||
baseurl=http://download-node-02.eng.bos.redhat.com/rhel-7/rel-eng/latest-RHEL-7/compose/Server/\$basearch/os/
|
baseurl=http://download.devel.redhat.com/rhel-7/rel-eng/RHEL-7/latest-RHEL-$RHEL_VERSION/compose/Server/\$basearch/os/
|
||||||
__EOF__
|
__EOF__
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -16,15 +16,17 @@ CLI="${CLI:-./src/bin/composer-cli}"
|
|||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
rlPhaseStartSetup
|
rlPhaseStartSetup
|
||||||
if grep -qE "https?://.*/nightly/" /etc/yum.repos.d/*; then
|
|
||||||
RELEASE_TYPE="nightly"
|
|
||||||
else
|
|
||||||
RELEASE_TYPE="rel-eng"
|
|
||||||
fi
|
|
||||||
|
|
||||||
OPTIONAL_REPO="/etc/yum.repos.d/rhel7-${RELEASE_TYPE}-optional.repo"
|
|
||||||
|
|
||||||
if [ ! -f "$OPTIONAL_REPO" ]; then
|
if [ ! -f "$OPTIONAL_REPO" ]; then
|
||||||
|
RHEL_VERSION=$(. /etc/os-release; echo $VERSION_ID)
|
||||||
|
if grep -qE "https?://.*/nightly/" /etc/yum.repos.d/*; then
|
||||||
|
RELEASE_TYPE="nightly"
|
||||||
|
# there are only -latest symlinks with major version for nightlies
|
||||||
|
RHEL_VERSION=7
|
||||||
|
else
|
||||||
|
RELEASE_TYPE="rel-eng"
|
||||||
|
fi
|
||||||
|
OPTIONAL_REPO="/etc/yum.repos.d/rhel7-${RELEASE_TYPE}-optional.repo"
|
||||||
|
|
||||||
composer_stop
|
composer_stop
|
||||||
cat > $OPTIONAL_REPO << __EOF__
|
cat > $OPTIONAL_REPO << __EOF__
|
||||||
[rhel7-${RELEASE_TYPE}-optional]
|
[rhel7-${RELEASE_TYPE}-optional]
|
||||||
@ -32,7 +34,7 @@ gpgcheck=0
|
|||||||
enabled=1
|
enabled=1
|
||||||
skip_if_unavailable=0
|
skip_if_unavailable=0
|
||||||
name=rhel7-${RELEASE_TYPE}-optional
|
name=rhel7-${RELEASE_TYPE}-optional
|
||||||
baseurl=http://download-node-02.eng.bos.redhat.com/rhel-7/$RELEASE_TYPE/latest-RHEL-7/compose/Server-optional/\$basearch/os/
|
baseurl=http://download.devel.redhat.com/rhel-7/$RELEASE_TYPE/RHEL-7/latest-RHEL-$RHEL_VERSION/compose/Server-optional/\$basearch/os/
|
||||||
__EOF__
|
__EOF__
|
||||||
composer_start
|
composer_start
|
||||||
fi
|
fi
|
||||||
|
@ -34,19 +34,20 @@ rlJournalStart
|
|||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "Run lorax-composer with --no-system-repos and manually created content in repos.d"
|
rlPhaseStartTest "Run lorax-composer with --no-system-repos and manually created content in repos.d"
|
||||||
echo '[server]
|
RHEL_VERSION=$(. /etc/os-release; echo $VERSION_ID)
|
||||||
|
echo "[server]
|
||||||
name=Server
|
name=Server
|
||||||
baseurl=http://download.devel.redhat.com/rhel-7/nightly/RHEL-7/latest-RHEL-7/compose/Server/$basearch/os/
|
baseurl=http://download.devel.redhat.com/rhel-7/nightly/RHEL-7/latest-RHEL-$RHEL_VERSION/compose/Server/\$basearch/os/
|
||||||
enabled=1
|
enabled=1
|
||||||
gpgcheck=0
|
gpgcheck=0
|
||||||
|
|
||||||
[server-optional]
|
[server-optional]
|
||||||
name=Server-optional
|
name=Server-optional
|
||||||
baseurl=http://download.devel.redhat.com/rhel-7/nightly/RHEL-7/latest-RHEL-7/compose/Server-optional/$basearch/os/
|
baseurl=http://download.devel.redhat.com/rhel-7/nightly/RHEL-7/latest-RHEL-$RHEL_VERSION/compose/Server-optional/\$basearch/os/
|
||||||
enabled=1
|
enabled=1
|
||||||
gpgcheck=0
|
gpgcheck=0
|
||||||
|
|
||||||
' > /var/lib/lorax/composer/repos.d/test.repo
|
" > /var/lib/lorax/composer/repos.d/test.repo
|
||||||
|
|
||||||
composer_start --no-system-repos
|
composer_start --no-system-repos
|
||||||
present_repos=$(ls /var/lib/lorax/composer/repos.d/)
|
present_repos=$(ls /var/lib/lorax/composer/repos.d/)
|
||||||
|
Loading…
Reference in New Issue
Block a user