Page MenuHomeSoftware Heritage

D4804.id16997.diff
No OneTemporary

D4804.id16997.diff

diff --git a/data/common/common.yaml b/data/common/common.yaml
--- a/data/common/common.yaml
+++ b/data/common/common.yaml
@@ -2840,7 +2840,7 @@
jenkins::vhost::hsts_header: "%{hiera('apache::hsts_header')}"
jenkins::agent::jar_url: "https://%{hiera('jenkins::vhost::name')}/jnlpJars/agent.jar"
-jenkins::agent::jnlp::url: "%{hiera('jenkins::backend::url')}computer/%{::swh_hostname.internal_fqdn}/slave-agent.jnlp"
+jenkins::agent::name: "%{::swh_hostname.internal_fqdn}"
# jenkins::agent::jnlp::token in private_data
weekly_report_bot::user: nobody
diff --git a/site-modules/profile/manifests/jenkins/agent.pp b/site-modules/profile/manifests/jenkins/agent.pp
--- a/site-modules/profile/manifests/jenkins/agent.pp
+++ b/site-modules/profile/manifests/jenkins/agent.pp
@@ -3,7 +3,8 @@
include ::java
$jenkins_agent_jar_url = lookup('jenkins::agent::jar_url')
- $jenkins_jnlp_url = lookup('jenkins::agent::jnlp::url')
+ $jenkins_url = lookup('jenkins::backend::url')
+ $jenkins_agent_name = lookup('jenkins::agent::name')
$jenkins_jnlp_token = lookup('jenkins::agent::jnlp::token')
$workdir = '/var/lib/jenkins/agent-workdir'
diff --git a/site-modules/profile/templates/jenkins/agent/jenkins-agent.defaults.erb b/site-modules/profile/templates/jenkins/agent/jenkins-agent.defaults.erb
--- a/site-modules/profile/templates/jenkins/agent/jenkins-agent.defaults.erb
+++ b/site-modules/profile/templates/jenkins/agent/jenkins-agent.defaults.erb
@@ -2,5 +2,6 @@
# Local modifications will be lost.
AGENT_WORKDIR="<%= @workdir %>"
-JNLP_URL="<%= @jenkins_jnlp_url %>"
+JENKINS_URL="<%= @jenkins_url %>"
JNLP_SECRET="<%= @jenkins_jnlp_token %>"
+AGENT_NAME="<%= @jenkins_agent_name %>"
diff --git a/site-modules/profile/templates/jenkins/agent/jenkins-agent.service.erb b/site-modules/profile/templates/jenkins/agent/jenkins-agent.service.erb
--- a/site-modules/profile/templates/jenkins/agent/jenkins-agent.service.erb
+++ b/site-modules/profile/templates/jenkins/agent/jenkins-agent.service.erb
@@ -5,7 +5,7 @@
[Service]
EnvironmentFile=/etc/default/jenkins-agent
-ExecStart=/usr/bin/java -jar <%= @jenkins_agent_jar %> -jnlpUrl $JNLP_URL -secret $JNLP_SECRET -workDir $AGENT_WORKDIR
+ExecStart=/usr/bin/java -cp <%= @jenkins_agent_jar %> hudson.remoting.jnlp.Main -headless -url $JENKINS_URL -workDir $AGENT_WORKDIR $JNLP_SECRET $AGENT_NAME
User=jenkins
Group=jenkins

File Metadata

Mime Type
text/plain
Expires
Nov 5 2024, 10:22 AM (11 w, 16 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3221336

Event Timeline