Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for Jenkins EL9 node #1892

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion puppet/modules/slave/manifests/packaging/rpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

if $is_el8 {
if $is_el8 or $is_el9 {
yumrepo { 'git-annex':
name => 'git-annex',
baseurl => 'https://downloads.kitenet.net/git-annex/linux/current/rpms/',
Expand Down
22 changes: 19 additions & 3 deletions puppet/modules/slave/manifests/unittests.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
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 {
case $facts['os']['name'] {
'CentOS': {
yumrepo { 'crb':
enabled => '1',
}
}
'RedHat': {
yumrepo { 'codeready-builder-for-rhel-9-x86_64-rpms':
enabled => '1',
}
}
}
}

# Build dependencies
$libxml2_dev = $facts['os']['family'] ? {
Expand Down Expand Up @@ -53,12 +69,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 {
ensure_packages(['python-virtualenv', 'transifex-client'])
unless $is_el8 or $is_el9 {
ensure_packages(['python-virtualenv'])
}

# nodejs/npm for JavaScript tests
if $facts['os']['family'] == 'RedHat' {
if $facts['os']['family'] == 'RedHat' and !$is_el9 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nodejs module downloads it from https://nodejs.org/download/release/v12.22.12/ and since daf7beb this works:

Suggested change
if $facts['os']['family'] == 'RedHat' and !$is_el9 {
if $facts['os']['family'] == 'RedHat' {

class { 'nodejs':
repo_url_suffix => '12.x',
nodejs_package_ensure => latest,
Expand Down
Loading