Skip to content

jenkins::agent: Use modern remoting instead of JNLP

This fixes communication between the jenkins agent and the controller

Test Plan

octocatalog-diff on jenkins-debian1:

diff origin/production/jenkins-debian1.internal.softwareheritage.org current/jenkins-debian1.internal.softwareheritage.org
*******************************************
  File[/etc/default/jenkins-agent] =>
   parameters =>
     content =>
      @@ -3,4 +3,5 @@
      _
       AGENT_WORKDIR="/var/lib/jenkins/agent-workdir"
      -JNLP_URL="http://thyssen.internal.softwareheritage.org:8080/computer/jenkins-debian1.internal.softwareheritage.org/slave-agent.jnlp"
      +JENKINS_URL="http://thyssen.internal.softwareheritage.org:8080/"
       JNLP_SECRET="jenkins::agent::jnlp::token"
      +AGENT_NAME="jenkins-debian1.internal.softwareheritage.org
*******************************************
  File[/etc/systemd/system/jenkins-agent.service] =>
   parameters =>
     content =>
      @@ -6,5 +6,5 @@
       [Service]
       EnvironmentFile=/etc/default/jenkins-agent
      -ExecStart=/usr/bin/java -jar /usr/share/jenkins/agent.jar -jnlpUrl $JNLP_URL -secret $JNLP_SECRET -workDir $AGENT_WORKDIR
      +ExecStart=/usr/bin/java -cp /usr/share/jenkins/agent.jar hudson.remoting.jnlp.Main -headless -url $JENKINS_URL -workDir $AGENT_WORKDIR $JNLP_SECRET $AGENT_NAME
      _
       User=jenkins
*******************************************
  Systemd::Unit_file[jenkins-agent.service] =>
   parameters =>
     content =>
      @@ -6,5 +6,5 @@
       [Service]
       EnvironmentFile=/etc/default/jenkins-agent
      -ExecStart=/usr/bin/java -jar /usr/share/jenkins/agent.jar -jnlpUrl $JNLP_URL -secret $JNLP_SECRET -workDir $AGENT_WORKDIR
      +ExecStart=/usr/bin/java -cp /usr/share/jenkins/agent.jar hudson.remoting.jnlp.Main -headless -url $JENKINS_URL -workDir $AGENT_WORKDIR $JNLP_SECRET $AGENT_NAME
      _
       User=jenkins
*******************************************
*** End octocatalog-diff on jenkins-debian1.internal.softwareheritage.org

This change is currently (successfully) running on jenkins-debian1.


Migrated from D4804 (view on Phabricator)

Merge request reports