Revert unix command to command to prevend breaking changes#127
Revert unix command to command to prevend breaking changes#127
Conversation
2cc4db6 to
ab8dd92
Compare
jglick
left a comment
There was a problem hiding this comment.
$JENKINS_HOME/config.xml. (You can use @LocalData to test this sort of thing by the way.) configuration-as-code users on the other hand will need As an aside, similar to https://www.jenkins.io/doc/developer/plugin-development/pipeline-integration/#constructor-vs-setters it is recommended to limit @DataBoundConstructor parameters to those fields which are obligatory (no sensible default could be provided), and use @DataBoundSetter for everything else. If you do this right, config.xml can avoid serializing fields unmodified from their default, and JCasC users will need only set interesting fields (and exporting JCasC YAML will display only those fields which were really edited).
| <f:entry title="Unix Command" field="unixCommand"> | ||
| <f:textarea value="${dockerSwarmAgentTemplate.unixCommand}" default="sh -cx curl --connect-timeout 20 --max-time 60 -o agent.jar $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL && 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 -cx curl --connect-timeout 20 --max-time 60 -o agent.jar $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL && 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"/> |
There was a problem hiding this comment.
By the way just
| <f:textarea value="${dockerSwarmAgentTemplate.command}" default="sh -cx curl --connect-timeout 20 --max-time 60 -o agent.jar $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL && 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:textarea default="sh -cx curl --connect-timeout 20 --max-time 60 -o agent.jar $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL && 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"/> |
should work (same for other properties): the point of the field attr on f:entry is that it takes care of the plumbing needed for config form round-trips so long as you are consistent in your naming.
|
Stalled? |
Revert an incompatible change from #118