Skip to content

Commit

Permalink
feat(test): Adding script to install from copr/packit build for downs…
Browse files Browse the repository at this point in the history
…tream PR jobs
  • Loading branch information
Lorquas authored and jirihnidek committed Jun 27, 2024
1 parent cd964ef commit 4f34f20
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions systemtest/copr-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/bash -eux
dnf install -y dnf-plugins-core

#Determine the repo needed from copr
#Available repositories: 'centos-stream-8-x86_64', 'rhel-8-x86_64',
# 'centos-stream-9-x86_64', 'rhel-9-x86_64', 'fedora-40-x86_64',
# 'fedora-39-x86_64', 'fedora-rawhide-x86_64'
source /etc/os-release
if [ "$ID" == "centos" ]; then
ID='centos-stream'
fi
VERSION_MAJOR=$(echo ${VERSION_ID} | cut -d '.' -f 1)
COPR_REPO="${ID}-${VERSION_MAJOR}-$(uname -m)"

#get yggdrasil
curl https://copr.fedorainfracloud.org/coprs/g/yggdrasil/latest/repo/$ID-$VERSION_MAJOR/group_yggdrasil-latest-$ID-$VERSION_MAJOR.repo \
-o /etc/yum.repos.d/yggdrasil.repo

dnf install -y yggdrasil yggdrasil-worker-package-manager --disablerepo=* --enablerepo=*yggdrasil*

# These PR packit builds have an older version number for some reason than the released...
dnf remove -y rhc
dnf copr -y enable packit/RedHatInsights-rhc-${ghprbPullId} ${COPR_REPO}
dnf install -y rhc --disablerepo=* --enablerepo=*rhc*
4 changes: 4 additions & 0 deletions systemtest/tests/integration/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ set -x
# get to project root
cd ../../../

# Check for GitHub pull request ID and install build if needed.
# This is for the downstream PR jobs.
[ -z "${ghprbPullId+x}" ] || ./systemtest/copr-setup.sh

dnf --setopt install_weak_deps=False install -y \
podman git-core python3-pip python3-pytest logrotate

Expand Down

0 comments on commit 4f34f20

Please sign in to comment.