Switch Fedora mock builds to minimal images
Use minimal images when building RPMs via mock on Fedora (PR for RHEL will come later). Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
parent
534c508c41
commit
9011a67dd0
2 changed files with 19 additions and 3 deletions
4
schutzbot/Jenkinsfile
vendored
4
schutzbot/Jenkinsfile
vendored
|
|
@ -36,7 +36,7 @@ pipeline {
|
|||
|
||||
parallel {
|
||||
stage('Fedora 31') {
|
||||
agent { label "fedora31" }
|
||||
agent { label "f31 && minimal" }
|
||||
environment {
|
||||
AWS_CREDS = credentials('aws-credentials-osbuildci')
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
stage('Fedora 32') {
|
||||
agent { label "fedora32" }
|
||||
agent { label "f32 && minimal" }
|
||||
environment {
|
||||
AWS_CREDS = credentials('aws-credentials-osbuildci')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,12 +9,28 @@ function greenprint {
|
|||
# Get OS details.
|
||||
source /etc/os-release
|
||||
|
||||
# Prepare dnf on Fedora for performance.
|
||||
if [[ $ID == fedora ]]; then
|
||||
sudo rm -f /etc/yum.repos.d/fedora*modular*
|
||||
echo -e "fastestmirror=1\ninstall_weak_deps=0" | sudo tee -a /etc/dnf/dnf.conf
|
||||
fi
|
||||
|
||||
# Install requirements for building RPMs in mock.
|
||||
greenprint "📦 Installing mock requirements"
|
||||
sudo dnf -y install createrepo_c make mock rpm-build
|
||||
|
||||
# Install s3cmd if it is not present.
|
||||
if ! s3cmd --version; then
|
||||
if ! s3cmd --version > /dev/null 2>&1; then
|
||||
greenprint "📦 Installing s3cmd"
|
||||
sudo pip3 install s3cmd
|
||||
fi
|
||||
|
||||
# Enable fastestmirror for mock on Fedora.
|
||||
if [[ $ID == fedora ]]; then
|
||||
sudo sed -i '/^install_weak_deps=.*/a fastestmirror=1' \
|
||||
/etc/mock/templates/fedora-branched.tpl
|
||||
fi
|
||||
|
||||
# Jenkins sets a workspace variable as the root of its working directory.
|
||||
WORKSPACE=${WORKSPACE:-$(pwd)}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue