Skip to content

Commit 784e06b

Browse files
authored
Merge pull request #2155 from craigcomstock/ent-13763-yumfix
ent-13763: various jenkins ci related fixes
2 parents 383fe4e + 6fdc0a2 commit 784e06b

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

ci/cfengine-build-host-setup.cf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ bundle agent cfengine_build_host_setup
1717
debian.(!debian_13.!debian_12.!ubuntu_22.!ubuntu_24.!ubuntu_25)::
1818
"python" comment => "debian>=12 and ubuntu>=22 only has python3";
1919

20+
debian.(!debian_9.!debian_10.!debian_11.!ubuntu_20.!ubuntu_18.!ubuntu_16)::
21+
"python3";
22+
"python-is-python3" comment => "pipeline hosts need plain old python for buildscripts/build-scripts/get_labels_expr.py";
23+
2024
debian_13|ubuntu_25::
2125
"ntpsec";
2226

@@ -210,14 +214,15 @@ bundle agent cfengine_build_host_setup
210214
"have_tmp_mount" expression => returnszero("mount | grep '/tmp'", "useshell");
211215
"have_coredumpctl" expression => returnszero("command -v coredumpctl", "useshell");
212216
"missing_java" expression => not(fileexists("/usr/bin/java"));
217+
"missing_groovy" expression => not(fileexists("/usr/bin/groovy"));
213218
(redhat|centos).!(redhat_6|centos_6|redhat_7|centos_7)::
214219
"yum_conf_ok" expression => returnszero("grep best=False /etc/yum.conf >/dev/null", "useshell");
215220
redhat_6|centos_6|redhat_7|centos_7::
216221
"yum_conf_ok" expression => "any"; # rhel/centos-6 and 7 do not support --nobest or best property in yum.conf
217222
redhat_8|centos_8::
218223
"have_fakeroot" expression => returnszero("command -v fakeroot >/dev/null", "useshell");
219224
(redhat|centos)::
220-
"epel_release_ok" expression => returnszero("yum info --installed epel-release", "useshell");
225+
"epel_release_ok" expression => returnszero("yum info installed epel-release", "useshell");
221226
(redhat_8|centos_8).have_perl::
222227
"have_data_dumper" expression => returnszero("cpan -l | grep Data::Dumper", "useshell");
223228
"have_data_dumper_names" expression => returnszero("cpan -l | grep Data::Dumper::Names", "useshell");
@@ -246,6 +251,8 @@ bundle agent cfengine_build_host_setup
246251
"sysctl kernel.core_pattern='|/lib/systemd/systemd-coredump %p %u %g %s %t %e'" -> { "ENT-12669" }
247252
comment => "Ensure that core_pattern is proper for systemd-coredump if coredumpctl is present.",
248253
contain => in_shell;
254+
containers_host.missing_groovy::
255+
"sh $(this.promise_dirname)/linux-install-groovy.sh" contain => in_shell;
249256
missing_java::
250257
"sh $(this.promise_dirname)/linux-install-jdk21.sh" contain => in_shell;
251258
(redhat_7|centos_7|redhat_8|centos_8|redhat_9|redhat_10).(!have_development_tools).(yum_dnf_conf_ok)::
@@ -288,6 +295,11 @@ bundle agent cfengine_build_host_setup
288295
"have_$(suse_users_and_groups)_user" expression => returnszero("grep '^$(suse_users_and_groups):' /etc/passwd >/dev/null", "useshell");
289296

290297
files:
298+
redhat::
299+
"/etc/environment"
300+
edit_line => contains_literal_string("LC_ALL=C"),
301+
comment => "It seems that centos-7 at least needs LC_ALL=C now, maybe due to different way we access: ProxyJump ssh commands from jenkins instead of java ssh client. 2026-04-03";
302+
291303
linux::
292304
"/home/jenkins/.ssh/known_hosts"
293305
create => "true",
@@ -358,7 +370,7 @@ findtime = 600",
358370
%sudo ALL=NOPASSWD: /usr/bin/podman
359371
%sudo ALL=NOPASSWD: /usr/sbin/lvs
360372
%sudo ALL=NOPASSWD: /usr/bin/journalctl
361-
jenkins_builds ALL=NOPASSWD: /usr/bin/podman
373+
jenkins ALL=NOPASSWD: /usr/bin/podman
362374
",
363375
create => "true",
364376
perms => mog("400", "root", "root");

ci/linux-install-groovy.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
groovy_version=5.0.3
3+
groovy_zip="apache-groovy-binary-$groovy_version.zip"
4+
cd /opt
5+
rm -rf apache-groovy-binary*zip
6+
wget https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/"$groovy_zip"
7+
echo "9d711dcb1dea94df9119558365beb6ac2909a22e30b58ae31de8bcb0dcf33698" "$groovy_zip" > "$groovy_zip".sha256
8+
sha256sum -c "$groovy_zip".sha256
9+
unzip -o "$groovy_zip"
10+
ln -sf /opt/groovy-"$groovy_version"/bin/groovy /usr/bin/
11+
echo "export JAVA_HOME=/usr" >> /etc/profile
12+
. /etc/profile
13+
groovy -v

0 commit comments

Comments
 (0)