Commit Graph
83 Commits
Author SHA1 Message Date
Christopher Simons 7efb9090dd remove unused import statements
In addition to cluttering the namespace, unused imports generate
compiler warnings, introducing noise and obscuring more important
compiler warnings.  This change removes them.
2015-11-10 10:13:52 -05:00
David Hoover 1709ed3a2e Add @Deprecated annotations to things documented as @deprecated. 2015-04-19 14:50:12 -07:00
Jesse Glick 89cbfc4639 Merge branch 'SECURITY-144' into SECURITY-144-rc
Conflicts:
	core/src/main/java/hudson/EnvVars.java
	core/src/main/java/hudson/FilePath.java
	core/src/main/java/hudson/cli/ClientAuthenticationCache.java
	core/src/main/java/hudson/markup/MyspacePolicy.java
	core/src/main/java/hudson/model/Computer.java
	core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java
	core/src/main/java/hudson/node_monitors/ResponseTimeMonitor.java
	core/src/main/java/hudson/node_monitors/TemporarySpaceMonitor.java
	core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java
	core/src/main/java/hudson/slaves/Channels.java
	core/src/main/java/hudson/slaves/SlaveComputer.java
	core/src/main/java/hudson/tasks/Fingerprinter.java
	core/src/main/java/hudson/tasks/Shell.java
	core/src/main/java/hudson/tasks/junit/JUnitParser.java
	core/src/main/java/hudson/tasks/test/DefaultTestResultParserImpl.java
	core/src/main/java/hudson/util/ProcessTree.java
	core/src/main/java/hudson/util/RemotingDiagnostics.java
	core/src/main/java/jenkins/model/Jenkins.java
	core/src/test/java/hudson/LauncherTest.java
	pom.xml
	test/src/test/java/hudson/tasks/junit/CaseResultTest.java
2014-09-26 15:56:48 -04:00
Kohsuke Kawaguchi ffb5b65093 Switched from annotation based scheme to a function based scheme. 2014-09-23 19:12:43 -07:00
Kohsuke Kawaguchi 101b4e7fd5 [SECURITY-144] Classify all the core callables one way or the other 2014-09-18 15:07:31 -07:00
Kohsuke Kawaguchi 9009cccffb Updating to reflect changes made in remoting 2014-09-08 12:44:32 +01:00
Nicolas De loof 314bd64604 set @since on DecoratedLauncher 2014-09-02 12:04:12 +02:00
Jesse Glick 11ab9be6ef [FIXED JENKINS-23027] Added Launcher.ProcStarter.quiet option. 2014-08-08 14:29:40 -04:00
Oleg Nenashev ef943a3ee6 [FIXED JENKINS-20559] - ProcStarter: Check for null before cloning of environment variables list
Resolves https://issues.jenkins-ci.org/browse/JENKINS-20559
BTW, I also need to add some tests to "Test Harness" in order to improve coverage of nested operations.
These test require a fix for https://issues.jenkins-ci.org/browse/JENKINS-19454

Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>
2014-06-01 14:48:53 +04:00
Oleg Nenashev a865a52562 [FIXED JENKINS-19454] - Added DecoratedLauncher implementation to the core.
This launcher Allows subclasses to only implement methods they want to override.
Originally, this launcher has been implemented in Custom Tools Plugin, but there are many duplicates in other plugins => it would be useful to have it in Jenkins core.

Resolves https://issues.jenkins-ci.org/browse/JENKINS-19454

Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>
2014-06-01 14:48:44 +04:00
Kohsuke Kawaguchi a87f329b7e Channel.terminate() is now public 2014-04-04 18:07:25 -07:00
Kohsuke Kawaguchi 0b27f364f9 [JENKINS-22354]
Avoid having FilePath to depend on Jenkins, which increases the amount of classloading that has to happen during remoting
2014-04-03 20:17:24 -07:00
christ66 eabd1ba5ce Throw IOException if trying to launch a DummyLauncher. Restrict
DummyLauncher class to no external use.
2014-03-18 11:26:44 -07:00
christ66 d2a2ec589f [FIXED JENKINS-21999] If a slave node does not exist it will throw a
null pointer exception. Instead we create a dummy launcher and return
that if it is unable to get the slave node.
2014-02-28 14:46:28 -08:00
ikedam 4204d22496 [FIX JENKINS-20280] Calculates the order to override variables. This is an improved fix for [JENKINS-19488] and [JENKINS-19926]. 2013-10-26 13:38:30 -07:00
Vojtech Juranek b95f269452 [FIXED JENKINS-19926] Add only new env. variables
Previous patch (3eea396489) broke usescases when evn. variable overwrites already existing one
like PATH = $PATH:/my/path
2013-10-10 22:23:54 +02:00
Vojtech Juranek 3eea396489 [FIXED JENKINS-19488] Expand variable in a consistent way 2013-09-06 13:09:01 +02:00
Tim Lantz 656738c020 [JENKINS-18368] added isUnix override to launcher decorator classes so that isUnix is maintained for remote launcherswq 2013-06-16 23:23:49 -04:00
Jesse Glick 58484bb80c [FIXED JENKINS-15733] ArrayIndexOutOfBoundsException from Launcher due to misinterpretation of ProcStarter.envs in f5cebdc.
(Should this field be made a [LinkedHash]Map<String,String> or even EnvVars?
It is protected in a final class, so effectively package-private, thus not a b/w compat issue.)
2012-11-07 16:36:05 -05:00
Kohsuke Kawaguchi 0e8acc1507 these didn't make it into 1.488 2012-10-25 06:28:22 +09:00
Kohsuke Kawaguchi f5cebdc843 Added another decorator.
This allows us to pass in a proper Launcher that handles all the environment variables without asking individual user to fill in a proper environment variables
2012-10-25 03:03:04 +09:00
Jesse Glick 1f9ce5e4da Javadoc improvements inspired by “How to stop passwords used by my scm plugin from appearing the log?” on jenkinsci-dev. 2012-09-12 14:31:30 -04:00
Jesse Glick 2f128a77b2 Mangled Javadoc. 2012-07-15 11:31:40 -04:00
Ryan Campbell 684fe360a5 Don't prefix the masks if they are null (prevent NPE)
fix tabs
2012-03-15 18:55:35 -05:00
Craig P. Motlin 22b13104b3 Remove unnecessary interface modifiers. 2011-11-07 14:52:11 -08:00
Kohsuke Kawaguchi 8c95d32086 added another convenience method 2011-09-23 15:16:59 -07:00
Nigel Magnay 5679d019ec Move hudson.model.Jenkins to be jenkins.model.Jenkins - part II
Just import changes, from hudson.model.Jenkins -> jenkins.model.Jenkins,
and Javadoc comments.

Signed-off-by: Nigel Magnay <nigel.magnay@gmail.com>
2011-05-29 11:06:28 +01:00
Nigel Magnay 70c1065814 Stage 1 : Create hudson.model.Jenkins, make Hudson derive from Jenkins.
Signed-off-by: Nigel Magnay <nigel.magnay@gmail.com>
2011-05-29 11:00:58 +01:00
Olivier Lamy 888b9d3683 [JENKINS-9006] update changelog 2011-03-10 21:29:16 +01:00
Kohsuke Kawaguchi a545a394d9 for serialization work these interfaces need to be public 2011-02-16 08:28:00 -08:00
Kohsuke Kawaguchi 96dd84b5d0 [FIXED JENKINS-7809] expose child process stdout as InputStream.
I added a mode where one can launch a child process without the built-in pumping support, making it trivial to read until EOF in the distributed environments.

 This concludes the fix.
2011-02-16 08:28:00 -08:00
Kohsuke Kawaguchi 3a3690b281 [FIXED JENKINS-7809] fixed a race condition in obtaining the tail of the output from remote process. 2011-02-14 17:13:24 -08:00
kohsuke dce4dfacfb Merged revisions 31908-31909 via svnmerge from
https://svn.dev.java.net/svn/hudson/branches/rc

........
  r31908 | kohsuke | 2010-06-09 20:47:06 -0700 (Wed, 09 Jun 2010) | 1 line
  
  additional compilation problem
........
  r31909 | kohsuke | 2010-06-09 21:08:13 -0700 (Wed, 09 Jun 2010) | 1 line
  
  fixing compilation problems
........


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@31910 71c3de6d-444a-0410-be80-ed276b4c234a
2010-06-10 04:11:48 +00:00
kohsuke a559b1635a Fixed http://n4.nabble.com/Password-masking-when-running-commands-on-a-slave-tp1753033p1753033.html
Mask wasn't sent properly to slaves.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29920 71c3de6d-444a-0410-be80-ed276b4c234a
2010-04-10 01:17:04 +00:00
kohsuke 9dbd212039 fixed NPE if stdout isn't given:
Exception: 
Stacktrace:
java.lang.NullPointerException: out is null
	at hudson.util.StreamCopyThread.(StreamCopyThread.java:44)
	at hudson.util.StreamCopyThread.(StreamCopyThread.java:51)
	at hudson.Proc$LocalProc.(Proc.java:150)
	at hudson.Proc$LocalProc.(Proc.java:121)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:633)
	at hudson.Launcher$ProcStarter.start(Launcher.java:268)
	at hudson.Launcher$ProcStarter.join(Launcher.java:275)
	at hudson.plugins.script_realm.ScriptSecurityRealm.authenticate(ScriptSecurityRealm.java:62)
	at hudson.security.AbstractPasswordBasedSecurityRealm$Authenticator.retrieveUser(AbstractPasswordBasedSecurityRealm.java:137)
	at org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:119)
	at org.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:195)
	at org.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:45)
	at org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:71)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:252)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
	at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
	at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
	at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
	at java.lang.Thread.run(Thread.java:637)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29867 71c3de6d-444a-0410-be80-ed276b4c234a
2010-04-08 05:29:38 +00:00
jglick fbda18e384 [FIXED HUDSON-5296] Remote launcher failed to print any of the commands it was running to the listener the way the local launcher does.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@25870 71c3de6d-444a-0410-be80-ed276b4c234a
2010-01-15 18:41:51 +00:00
mindless 04f9e38662 envVars was unused in LocalLauncher.. add these to env.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@25360 71c3de6d-444a-0410-be80-ed276b4c234a
2010-01-04 19:05:14 +00:00
kohsuke 6ae6d7d229 typo
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@24850 71c3de6d-444a-0410-be80-ed276b4c234a
2009-12-22 17:56:21 +00:00
jglick 03842a08c9 If a process sends data to stdout but no stdout is configured, an NPE can result.
Observed only inside a unit test, but makes sense to treat out symmetrically with err and in.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23524 71c3de6d-444a-0410-be80-ed276b4c234a
2009-11-06 18:31:51 +00:00
mindless 21e3b3ec60 Add "since .." on deprecated things
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21863 71c3de6d-444a-0410-be80-ed276b4c234a
2009-09-18 18:54:42 +00:00
mindless db93c57e03 Add @Override annotations, one copyright header and some tab->ws
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21655 71c3de6d-444a-0410-be80-ed276b4c234a
2009-09-14 19:10:57 +00:00
kohsuke 550e2d8c57 added a reference to a typical way of creating a Launcher
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@19668 71c3de6d-444a-0410-be80-ed276b4c234a
2009-07-13 19:20:49 +00:00
kohsuke a86fe5e9c7 reformatted import statements
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@19435 71c3de6d-444a-0410-be80-ed276b4c234a
2009-07-06 21:32:11 +00:00
kohsuke af1d6538f4 generalized ProcessTreeKiller to expose more system information, so that the plugins and core can do more interesting things.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@19434 71c3de6d-444a-0410-be80-ed276b4c234a
2009-07-06 21:31:29 +00:00
kohsuke 42b93fe0d9 Exposes more methods to enable decoration of Launcher
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@19109 71c3de6d-444a-0410-be80-ed276b4c234a
2009-06-22 17:30:05 +00:00
kohsuke fb83ad3e73 NPE fix
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18946 71c3de6d-444a-0410-be80-ed276b4c234a
2009-06-16 06:51:13 +00:00
kohsuke fafa4bec66 NPE fix
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18945 71c3de6d-444a-0410-be80-ed276b4c234a
2009-06-16 06:46:57 +00:00
kohsuke bcd8e37595 finally introduced the builder pattern for Launcher, to stop combinatorial explosion of the launch method
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18944 71c3de6d-444a-0410-be80-ed276b4c234a
2009-06-16 06:38:22 +00:00
kohsuke 3e91399493 added a convenience constructor
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16995 71c3de6d-444a-0410-be80-ed276b4c234a
2009-04-10 01:39:02 +00:00
kohsuke 8585d3d5fa added a hook for decorating launchers
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16994 71c3de6d-444a-0410-be80-ed276b4c234a
2009-04-10 01:27:08 +00:00