Page MenuHomeSoftware Heritage

jenkins::agent: Use modern remoting instead of JNLP
ClosedPublic

Authored by olasd on Mon, Jan 4, 1:20 PM.

Details

Summary

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.

Diff Detail

Repository
rSPSITE puppet-swh-site
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.