Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #138 from jeffret-b/remoting-3.40
Browse files Browse the repository at this point in the history
Update to Remoting 3.40.
  • Loading branch information
oleg-nenashev authored Jan 11, 2020
2 parents c98c431 + 6988740 commit c03fb8c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

ARG version=3.36-1
ARG version=3.40-1
FROM jenkins/slave:$version

ARG version
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

ARG version=3.36-1-alpine
ARG version=3.40-1-alpine
FROM jenkins/slave:$version

ARG version
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-jdk11
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

ARG version=3.36-1-jdk11
ARG version=3.40-1-jdk11
FROM jenkins/slave:$version

ARG version
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,9 @@ Optional environment variables:

### Enabled JNLP protocols

By default, the [JNLP3-connect](https://github.com/jenkinsci/remoting/blob/master/docs/protocols.md#jnlp3-connect) is disabled due to the known stability and scalability issues.
You can enable this protocol at your own risk using the
`JNLP_PROTOCOL_OPTS=-Dorg.jenkinsci.remoting.engine.JnlpProtocol3.disabled=false` property (the protocol should be enabled on the master side as well).

In Jenkins versions starting from `2.27` there is a [JNLP4-connect](https://github.com/jenkinsci/remoting/blob/master/docs/protocols.md#jnlp4-connect) protocol.
If you use Jenkins `2.32.x LTS`, it is recommended to enable the protocol on your instance.
As of version 3.40-1 this image only supports the [JNLP4-connect](https://github.com/jenkinsci/remoting/blob/master/docs/protocols.md#jnlp4-connect) protocol.
Earlier, long-unsupported protocols have been removed.
As a result, Jenkins versions prior to 2.32 are no longer supported.

### Amazon ECS

Expand Down
9 changes: 2 additions & 7 deletions jenkins-agent
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# The MIT License
#
# Copyright (c) 2015-2019, CloudBees, Inc.
# Copyright (c) 2015-2020, CloudBees, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -68,11 +68,6 @@ else
JENKINS_AGENT_NAME="$JENKINS_NAME"
fi

if [ -z "$JNLP_PROTOCOL_OPTS" ]; then
echo "Warning: JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to alter the behavior"
JNLP_PROTOCOL_OPTS="-Dorg.jenkinsci.remoting.engine.JnlpProtocol3.disabled=true"
fi

if [ -n "$JENKINS_PROTOCOLS" ]; then
PROTOCOLS="-protocols $JENKINS_PROTOCOLS"
fi
Expand Down Expand Up @@ -113,5 +108,5 @@ else
#TODO: Handle the case when the command-line and Environment variable contain different values.
#It is fine it blows up for now since it should lead to an error anyway.

exec $JAVA_BIN $JAVA_OPTS $JNLP_PROTOCOL_OPTS -cp /usr/share/jenkins/agent.jar hudson.remoting.jnlp.Main -headless $TUNNEL $URL $WORKDIR $DIRECT $PROTOCOLS $INSTANCE_IDENTITY $OPT_JENKINS_SECRET $OPT_JENKINS_AGENT_NAME "$@"
exec $JAVA_BIN $JAVA_OPTS -cp /usr/share/jenkins/agent.jar hudson.remoting.jnlp.Main -headless $TUNNEL $URL $WORKDIR $DIRECT $PROTOCOLS $INSTANCE_IDENTITY $OPT_JENKINS_SECRET $OPT_JENKINS_AGENT_NAME "$@"
fi
10 changes: 2 additions & 8 deletions jenkins-agent.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License
#
# Copyright (c) 2019, Alex Earl
# Copyright (c) 2019-2020, Alex Earl
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -88,12 +88,6 @@ if(![System.String]::IsNullOrWhiteSpace($Cmd)) {
}
$Name = $Name.Trim()

$jnlpProtocolOpts = ''
if([System.String]::IsNullOrWhiteSpace($env:JNLP_PROTOCOL_OPTS)) {
Write-Warning "JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to alter the behavior"
$jnlpProtocolOpts="-D`"org.jenkinsci.remoting.engine.JnlpProtocol3.disabled=true`""
}

# if java home is defined, use it
$JAVA_BIN="java.exe"
if(![System.String]::IsNullOrWhiteSpace($JavaHome)) {
Expand All @@ -114,5 +108,5 @@ if(![System.String]::IsNullOrWhiteSpace($Cmd)) {

#TODO: Handle the case when the command-line and Environment variable contain different values.
#It is fine it blows up for now since it should lead to an error anyway.
Start-Process -FilePath $JAVA_BIN -Wait -NoNewWindow -ArgumentList $("$jnlpProtocolOpts -cp C:/ProgramData/Jenkins/agent.jar hudson.remoting.jnlp.Main -headless$Tunnel$Url$WorkDir$Secret $Name")
Start-Process -FilePath $JAVA_BIN -Wait -NoNewWindow -ArgumentList $("-cp C:/ProgramData/Jenkins/agent.jar hudson.remoting.jnlp.Main -headless$Tunnel$Url$WorkDir$Secret $Name")
}

0 comments on commit c03fb8c

Please sign in to comment.