From 7cf000d7c087506806666c65c084e042d0e91813 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Sat, 9 Sep 2023 17:20:04 -0400 Subject: [PATCH] Allow for Jenkins EL9 node --- Vagrantfile | 10 ++++++++++ .../modules/slave/manifests/packaging/rpm.pp | 5 +++-- puppet/modules/slave/manifests/unittests.pp | 18 ++++++++++++++++-- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 6732377fe..59a5416c8 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -59,6 +59,16 @@ Vagrant.configure("2") do |config| end end + config.vm.define "jenkins-node-el9" do |override| + override.vm.hostname = "jenkins-node-el9" + override.vm.box = "centos/stream9" + + override.vm.provider "libvirt" do |libvirt, provider| + libvirt.memory = "4096" + provider.vm.box_url = CENTOS_9_BOX_URL + end + end + config.vm.define "jenkins-node-debian10" do |override| override.vm.hostname = "jenkins-node-debian10" override.vm.box = "debian/buster64" diff --git a/puppet/modules/slave/manifests/packaging/rpm.pp b/puppet/modules/slave/manifests/packaging/rpm.pp index 752afab2b..d2eb0942b 100644 --- a/puppet/modules/slave/manifests/packaging/rpm.pp +++ b/puppet/modules/slave/manifests/packaging/rpm.pp @@ -8,12 +8,13 @@ ) { # TODO: Fix on EL8 and get rid of this $is_el8 = $facts['os']['release']['major'] == '8' + $is_el9 = $facts['os']['release']['major'] == '9' package { ['koji', 'rpm-build', 'createrepo', 'copr-cli']: ensure => installed, } - unless $is_el8 { + unless $is_el8 or $is_el9 { package { ['git-annex', 'pyliblzma']: ensure => installed, } @@ -71,7 +72,7 @@ source => 'puppet:///modules/slave/katello-ca.cert', } - unless $is_el8 { + unless $is_el8 or $is_el9 { # tito # Work around to fix https://github.com/rpm-software-management/tito/pull/354#issuecomment-613523823 # Pulled from the infra repository diff --git a/puppet/modules/slave/manifests/unittests.pp b/puppet/modules/slave/manifests/unittests.pp index 7947107bb..dce1e25cd 100644 --- a/puppet/modules/slave/manifests/unittests.pp +++ b/puppet/modules/slave/manifests/unittests.pp @@ -3,6 +3,20 @@ Stdlib::Absolutepath $homedir, ) { $is_el8 = $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '8' + $is_el9 = $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '9' + + if $is_el9 { + if $facts['os']['name'] == 'CentOS' { + yumrepo { 'crb': + enabled => '1', + } + } + if $facts['os']['name'] == 'RedHat' { + yumrepo { 'rhel-9-codeready-builder': + enabled => '1', + } + } + } # Build dependencies $libxml2_dev = $facts['os']['family'] ? { @@ -53,12 +67,12 @@ ensure_packages([$libxml2_dev, $libxslt1_dev, $libkrb5_dev, $systemd_dev, 'freeipmi', 'ipmitool', $firefox, $libvirt_dev, $libcurl_dev, $sqlite3_dev, $libyaml_dev]) - unless $is_el8 { + unless $is_el8 or $is_el9 { ensure_packages(['python-virtualenv', 'transifex-client']) } # nodejs/npm for JavaScript tests - if $facts['os']['family'] == 'RedHat' { + if $facts['os']['family'] == 'RedHat' and !$is_el9 { class { 'nodejs': repo_url_suffix => '12.x', nodejs_package_ensure => latest,