Skip to content

Commit 1faf787

Browse files
Crola1702rootnuclearsandwich
authored
Cookbook 24.04 migration (#147)
* 24.04 migration: Update Jenkins to latest LTS with updated plugins (#141) * Update plugin install and removal Signed-off-by: Crola1702 <[email protected]> * Fix plugin_remove_filter undefined variable Signed-off-by: Crola1702 <[email protected]> * Upgrade publish-over-ssh to 1.24 in plugin list This plugin had a security vulnerability, this is explained in 263f7d2. Now https://plugins.jenkins.io/publish-over-ssh/ shows that security vulnerabilities were affecting versions 1.23 and earlier, so this is a bump to 1.24, where these vulnerabilities are not present anymore Signed-off-by: Crola1702 <[email protected]> * Update jenkins version Signed-off-by: Crola1702 <[email protected]> * Move plugins template file Signed-off-by: Crola1702 <[email protected]> * Upgrade openjdk version 8->21 Signed-off-by: Crola1702 <[email protected]> * Update plugin list Signed-off-by: Crola1702 <[email protected]> * Apply suggested changes from CasC plugin * 'gitSCM' is an obsolete attribute name, please use 'scmGit' * 'timestamperConfig' is an obsolete attribute name, please use 'timestamper' * Parametrize jenkins jdk version from attributes Signed-off-by: Crola1702 <[email protected]> * Move plugin removal to plugins recipe Signed-off-by: Crola1702 <[email protected]> --------- Signed-off-by: Crola1702 <[email protected]> Co-authored-by: root <[email protected]> * 24.04 migration: Authentication Strategy (#142) * Update plugin install and removal Signed-off-by: Crola1702 <[email protected]> * Move plugins template file Signed-off-by: Crola1702 <[email protected]> * Move plugin removal to plugins recipe Signed-off-by: Crola1702 <[email protected]> * Put authentication scripts and old resources in auth_strategy.groovy Signed-off-by: Crola1702 <[email protected]> * Fix syntax error Signed-off-by: Crola1702 <[email protected]> * Fix user creation script Signed-off-by: Crola1702 <[email protected]> * Use correct strategy in attributes and actually save the user Signed-off-by: Crola1702 <[email protected]> * Use mode 0500 for groovy scripts in init.groovy.d Signed-off-by: Crola1702 <[email protected]> --------- Signed-off-by: Crola1702 <[email protected]> * 24.04 migration: Credentials (#143) * Update plugin install and removal Signed-off-by: Crola1702 <[email protected]> * Fix plugin_remove_filter undefined variable Signed-off-by: Crola1702 <[email protected]> * Upgrade publish-over-ssh to 1.24 in plugin list This plugin had a security vulnerability, this is explained in 263f7d2. Now https://plugins.jenkins.io/publish-over-ssh/ shows that security vulnerabilities were affecting versions 1.23 and earlier, so this is a bump to 1.24, where these vulnerabilities are not present anymore Signed-off-by: Crola1702 <[email protected]> * Move plugins template file Signed-off-by: Crola1702 <[email protected]> * Upgrade openjdk version 8->21 Signed-off-by: Crola1702 <[email protected]> * Move plugin removal to plugins recipe Signed-off-by: Crola1702 <[email protected]> * Fix syntax error Signed-off-by: Crola1702 <[email protected]> * Fix user creation script Signed-off-by: Crola1702 <[email protected]> * Fixed double variable declared Signed-off-by: Crola1702 <[email protected]> * Migrate credentials resources to groovy scripts Signed-off-by: Crola1702 <[email protected]> * Fix groovy syntax errors Signed-off-by: Crola1702 <[email protected]> * Remove credentials todos Signed-off-by: Crola1702 <[email protected]> * Use mode 0500 for groovy scripts in init.groovy.d Signed-off-by: Crola1702 <[email protected]> --------- Signed-off-by: Crola1702 <[email protected]> * 24.04 migration: Agents (#145) * Update plugin install and removal Signed-off-by: Crola1702 <[email protected]> * Fix plugin_remove_filter undefined variable Signed-off-by: Crola1702 <[email protected]> * Upgrade publish-over-ssh to 1.24 in plugin list This plugin had a security vulnerability, this is explained in 263f7d2. Now https://plugins.jenkins.io/publish-over-ssh/ shows that security vulnerabilities were affecting versions 1.23 and earlier, so this is a bump to 1.24, where these vulnerabilities are not present anymore Signed-off-by: Crola1702 <[email protected]> * Update jenkins version Signed-off-by: Crola1702 <[email protected]> * Move plugins template file Signed-off-by: Crola1702 <[email protected]> * Upgrade openjdk version 8->21 Signed-off-by: Crola1702 <[email protected]> * Update plugin list Signed-off-by: Crola1702 <[email protected]> * Apply suggested changes from CasC plugin * 'gitSCM' is an obsolete attribute name, please use 'scmGit' * 'timestamperConfig' is an obsolete attribute name, please use 'timestamper' * Parametrize jenkins jdk version from attributes Signed-off-by: Crola1702 <[email protected]> * Move plugin removal to plugins recipe Signed-off-by: Crola1702 <[email protected]> * Put authentication scripts and old resources in auth_strategy.groovy Signed-off-by: Crola1702 <[email protected]> * Fix syntax error Signed-off-by: Crola1702 <[email protected]> * Fix user creation script Signed-off-by: Crola1702 <[email protected]> * Use correct strategy in attributes and actually save the user Signed-off-by: Crola1702 <[email protected]> * Fixed double variable declared Signed-off-by: Crola1702 <[email protected]> * Migrate credentials resources to groovy scripts Signed-off-by: Crola1702 <[email protected]> * Fix groovy syntax errors Signed-off-by: Crola1702 <[email protected]> * Remove credentials todos Signed-off-by: Crola1702 <[email protected]> * Agent: Parametrize java version Signed-off-by: Crola1702 <[email protected]> * Add bzip2 package dependecy Signed-off-by: Crola1702 <[email protected]> * Add bzip2 comment Signed-off-by: Crola1702 <[email protected]> --------- Signed-off-by: Crola1702 <[email protected]> Co-authored-by: root <[email protected]> * Update to latest jenkins version Signed-off-by: Crola1702 <[email protected]> * Remove deprecated agentProtocols section From: https://www.jenkins.io/doc/upgrade-guide/2.492/: 'The agentProtocols section of a configuration as code global configuration should be deleted because it will now be ignored. If you do not wish to allow inbound TCP agents, disable the port instead of the protocol.' Signed-off-by: Crola1702 <[email protected]> * Use environment override attributes Signed-off-by: Crola1702 <[email protected]> * Add jenkins to jenkins-agent group Groovy system scripts use the master node user, i.e., jenkins (See https://github.com/ros-infrastructure/ros_buildfarm/blob/4a6c69587a04834fe99d6adbc3db124f2c6d109c/ros_buildfarm/templates/snippet/builder_system-groovy.xml.em#L1-L15). This is a problem, as the reconfigure jobs need access to views under jenkins-agent user workspace Everything under /home/jenkins-agent has 750 permissions, so jenkins user does not have access by default. Adding jenkins to the group will give the jenkins admin access to the jenkins agent data. Signed-off-by: Crola1702 <[email protected]> * Upgrade jenkins to 492.2 Signed-off-by: Crola1702 <[email protected]> * Approve signatures using groovy script (#149) * Approve signatures using groovy script Signed-off-by: Crola1702 <[email protected]> * Use 99 to run approved_signatures at the end Signed-off-by: Crola1702 <[email protected]> * Fix acme.sh not_if clause Signed-off-by: Crola1702 <[email protected]> * DEBUG: Comment approved-signatures script Signed-off-by: Crola1702 <[email protected]> * Restore approved_scripts.groovy Signed-off-by: Crola1702 <[email protected]> * Set order of init.groovy.d scripts Signed-off-by: Crola1702 <[email protected]> * Remove remotingSecurity See: https://www.jenkins.io/doc/book/security/controller-isolation/jep-235/#api-compatibility Signed-off-by: Crola1702 <[email protected]> * Comment approved signatures script Signed-off-by: Crola1702 <[email protected]> * Stop clearingAPprovedSignatures before acutally approving some Signed-off-by: Crola1702 <[email protected]> * Remove scriptApproval attribute We're using an approval_signatures.groovy script instead Signed-off-by: Crola1702 <[email protected]> --------- Signed-off-by: Crola1702 <[email protected]> * Fix typo in gpg private-key Signed-off-by: Crola1702 <[email protected]> * Fix typo in gpg private-key (again) Signed-off-by: Crola1702 <[email protected]> * Revert "Fix typo in gpg private-key (again)" See osrf/chef-osrf#303 This reverts commit 3773a05. * Add jenkins-agent to needrestart overrides. needrestart in 24.04 now runs for both attended and unattended upgrades. It has a built-in list of long-running services which should not be restarted arbitrarily but need to include our jenkins-agent since it may be running jobs and shouldn't be stopped by an unattended-upgrade run. * Prevent needrestart from restarting jenkins. Jenkins is heavy enough that an inconvenient or unplanned restart is quite disruptive. * Add noble in the apt_repos suite Signed-off-by: Crola1702 <[email protected]> * Fix acme.sh not_if clause Signed-off-by: Crola1702 <[email protected]> * Add a Groovy script for configuring a sensible default view. * Move approved-signatures script to cookbook_file Signed-off-by: Crola1702 <[email protected]> * Add missing production hashes Signed-off-by: Crola1702 <[email protected]> * Add Hudson model import Signed-off-by: Crola1702 <[email protected]> * Explicitly state why is bzip2 needed Signed-off-by: Crola1702 <[email protected]> --------- Signed-off-by: Crola1702 <[email protected]> Co-authored-by: root <[email protected]> Co-authored-by: Steven! Ragnarök <[email protected]>
1 parent 82a2b45 commit 1faf787

File tree

13 files changed

+567
-261
lines changed

13 files changed

+567
-261
lines changed

attributes/agent.rb

+3
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@
3030
# The example build farm configurations assume that the 'buildagent' label is the default for building sourcedeb and binarydeb packages. Other labels may be used to control where other jobs run.
3131
default['ros_buildfarm']['agent']['labels'] = %w(buildagent)
3232

33+
# JDK version to install
34+
default['ros_buildfarm']['agent']['jdk_version'] = 21
35+
3336
# Prevents docker and containerd from getting updates and restarting mid build. See https://github.com/ros2/ci/issues/702
3437
default['ros_buildfarm']['unattended_upgrades']['package_blacklist'] = %w[docker.io containerd]

attributes/jenkins.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@
2323
# Last version supporting Java 8
2424
#default['jenkins']['master']['version'] = '2.346.1'
2525
# Last version supporting sysvinit scripts
26-
default['jenkins']['master']['version'] = '2.319.3'
26+
default['jenkins']['master']['version'] = '2.492.2'
27+
28+
# JDK version to install
29+
default['jenkins']['master']['jdk_version'] = 21

attributes/plugins.rb

+122-106
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,130 @@
11
default['ros_buildfarm']['jenkins']['plugins'] = {
2-
"PrioritySorter" => "4.0.0",
3-
"ace-editor" => "1.1",
4-
"analysis-model-api" => "10.0.0",
5-
"ant" => "1.9",
6-
"antisamy-markup-formatter" => "2.1",
7-
"apache-httpcomponents-client-4-api" => "4.5.13-1.0",
8-
"audit-trail" => "3.7",
9-
"badge" => "1.6",
2+
"PrioritySorter" => "5.2.0",
3+
"analysis-model-api" => "12.9.1",
4+
"ant" => "511.v0a_a_1a_334f41b_",
5+
"antisamy-markup-formatter" => "162.v0e6ec0fcfcf6",
6+
"apache-httpcomponents-client-4-api" => "4.5.14-208.v438351942757",
7+
"apache-httpcomponents-client-5-api" => "5.4-124.v31e2987e48f4",
8+
"asm-api" => "9.7.1-97.v4cc844130d97",
9+
"audit-trail" => "382.vf64d6f626060",
10+
"badge" => "2.5",
1011
"bazaar" => "1.22",
11-
#"benchmark" => "1.0.12-SNAPSHOT (private-50491052-cottsay)",
12-
"bootstrap4-api" => "4.6.0-3",
13-
"bouncycastle-api" => "2.17",
14-
"branch-api" => "2.6.3",
15-
"build-timeout" => "1.20",
16-
"caffeine-api" => "2.9.1-23.v51c4e2c879c8",
17-
"checks-api" => "1.7.0",
18-
"cloudbees-folder" => "6.15",
19-
"collapsing-console-sections" => "1.8.0",
20-
"command-launcher" => "1.2",
21-
"conditional-buildstep" => "1.3.6",
22-
"configuration-as-code" => "1.51",
23-
"copyartifact" => "1.45.2",
24-
"credentials" => "2.4.1",
25-
"credentials-binding" => "1.24",
26-
"dashboard-view" => "2.16",
27-
"data-tables-api" => "1.10.23-3",
28-
"description-setter" => "1.10",
12+
"bootstrap5-api" => "5.3.3-1",
13+
"bouncycastle-api" => "2.30.1.78.1-248.ve27176eb_46cb_",
14+
"branch-api" => "2.1200.v4b_a_3da_2eb_db_4",
15+
"build-timeout" => "1.33",
16+
"caffeine-api" => "3.1.8-133.v17b_1ff2e0599",
17+
"checks-api" => "2.2.1",
18+
"cloudbees-folder" => "6.975.v4161e479479f",
19+
"collapsing-console-sections" => "1.10.0",
20+
"command-launcher" => "116.vd85919c54a_d6",
21+
"commons-compress-api" => "1.26.1-2",
22+
"commons-lang3-api" => "3.17.0-84.vb_b_938040b_078",
23+
"commons-text-api" => "1.12.0-129.v99a_50df237f7",
24+
"conditional-buildstep" => "1.4.3",
25+
"configuration-as-code" => "1903.v004d55388f30",
26+
"copyartifact" => "757.v05365583a_455",
27+
"credentials" => "1393.v6017143c1763",
28+
"credentials-binding" => "687.v619cb_15e923f",
29+
"dashboard-view" => "2.521.v339b_a_f4d8da_8",
30+
"data-tables-api" => "2.1.8-1",
31+
"description-setter" => "258.vcd25251271a_a_",
2932
"disable-failed-job" => "1.15",
30-
"display-url-api" => "2.3.4",
31-
"dtkit-api" => "3.0.0",
32-
"durable-task" => "1.27",
33-
"echarts-api" => "5.1.0-2",
34-
"email-ext" => "2.78",
35-
"embeddable-build-status" => "2.0.2",
36-
"external-monitor-job" => "1.7",
37-
"extra-columns" => "1.23",
38-
"font-awesome-api" => "5.15.2-2",
39-
"forensics-api" => "1.0.0",
40-
"ghprb" => "1.42.1",
41-
"git" => "4.7.1",
42-
"git-client" => "3.7.1",
43-
"git-forensics" => "1.0.0",
44-
"git-server" => "1.9",
45-
"github" => "1.29.5",
46-
"github-api" => "1.95",
47-
"github-branch-source" => "2.5.8",
48-
"github-oauth" => "0.33",
49-
"greenballs" => "1.15",
50-
"groovy" => "2.2",
51-
"groovy-postbuild" => "2.4.3",
33+
"display-url-api" => "2.209.v582ed814ff2f",
34+
"dtkit-api" => "3.0.3",
35+
"durable-task" => "581.v299a_5609d767",
36+
"echarts-api" => "5.5.1-4",
37+
"eddsa-api" => "0.3.0-4.v84c6f0f4969e",
38+
"email-ext" => "1866.v14fa_6d201654",
39+
"embeddable-build-status" => "487.va_0ef04c898a_2",
40+
"emoji-symbols-api" => "13.v723a_b_8e234d1",
41+
"external-monitor-job" => "215.v2e88e894db_f8",
42+
"extra-columns" => "1.27",
43+
"font-awesome-api" => "6.6.0-2",
44+
"forensics-api" => "2.6.0",
45+
"ghprb" => "1.42.2",
46+
"git" => "5.6.0",
47+
"git-client" => "6.1.0",
48+
"git-forensics" => "2.2.1",
49+
"git-server" => "126.v0d945d8d2b_39",
50+
"github" => "1.40.0",
51+
"github-api" => "1.321-478.vc9ce627ce001",
52+
"github-branch-source" => "1807.v50351eb_7dd13",
53+
"github-oauth" => "621.v33b_4394dda_4d",
54+
"groovy" => "457.v99900cb_85593",
55+
"groovy-postbuild" => "267.va_df06de9fa_fa_",
56+
"gson-api" => "2.11.0-85.v1f4e87273c33",
5257
"heavy-job" => "1.1",
53-
"htmlpublisher" => "1.21",
54-
#"image-gallery" => "1.5-SNAPSHOT (private-d17880bb-cottsay)",
55-
"jackson2-api" => "2.12.3",
56-
"javadoc" => "1.4",
57-
"jdk-tool" => "1.1",
58-
"jobConfigHistory" => "2.18.3",
58+
"htmlpublisher" => "1.37",
59+
"instance-identity" => "201.vd2a_b_5a_468a_a_6",
60+
"ionicons-api" => "74.v93d5eb_813d5f",
61+
"jackson2-api" => "2.17.0-379.v02de8ec9f64c",
62+
"jakarta-activation-api" => "2.1.3-1",
63+
"jakarta-mail-api" => "2.1.3-1",
64+
"javadoc" => "280.v050b_5c849f69",
65+
"javax-activation-api" => "1.2.0-7",
66+
"javax-mail-api" => "1.6.2-10",
67+
"jaxb" => "2.3.9-1",
68+
"jdk-tool" => "80.v8a_dee33ed6f0",
69+
"jjwt-api" => "0.11.5-112.ve82dfb_224b_a_d",
70+
"jobConfigHistory" => "1283.veb_dfb_00b_5ec0",
5971
"jobrequeue" => "1.1",
60-
"jquery" => "1.12.4-0",
61-
"jquery-detached" => "1.2.1",
62-
"jquery3-api" => "3.6.0-1",
63-
"jsch" => "0.1.55.2",
64-
"junit" => "1.49",
65-
"ldap" => "1.26",
66-
"log-parser" => "2.1",
67-
"mailer" => "1.32.1",
68-
"mapdb-api" => "1.0.9.0",
69-
"matrix-auth" => "2.6.6",
70-
"matrix-project" => "1.18",
71-
"maven-plugin" => "3.4",
72-
"mercurial" => "2.14",
73-
"metrics" => "3.1.2.10",
74-
"modernstatus" => "1.2",
75-
"monitoring" => "1.80.0",
76-
"pam-auth" => "1.5.1",
77-
"parameterized-trigger" => "2.40",
78-
"pipeline-utility-steps" => "2.5.0",
79-
"plain-credentials" => "1.7",
80-
"plot" => "2.1.6",
81-
"plugin-util-api" => "2.1.0",
82-
"pollscm" => "1.3.1",
83-
"popper-api" => "1.16.1-2",
72+
"jquery" => "1.12.4-3",
73+
"jquery3-api" => "3.7.1-2",
74+
"jsch" => "0.2.16-86.v42e010d9484b_",
75+
"json-api" => "20240303-101.v7a_8666713110",
76+
"json-path-api" => "2.9.0-118.v7f23ed82a_8b_8",
77+
"junit" => "1311.v39e1716e4eb_e",
78+
"ldap" => "770.vb_455e934581a_",
79+
"log-parser" => "2.3.7",
80+
"mailer" => "489.vd4b_25144138f",
81+
"mapdb-api" => "1.0.9-40.v58107308b_7a_7",
82+
"matrix-auth" => "3.2.3",
83+
"matrix-project" => "840.v812f627cb_578",
84+
"maven-plugin" => "3.24",
85+
"mercurial" => "1260.vdfb_723cdcc81",
86+
"metrics" => "4.2.21-458.vcf496cb_839e4",
87+
"mina-sshd-api-common" => "2.14.0-136.v4d2b_0853615e",
88+
"mina-sshd-api-core" => "2.14.0-136.v4d2b_0853615e",
89+
"modernstatus" => "1.3",
90+
"monitoring" => "2.4.0",
91+
"okhttp-api" => "4.11.0-181.v1de5b_83857df",
92+
"pam-auth" => "1.11",
93+
"parameterized-trigger" => "806.vf6fff3e28c3e",
94+
"pipeline-groovy-lib" => "744.v5b_556ee7c253",
95+
"pipeline-utility-steps" => "2.18.0",
96+
"plain-credentials" => "183.va_de8f1dd5a_2b_",
97+
"plot" => "2.2.0",
98+
"plugin-util-api" => "5.1.0",
99+
"pollscm" => "1.5",
100+
"prism-api" => "1.29.0-18",
84101
"publish-over" => "0.22",
85-
#"publish-over-ssh" => "1.22",
86-
"purge-build-queue-plugin" => "1.0",
87-
"rebuild" => "1.31",
88-
"run-condition" => "1.2",
89-
"scm-api" => "2.6.4",
90-
"script-security" => "1.76",
91-
"snakeyaml-api" => "1.27.0",
92-
"ssh-agent" => "1.17",
93-
"ssh-credentials" => "1.18.1",
94-
"ssh-slaves" => "1.28.1",
95-
"structs" => "1.24",
96-
"subversion" => "2.14.0",
97-
"swarm" => "3.22",
102+
"publish-over-ssh" => "383.v4eb_4c44da_2dd",
103+
"purge-build-queue-plugin" => "88.v23b_97b_f2c7a_d",
104+
"rebuild" => "332.va_1ee476d8f6d",
105+
"run-condition" => "1.7",
106+
"scm-api" => "698.v8e3b_c788f0a_6",
107+
"script-security" => "1369.v9b_98a_4e95b_2d",
108+
"snakeyaml-api" => "2.3-123.v13484c65210a_",
109+
"ssh-agent" => "376.v8933585c69d3",
110+
"ssh-credentials" => "349.vb_8b_6b_9709f5b_",
111+
"ssh-slaves" => "2.1010.v64ec48721231",
112+
"sshd" => "3.330.vc866a_8389b_58",
113+
"structs" => "338.v848422169819",
114+
"subversion" => "1281.vc8837f91a_07a_",
115+
"swarm" => "3.48",
98116
"systemloadaverage-monitor" => "1.2",
99-
"timestamper" => "1.11.3",
100-
"token-macro" => "2.15",
101-
"translation" => "1.16",
102-
"trilead-api" => "1.0.13",
103-
"warnings-ng" => "9.0.1",
104-
#"windows-slaves" => "1.3.1", # Delisted https://github.com/jenkinsci/windows-slaves-plugin?tab=readme-ov-file#notice-of-deprecation
105-
"workflow-api" => "2.42",
106-
"workflow-cps" => "2.90",
107-
"workflow-cps-global-lib" => "2.15",
108-
"workflow-job" => "2.40",
109-
"workflow-multibranch" => "2.23",
110-
"workflow-scm-step" => "2.12",
111-
"workflow-step-api" => "2.23",
112-
"workflow-support" => "3.8",
113-
"xunit" => "3.0.2",
117+
"timestamper" => "1.28",
118+
"token-macro" => "400.v35420b_922dcb_",
119+
"trilead-api" => "2.147.vb_73cc728a_32e",
120+
"variant" => "60.v7290fc0eb_b_cd",
121+
"warnings-ng" => "11.12.0",
122+
"workflow-api" => "1336.vee415d95c521",
123+
"workflow-cps" => "4000.v5198556e9cea_",
124+
"workflow-job" => "1472.ve4d5eca_143c4",
125+
"workflow-multibranch" => "795.ve0cb_1f45ca_9a_",
126+
"workflow-scm-step" => "427.v4ca_6512e7df1",
127+
"workflow-step-api" => "678.v3ee58b_469476",
128+
"workflow-support" => "936.v9fa_77211ca_e1",
129+
"xunit" => "3.1.5",
114130
}

attributes/repo.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
default['ros_buildfarm']['apt_repos']['architectures'] = %w[i386 amd64 arm64 armhf source]
1010

1111
# The list of Debian and Ubuntu distributions supported by your build farm.
12-
default['ros_buildfarm']['apt_repos']['suites'] = %w[xenial bionic focal stretch buster]
12+
default['ros_buildfarm']['apt_repos']['suites'] = %w[xenial bionic focal stretch buster noble]
1313

1414
# The official buildfarm provides rsync endpoints to allow syncing between mirrors.
1515
# Endpoints are defined in a nested hash structure with an example below

0 commit comments

Comments
 (0)