Skip to content

Commit

Permalink
Update Windows Agent Installer to 1.7 and WinSW to 2.0.2 (#2765)
Browse files Browse the repository at this point in the history
### WinSW changes

The update includes many fixes and improvements, the full list is provided in the [WinSW changelog](https://github.com/kohsuke/winsw/blob/master/CHANGELOG.md). There are several issues referenced in Jenkins bugtracker:

* [JENKINS-22692](https://issues.jenkins-ci.org/browse/JENKINS-22692) - Connection reset issues when WinSW gets terminated due to the system shutdown
* [JENKINS-23487](https://issues.jenkins-ci.org/browse/JENKINS-23487)- Support of shared directories in WinSW
* [JENKINS-39231](https://issues.jenkins-ci.org/browse/JENKINS-39231) - Enable Runaway Process Killer by default
* [JENKINS-39237](https://issues.jenkins-ci.org/browse/JENKINS-39237) - Auto-upgrade of JNLP agent versions on the slaves

### Windows Agent Installer changes

* Adapt the default configurations to pick fixes above
* Slave => Agent renaming where possible

### Jenkins core changes

* Modify the configuration template, reference advanced options
* Enable Runaway Process Killer by default

* Update Windows Agent Installer to 1.7

* Remove the obsolete jenkins-slave.xml file from the core.

Now it is within windows-slave-installer

* Use the deployed Snapshot for CI

* Pick the release version of windows-slave-installer-1.7
  • Loading branch information
oleg-nenashev committed Mar 8, 2017
1 parent e0603bb commit e698d1d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 54 deletions.
2 changes: 1 addition & 1 deletion core/pom.xml
Expand Up @@ -755,7 +755,7 @@ THE SOFTWARE.
<artifactItem>
<groupId>com.sun.winsw</groupId>
<artifactId>winsw</artifactId>
<version>1.16</version>
<version>2.0.2</version>
<classifier>bin</classifier>
<type>exe</type>
<outputDirectory>${project.build.outputDirectory}/windows-service</outputDirectory>
Expand Down
49 changes: 0 additions & 49 deletions core/src/main/resources/windows-service/jenkins-slave.xml

This file was deleted.

25 changes: 22 additions & 3 deletions core/src/main/resources/windows-service/jenkins.xml
@@ -1,7 +1,7 @@
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
Copyright (c) 2004-2017, Sun Microsystems, Inc., Kohsuke Kawaguchi, Oleg Nenashev, and other Jenkins contributors
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 All @@ -23,15 +23,15 @@ THE SOFTWARE.
-->

<!--
Windows service definition for Jenkins
Windows service definition for Jenkins.
To uninstall, run "jenkins.exe stop" to stop the service, then "jenkins.exe uninstall" to uninstall the service.
Both commands don't produce any output if the execution is successful.
-->
<service>
<id>jenkins</id>
<name>Jenkins</name>
<description>This service runs Jenkins continuous integration system.</description>
<description>This service runs Jenkins automation server.</description>
<env name="JENKINS_HOME" value="%BASE%"/>
<!--
if you'd like to run Jenkins with a specific version of Java, specify a full path to java.exe.
Expand All @@ -47,4 +47,23 @@ THE SOFTWARE.
<logmode>rotate</logmode>

<onfailure action="restart" />

<!--
In the case WinSW gets terminated and leaks the process, we want to abort
these runaway JAR processes on startup to prevent corruption of JENKINS_HOME.
So this extension is enabled by default.
-->
<extensions>
<!-- This is a sample configuration for the RunawayProcessKiller extension. -->
<extension enabled="true"
className="winsw.Plugins.RunawayProcessKiller.RunawayProcessKillerExtension"
id="killOnStartup">
<pidfile>%BASE%\jenkins.pid</pidfile>
<stopTimeout>10000</stopTimeout>
<stopParentFirst>false</stopParentFirst>
</extension>
</extensions>

<!-- See the referenced examples for more options -->

</service>
2 changes: 1 addition & 1 deletion war/pom.xml
Expand Up @@ -114,7 +114,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>windows-slave-installer</artifactId>
<version>1.6</version>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
Expand Down

0 comments on commit e698d1d

Please sign in to comment.