schutzbot: use predictable dnf repo
Now that osbuild and osbuild-composer use predictable destinations for their dnf repositories, those can be used and auto-generated from the environment and a specific git commit (identified by the hash). This will make updating easier, because the only thing we need to change is the commit hash. For osbuild-composer the latest release is used, for osbuild the predictable repos were introduced after the latest release, so the commit that introduced the feature is used.
This commit is contained in:
parent
d7bfaee189
commit
00cffce22f
3 changed files with 25 additions and 16 deletions
|
|
@ -18,8 +18,14 @@ function retry {
|
|||
return 0
|
||||
}
|
||||
|
||||
# Variables for where to find osbuild-composer RPMs to test against
|
||||
DNF_REPO_BASEURL=http://osbuild-composer-repos.s3-website.us-east-2.amazonaws.com
|
||||
OSBUILD_COMMIT=f5bfb22355befeddfc4f313b753f81fe919b8e98 # main as of Sun Nov 15 11:10:09 2020
|
||||
OSBUILD_COMPOSER_COMMIT=692a8076bb4bf38dae05ce99631ebcdd3f0ab054 # release 24
|
||||
|
||||
# Get OS details.
|
||||
source /etc/os-release
|
||||
ARCH=$(uname -m)
|
||||
|
||||
# Koji is only available in EPEL for RHEL.
|
||||
if [[ $ID == rhel ]] && ! rpm -q epel-release; then
|
||||
|
|
@ -58,8 +64,25 @@ cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null
|
|||
|
||||
# Set up a dnf repository for the RPMs we built via mock.
|
||||
sudo cp mock.repo /etc/yum.repos.d/
|
||||
# Add any overlay repos
|
||||
sudo cp schutzbot/repos/${ID}/${VERSION_ID}/* /etc/yum.repos.d/
|
||||
|
||||
# Set up dnf repositories with the RPMs we want to test
|
||||
sudo tee /etc/yum.repos.d/osbuild.repo << EOF
|
||||
[osbuild]
|
||||
name=osbuild ${GIT_COMMIT}
|
||||
baseurl=${DNF_REPO_BASEURL}/osbuild/${ID}-${VERSION_ID}/${ARCH}/${OSBUILD_COMMIT}
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
# Default dnf repo priority is 99. Lower number means higher priority.
|
||||
priority=5
|
||||
|
||||
[osbuild-composer]
|
||||
name=osbuild-composer ${OSBUILD_COMPOSER_COMMIT}
|
||||
baseurl=${DNF_REPO_BASEURL}/osbuild-composer/${ID}-${VERSION_ID}/${ARCH}/${OSBUILD_COMPOSER_COMMIT}
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
# Give this a slightly lower priority, because we used to have osbuild in this repo as well.
|
||||
priority=10
|
||||
EOF
|
||||
|
||||
# Install the Image Builder packages and the koji cli plugin.
|
||||
retry sudo dnf -y install osbuild-composer koji-osbuild-cli
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
[osbuild-mock]
|
||||
name=osbuild mock osbuild/osbuild-composer/master-1da61a4 fedora32
|
||||
baseurl=http://osbuild-composer-repos.s3-website.us-east-2.amazonaws.com/osbuild/osbuild-composer/master/1da61a4/fedora32_x86_64
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
# Default dnf repo priority is 99. Lower number means higher priority.
|
||||
priority=5
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[osbuild-mock]
|
||||
name=osbuild mock osbuild/osbuild-composer/master-1da61a4 rhel83
|
||||
baseurl=http://osbuild-composer-repos.s3-website.us-east-2.amazonaws.com/osbuild/osbuild-composer/master/1da61a4/rhel83_x86_64
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
# Default dnf repo priority is 99. Lower number means higher priority.
|
||||
priority=5
|
||||
Loading…
Add table
Add a link
Reference in a new issue