schutzbot/mockbuild: test against osbuild in target release by default
To make sure we test against what we will release with, use osbuild from the target distro rather than rebuilding it. The only exception is in RHEL8.3, where we are not rebasing any longer, but expect users who use new osbulid-composer from upstream to use it with new osbuild from upstream too. In this case, use the RPM from osbuild upstream, for now pinned to the same version as was in the submodule. This introduces a new configuration file: Schutzfile, which is meant to contain the full test-matrix. For now it only points to the upstream osbuild commit to add to the distro we are testing against (only relevant for 8.3). The submodule is now unused and is therefore removed. The produced repos now only contain osbuild-composer, osbuild is never built as part of osbuild-composer CI. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
f3b56cc305
commit
64432c706a
3 changed files with 27 additions and 2 deletions
9
Schutzfile
Normal file
9
Schutzfile
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"rhel-8.3": {
|
||||
"dependencies": {
|
||||
"osbuild": {
|
||||
"commit": "afafd46393e1c106e79c2412dbb5c4e45a05eda8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -50,6 +50,23 @@ gpgcheck=0
|
|||
priority=5
|
||||
EOF
|
||||
|
||||
# TODO: include this in the jenkins runner (and split test/target machines out)
|
||||
sudo dnf -y install jq
|
||||
|
||||
OSBUILD_GIT_COMMIT=$(cat Schutzfile | jq -r '.["'"${ID}-${VERSION_ID}"'"].dependencies.osbuild.commit')
|
||||
if [[ "${OSBUILD_GIT_COMMIT}" != "null" ]]; then
|
||||
greenprint "Setting up a dnf repository with our unreleased osbuild depedency"
|
||||
sudo tee /etc/yum.repos.d/osbuild.repo << EOF
|
||||
[osbuild]
|
||||
name=osbuild ${OSBUILD_GIT_COMMIT}
|
||||
baseurl=http://osbuild-composer-repos.s3-website.us-east-2.amazonaws.com/osbuild/${ID}-${VERSION_ID}/${ARCH}/${OSBUILD_GIT_COMMIT}
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
# Default dnf repo priority is 99. Lower number means higher priority. This repo may contain an old composer build, dump the priority.
|
||||
priority=10
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ $ID == rhel ]]; then
|
||||
greenprint "Setting up EPEL repository"
|
||||
# we need this for ansible and koji
|
||||
|
|
|
|||
|
|
@ -66,12 +66,11 @@ greenprint "📤 RPMS will be uploaded to: ${REPO_URL}"
|
|||
# Build source RPMs.
|
||||
greenprint "🔧 Building source RPMs."
|
||||
make srpm
|
||||
make -C osbuild srpm
|
||||
|
||||
# Compile RPMs in a mock chroot
|
||||
greenprint "🎁 Building RPMs with mock"
|
||||
sudo mock -r "$MOCK_CONFIG" --resultdir "$REPO_DIR" --with=tests \
|
||||
rpmbuild/SRPMS/*.src.rpm osbuild/rpmbuild/SRPMS/*.src.rpm
|
||||
rpmbuild/SRPMS/*.src.rpm
|
||||
|
||||
# Change the ownership of all of our repo files from root to our CI user.
|
||||
sudo chown -R "$USER" "${REPO_DIR%%/*}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue