Skip to content

Commit

Permalink
Revert unix command to command to prevend breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Roemer committed Sep 15, 2023
1 parent 5cf9df8 commit ab8dd92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public DockerSwarmAgentTemplate() {

@DataBoundConstructor
public DockerSwarmAgentTemplate(final String image, final String hostBinds, final String hostNamedPipes, final String dnsIps,
final String dnsSearchDomains, final String unixCommand,final String windowsCommand, final String user, final String workingDir,
final String dnsSearchDomains, final String command,final String windowsCommand, final String user, final String workingDir,
final String hosts, final String metadata, final String secrets, final String configs, final String label, final String cacheDir,
final String tmpfsDir, final String envVars, final long limitsNanoCPUs, final long limitsMemoryBytes,
final long reservationsNanoCPUs, final long reservationsMemoryBytes, String portBinds, final boolean osWindows,
Expand All @@ -69,7 +69,7 @@ public DockerSwarmAgentTemplate(final String image, final String hostBinds, fina
this.hostNamedPipes = hostNamedPipes;
this.dnsIps = dnsIps;
this.dnsSearchDomains = dnsSearchDomains;
this.unixCommand = unixCommand;
this.unixCommand = command;

Check warning on line 72 in src/main/java/org/jenkinsci/plugins/docker/swarm/DockerSwarmAgentTemplate.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 72 is not covered by tests
this.windowsCommand = windowsCommand;
this.user = user;
this.workingDir = workingDir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<f:entry title="Image" field="image">
<f:textbox value="${dockerSwarmAgentTemplate.image}" default="java:8"/>
</f:entry>
<f:entry title="Unix Command" field="unixCommand">
<f:textarea value="${dockerSwarmAgentTemplate.unixCommand}" default="sh&#10;-cx&#10;curl --connect-timeout 20 --max-time 60 -o agent.jar $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL &amp;&amp; java -classpath agent.jar hudson.remoting.jnlp.Main -headless -url $DOCKER_SWARM_PLUGIN_JENKINS_URL -noreconnect -workDir /tmp $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_SECRET $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_NAME"/>
<f:entry title="Unix Command" field="command">
<f:textarea value="${dockerSwarmAgentTemplate.command}" default="sh&#10;-cx&#10;curl --connect-timeout 20 --max-time 60 -o agent.jar $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL &amp;&amp; java -classpath agent.jar hudson.remoting.jnlp.Main -headless -url $DOCKER_SWARM_PLUGIN_JENKINS_URL -noreconnect -workDir /tmp $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_SECRET $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_NAME"/>
</f:entry>
<f:entry title="Windows Command" field="windowsCommand">
<f:textbox value="${dockerSwarmAgentTemplate.windowsCommand}" default="powershell.exe &amp; { Invoke-WebRequest -TimeoutSec 20 -OutFile agent.jar %DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL%; if($?) { java -classpath agent.jar hudson.remoting.jnlp.Main -headless -url %DOCKER_SWARM_PLUGIN_JENKINS_URL% -noreconnect %DOCKER_SWARM_PLUGIN_JENKINS_AGENT_SECRET% %DOCKER_SWARM_PLUGIN_JENKINS_AGENT_NAME% } }"/>
Expand Down

0 comments on commit ab8dd92

Please sign in to comment.