diff --git a/Schutzfile b/Schutzfile new file mode 100644 index 000000000..5672310d2 --- /dev/null +++ b/Schutzfile @@ -0,0 +1,9 @@ +{ + "rhel-8.3": { + "dependencies": { + "osbuild": { + "commit": "afafd46393e1c106e79c2412dbb5c4e45a05eda8" + } + } + } +} diff --git a/schutzbot/deploy.sh b/schutzbot/deploy.sh index 9e472f8e3..7604ae478 100755 --- a/schutzbot/deploy.sh +++ b/schutzbot/deploy.sh @@ -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 diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index 43388f54f..8691d3995 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -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%%/*}"