Skip to content

Commit

Permalink
[JEP-222] WebSocket support (#4369)
Browse files Browse the repository at this point in the history
* Playing with WebSocket connections.

* Pluggable handlers.

* errorWithoutStack

* Server-side keepalive pings.

* Redesigned to work as an HttpResponse.

* Unused dep.

* Comment on JnlpSlaveRestarterInstaller.

* Sketch of WebSocket-based endpoint for JNLPLauncher.

* Comment.

* Test enhancement.

* Making it more obvious from JNLPLauncherTest where remoting.jar is being loaded from.

* Reworked protocol to negotiate remote capabilities.

* Unhelpful comment.

* Simplifying handshake to use HTTP headers.

* Moving code into top-level classes and otherwise prettifying.

* Linking to upstream PRs.

* Timestamped snapshot + incremental.

* Picking up incrementalified build of winstone.

* Working around jenkinsci/lib-access-modifier#17.

* Finally have an incrementalified build of remoting.

* Use -webSocket option.

* Handling some close and error methods.

* Sending X-Remoting-Minimum-Version.

* If hudson.remoting.jnlp.Main._main fails, show the error.

* Comment.

* GUI analogue of jenkinsci/remoting@86cea5b.

* Missing since tags.

* Capitalization.

* WebSockets.isSupported

* Rather than hiding JNLPLauncher.DescriptorImpl when the TCP port is disabled, always display it, but show form validation appropriate to WebSocket or TCP mode.

* Form validation fixes.

* Minor test improvements.

* Reworked WebSocketAgents to be compatible with JnlpAgentReceiver.

* Removing WebSocketSession.keepAlive in favor of a global setting applicable to all services.

* Add a -webSocket option to the Jenkins CLI.

* Using a snapshot deployment of Remoting, pending INFRA-2379.

* After #3838 there is no reason to recheck authentication after parsing CLICommand arguments.

* Advertise the -webSocket option.

* Adapt to newer HtmlUnit.

* HtmlUnit/htmlunit#29 seems to have been incompatible.
WebClient.addRequestHeader will no longer override a header in a WebRequest,
such as when the same WebClient/WebRequest was previously used with different headers.

* Tracked down a behavioral change in passing through URL-encoded path characters.
HtmlUnit/htmlunit@2c49568 picks up
apache/httpcomponents-client@8c04c6a which is the actual change.

* Disabled TCP port does not matter in WebSocket mode.

* Shade dependencies needed for jenkins-cli.jar.

* Help text edit.

* jenkinsci/winstone#79 was released as 5.5.

* jenkinsci/jenkins-test-harness#183 released as 2.59.

* #4387 (comment)

* Bumping remoting to a new deployed snapshot.

* Need jenkinsci/winstone#86.

* jenkinsci/winstone#86 released as 5.6.

* Introduced constant for X-Remoting-Minimum-Version.

* s/slave/agent/ in GUI

* Removing in-JVM test, as it was no longer useful after introducing shading anyway.

* Bump.

* No need to check for anonymous CONNECT here.

* s/jenkins.slaves/jenkins.agents/g for new code.

* Restrict the diagnostic endpoint to administrators.

* Fixed Javadoc import after package move.

* jenkinsci/remoting#357 released as 4.0.
  • Loading branch information
jglick authored and oleg-nenashev committed Jan 21, 2020
1 parent 0dd7009 commit 5b50402
Show file tree
Hide file tree
Showing 30 changed files with 1,262 additions and 352 deletions.
90 changes: 58 additions & 32 deletions cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,17 @@
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>access-modifier-annotation</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>annotation-indexer</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand All @@ -71,32 +74,41 @@
<groupId>org.jvnet.localizer</groupId>
<artifactId>localizer</artifactId>
<version>1.26</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-core</artifactId>
<version>1.7.0</version>
<optional>true</optional> <!-- do not expose to core -->
<optional>true</optional>
</dependency>
<!-- ed25519 algorithm, see JENKINS-45318 -->
<dependency>
<groupId>net.i2p.crypto</groupId>
<artifactId>eddsa</artifactId>
<version>0.3.0</version>
<optional>true</optional>
</dependency>
<!-- ed25519 algorithm, see JENKINS-45318 -->
<dependency>
<groupId>net.i2p.crypto</groupId>
<artifactId>eddsa</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<optional>true</optional> <!-- ditto -->
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.tyrus.bundles</groupId>
<artifactId>tyrus-standalone-client-jdk</artifactId>
<version>1.12</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<optional>true</optional>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<optional>true</optional>
</dependency>
</dependencies>

Expand All @@ -107,29 +119,43 @@
<version>2.22.2</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>hudson.cli.CLI</mainClass>
</manifest>
<manifestEntries>
<Jenkins-CLI-Version>${project.version}</Jenkins-CLI-Version>
</manifestEntries>
</archive>
</configuration>
</execution>
</executions>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
<relocation>
<pattern>javax.websocket</pattern>
<shadedPattern>io.jenkins.cli.shaded.javax.websocket</shadedPattern>
</relocation>
<relocation>
<pattern>org</pattern>
<shadedPattern>io.jenkins.cli.shaded.org</shadedPattern>
</relocation>
<relocation>
<pattern>net</pattern>
<shadedPattern>io.jenkins.cli.shaded.net</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>hudson.cli.CLI</mainClass>
<manifestEntries>
<Jenkins-CLI-Version>${project.version}</Jenkins-CLI-Version>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jvnet.localizer</groupId>
Expand Down
Loading

0 comments on commit 5b50402

Please sign in to comment.