Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d8129be05d65f4e098773c59e3c611e3096739e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!-- **************************************************************************
#
# Copyright  (c) 2004-2009 Oracle Corporation.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors: 
#
#    Kohsuke Kawaguchi
#        
#
#************************************************************************** --> 


<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson">
  <st:contentType value="application/x-java-jnlp-file" />
  <j:new var="h" className="hudson.Functions" />
  <j:set var="rootURL" value="${app.rootUrl}" />
  <!--
    See http://www.dallaway.com/acad/webstart/ for obtaining the certificate.
  -->
  <l:isAdminOrTest test="true">
    <!-- See http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html for the syntax -->
    <jnlp spec="1.0+"
        codebase="${rootURL}/computer/${h.encode(it.node.nodeName)}/">

      <information>
        <title>Slave Agent for ${it.displayName}</title>
        <vendor>Hudson job</vendor>
        <homepage href="https://hudson-ci.org/"/>
      </information>

      <security>
        <all-permissions/>
      </security>

      <resources>
        <j:set var="port" value="${request.getParameter('debugPort')}"/>
        <j:choose>
          <j:when test="${port!=null}">
            <j2se version="1.5+" java-vm-args="${it.launcher.vmargs} -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=${port}" />
          </j:when>
          <j:otherwise>
            <j2se version="1.5+" java-vm-args="${it.launcher.vmargs}"/>
          </j:otherwise>
        </j:choose>
        <jar href="${rootURL}/jnlpJars/remoting.jar"/>
        <property name="hudson.showWindowsServiceInstallLink" value="false" />
      </resources>

      <application-desc main-class="hudson.remoting.jnlp.Main">
        <argument>${app.secretKey}</argument>
        <argument>${it.node.nodeName}</argument>
        <j:if test="${it.launcher.tunnel!=null}">
          <argument>-tunnel</argument>
          <argument>${it.launcher.tunnel}</argument>
        </j:if>

        <argument>-url</argument>
        <argument>${rootURL}</argument>

        <j:if test="${rootURL!=app.rootUrlFromRequest}">
          <!--
            rootURL is based on the URL in the system config, but there has been
            numerous reports about people moving Hudson to another place but
            forgetting to update it. To improve the user experience in this regard,
            let's also pass the URL that the browser sent us as well, so that the
            JNLP Main class can try both.

            Note that rootURL is still necessary in various situations, such
            as reverse HTTP proxy situation, which makes rootUrlFromRequest incorrect.
          -->
          <argument>-url</argument>
          <argument>${app.rootUrlFromRequest}</argument>
        </j:if>
      </application-desc>
    </jnlp>
  </l:isAdminOrTest>
</j:jelly>

Back to the top