Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from oleg-nenashev/bug/JENKINS-42746
[JENKINS-42746] - Make the plugin independent from the XML sample in the core
- Loading branch information
Showing
3 changed files
with
103 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
src/main/resources/hudson/os/windows/configsamples/jenkins-slave.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<!-- | ||
The MIT License | ||
Copyright (c) 2004-2017, Sun Microsystems, Inc., Kohsuke Kawaguchi, Oleg Nenashev and other 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 | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
--> | ||
|
||
<!-- | ||
Windows service definition for Jenkins agent. | ||
This service is powered by the WinSW project: https://github.com/kohsuke/winsw/ | ||
You can find more information about available options here: https://github.com/kohsuke/winsw/blob/master/doc/xmlConfigFile.md | ||
Configuration examples are available here: https://github.com/kohsuke/winsw/tree/master/examples | ||
To uninstall, run "jenkins-slave.exe stop" to stop the service, then "jenkins-slave.exe uninstall" to uninstall the service. | ||
Both commands don't produce any output if the execution is successful. | ||
--> | ||
<!-- | ||
TODO: this is a copy of the configuration file in Windows Agent Installer module 1.7 stored directly in windlows-slaves plugin | ||
As per JENKINS-42743, the agent should use the module's API | ||
--> | ||
<service> | ||
<id>@ID@</id> | ||
<name>Jenkins agent (@ID@)</name> | ||
<description>This service runs an agent for Jenkins automation server.</description> | ||
<!-- | ||
if you'd like to run Jenkins with a specific version of Java, specify a full path to java.exe. | ||
The following value assumes that you have java in your PATH. | ||
--> | ||
<executable>@JAVA@</executable> | ||
<arguments>-Xrs @VMARGS@ -jar "%BASE%\slave.jar" @ARGS@</arguments> | ||
<!-- | ||
interactive flag causes the empty black Java window to be displayed. | ||
I'm still debugging this. | ||
<interactive /> | ||
--> | ||
<logmode>rotate</logmode> | ||
|
||
<onfailure action="restart" /> | ||
|
||
<!-- | ||
If uncommented, download the Remoting version provided by the Jenkins master. | ||
Enabling for HTTP implies security risks (e.g. replacement of JAR via DNS poisoning). Use on your own risk. | ||
NOTE: This option may fail to work correctly (e.g. if Jenkins is located behind HTTPS with untrusted certificate). | ||
In such case the old agent version will be used; you can replace slave.jar manually or to specify another download URL. | ||
--> | ||
<!-- <download from=\"TODO:jarFile\" to=\"%BASE%\\slave.jar\"/> --> | ||
|
||
<!-- | ||
In the case WinSW gets terminated and leaks the process, we want to abort | ||
these runaway JAR processes on startup to prevent "Slave is already connected errors" (JENKINS-28492). | ||
Will be enabled in WinSW 2.0 or higher | ||
--> | ||
<extensions> | ||
<!-- This is a sample configuration for the RunawayProcessKiller extension. --> | ||
<extension enabled="true" | ||
className="winsw.Plugins.RunawayProcessKiller.RunawayProcessKillerExtension" | ||
id="killOnStartup"> | ||
<pidfile>%BASE%\jenkins_agent.pid</pidfile> | ||
<stopTimeout>5000</stopTimeout> | ||
<stopParentFirst>false</stopParentFirst> | ||
</extension> | ||
</extensions> | ||
|
||
<!-- See referenced examples for more options --> | ||
|
||
</service> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters