/usr/bin/auto-upgrade-tester-jenkins-slave is in auto-upgrade-tester 1:0.166.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 | #! /usr/bin/python3
#
# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
#
# This file is part of ubuntu-server-iso-testing.
#
# ubuntu-server-iso-testing is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, version 3 of
# the License.
#
# ubuntu-server-iso-testing is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ubuntu-server-iso-testing. If not, see
# <http://www.gnu.org/licenses/>.
#
import logging
import optparse
import os
try:
from urllib.request import urlretrieve
except ImportError:
from urllib import urlretrieve
import sys
import subprocess
import socket
usage="usage: %prog [options] HUDSON_URL"
parser = optparse.OptionParser(usage=usage)
parser.add_option("-d", "--debug", dest="debug", action="store_true", default=False,
help="enable debugging")
parser.add_option("-n", "--nodename", dest="nodename", default=socket.gethostname(),
help="hostname to use when registering with hudson (default=hostname)")
(options, args) = parser.parse_args()
if len(args) == 0:
logging.error("Need a HUDSON_URL to execute")
parser.print_help()
sys.exit(1)
if options.debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)
HUDSON_URL=args[0]
HUDSON_PATH="/computer/%s/slave-agent.jnlp"
SLAVE_URL=HUDSON_URL + 'jnlpJars/slave.jar'
SLAVE_JAR=os.path.expanduser("~/.slave.jar")
l_hudson_url= HUDSON_URL + HUDSON_PATH % options.nodename
logging.debug("Retrieving hudson slave.jar")
urlretrieve(SLAVE_URL, SLAVE_JAR)
cmd = [ 'java','-jar', SLAVE_JAR, '-jnlpUrl', l_hudson_url ]
logging.debug("Cmd: %s" % (cmd))
subprocess.check_call(cmd)
|