jenkinsci / docker-swarm-plugin

Jenkins plugin which allows to add a Docker Swarm as a cloud agent provider
https://plugins.jenkins.io/docker-swarm/
MIT License
55 stars 47 forks source link

Update documentation - use with webSocket only #111

Open rubroboletus opened 2 years ago

rubroboletus commented 2 years ago

Dependencies

none

Feature Request

In some environments, it is impossible to use jenkins agents with direct JNLP connection. But it is possible to use "webSocket". You just need to modify the docker agent template command like this one:

sh -cx curl --connect-timeout 20 --max-time 60 -o agent.jar $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL && java -cp agent.jar hudson.remoting.jnlp.Main -headless -url `echo $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL | sed 's/jnlpJars\/agent.jar//'` -workDir /tmp -webSocket $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_SECRET $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_NAME

Please update documentation.