jenkinsci / nomad-plugin

Nomad cloud plugin for Jenkins
https://plugins.jenkins.io/nomad/
MIT License
56 stars 41 forks source link

add JENKINS_TUNNEL #33

Closed phedoreanu closed 5 years ago

phedoreanu commented 6 years ago

The slave.jar needs to be invoked with -tunnel if Jenkins is behind a proxy:

$ java -cp ~/Downloads/slave.jar hudson.remoting.jnlp.Main                              
two arguments required, but got []
java -jar agent.jar [options...] <secret key> <agent name>
 -agentLog FILE                  : Local agent error log destination (overrides
                                   workDir)
 -cert VAL                       : Specify additional X.509 encoded PEM
                                   certificates to trust when connecting to
                                   Jenkins root URLs. If starting with @ then
                                   the remainder is assumed to be the name of
                                   the certificate file to read.
 -credentials USER:PASSWORD      : HTTP BASIC AUTH header to pass in for making
                                   HTTP requests.
 -disableHttpsCertValidation     : Ignore SSL validation errors - use as a last
                                   resort only.
 -failIfWorkDirIsMissing         : Fails the initialization if the requested
                                   workDir or internalDir are missing ('false'
                                   by default)
 -headless                       : Run in headless mode, without GUI
 -internalDir VAL                : Specifies a name of the internal files
                                   within a working directory ('remoting' by
                                   default)
 -jar-cache DIR                  : Cache directory that stores jar files sent
                                   from the master
 -loggingConfig FILE             : Path to the property file with
                                   java.util.logging settings
 -noKeepAlive                    : Disable TCP socket keep alive on connection
                                   to the master.
 -noreconnect                    : If the connection ends, don't retry and just
                                   exit.
 -proxyCredentials USER:PASSWORD : HTTP BASIC AUTH header to pass in for making
                                   HTTP authenticated proxy requests.
 -tunnel HOST:PORT               : Connect to the specified host and port,
                                   instead of connecting directly to Jenkins.
                                   Useful when connection to Hudson needs to be
                                   tunneled. Can be also HOST: or :PORT, in
                                   which case the missing portion will be
                                   auto-configured like the default behavior
 -url URL                        : Specify the Jenkins root URLs to connect to.
 -workDir FILE                   : Declares the working directory of the
                                   remoting instance (stores cache and logs by
                                   default)

Fixes #30. nomad-0.6 hpi.

asquel commented 6 years ago

@jippi or whoever is able to merge the PR, could you do it please ?

jippi commented 6 years ago

there is a lot of noise in the PR - next to impossible to review it properly :(

asquel commented 6 years ago

@jippi it's just code formatting ... A lot of people are putting Jenkins behind a LB, it's really a useful feature !!

phedoreanu commented 5 years ago

@jippi noise-level reduced. please review ;)

phedoreanu commented 5 years ago

Any luck getting this merged @jippi ? 🙄

jippi commented 5 years ago

@phedoreanu I'm not using this plugin any more - I've added you as a collaborator if you want to continue to maintain it :)

phedoreanu commented 5 years ago

Thx! I was wondering about https://jenkins.io/security/advisory/2019-04-03/#SECURITY-1058