Commit Graph
38 Commits
Author SHA1 Message Date
Kohsuke Kawaguchi 5b81675c6d added a convenience method 2014-03-11 09:22:27 -07:00
ikedam 6d56de71cb [JENKINS-20280] Use topological sorting to decide the order to override variables. 2013-11-01 23:55:29 +09:00
ikedam 562c64bbdb [JENKINS-20280] Make it easy to change the implementation. Especially Map.Entry is not so convenient to handle. 2013-11-01 22:11:18 +09: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
cjo9900 3776891794 Document when EnvVars.get() function was added. 2012-11-09 18:54:29 +00:00
Kohsuke Kawaguchi ead639a1c0 added a convenience method 2012-09-30 14:45:44 -07:00
Kohsuke Kawaguchi 88de1669df Jenkins 2011-12-15 09:38:30 -08:00
Kohsuke Kawaguchi d41d9ff777 As Dean pointed out, this was an incompatible change.
This reverts commit 0cab76ae1f.
2011-06-06 12:38:43 -07:00
Kohsuke Kawaguchi 0cab76ae1f Jenkins 2011-03-28 21:32:58 -07:00
Brian Atkinson acfa7597bf Clean up a few javadoc typos 2011-02-16 19:48:44 -06:00
kohsuke 21ad12ffc0 defined a system property to remove MAVEN_OPTS from Maven builds forked inside.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@34044 71c3de6d-444a-0410-be80-ed276b4c234a
2010-08-23 19:05:03 +00:00
kohsuke ad7b504ced user report indicates that if someone puts a null value into a system proeprty we get a hard-to-diagnose NPE. Adding code to proactively watch out for that:
[workspace] $ /usr/lib/jvm/sun-jdk-1.6/bin/java -cp /opt/glassfish/.hudson/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.355.jar:/usr/share/maven-bin-2.1/boot/classworlds-1.1.jar hudson.maven.agent.Main /usr/share/maven-bin-2.1 /opt/glassfish/server/glassfish/domains/domain1/applications/hudson/WEB-INF/lib/remoting-1.355.jar /opt/glassfish/.hudson/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.355.jar 35855 /opt/glassfish/.hudson/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar
<===[HUDSON REMOTING CAPACITY]===>���channel started
channel stopped
ERROR: Processing failed due to a bug in the code. Please report this to users@hudson.dev.java.net
java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:394)
	at java.util.Hashtable.putAll(Hashtable.java:466)
	at hudson.maven.MavenBuilder.call(MavenBuilder.java:156)
	at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:696)
	at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:640)
	at hudson.remoting.UserRequest.perform(UserRequest.java:114)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:270)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
project=hudson.maven.MavenModuleSet@19cc863[Meetspace]
project.getModules()=[hudson.maven.MavenModule@19fef64[Meetspace/com.steeplesoft:meetspace], hudson.maven.MavenModule@bc2f14[Meetspace/com.steeplesoft.meetspace:meetspace-parent], hudson.maven.MavenModule@11d8f11[Meetspace/com.steeplesoft.meetspace:plugin-engine], hudson.maven.MavenModule@b6e204[Meetspace/com.steeplesoft.meetspace:webapp], hudson.maven.MavenModule@b097da[Meetspace/com.steeplesoft.meetspace.plugins:helloworld-plugin], hudson.maven.MavenModule@1c18b6a[Meetspace/com.steeplesoft.meetspace.plugins:plugin-api], hudson.maven.MavenModule@1a80928[Meetspace/com.steeplesoft.meetspace.plugins:plugin-engine]]
project.getRootModule()=hudson.maven.MavenModule@bc2f14[Meetspace/com.steeplesoft.meetspace:meetspace-parent]
FATAL: null
java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:394)
	at java.util.Hashtable.putAll(Hashtable.java:466)
	at hudson.maven.MavenBuilder.call(MavenBuilder.java:156)
	at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:696)
	at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:640)
	at hudson.remoting.UserRequest.perform(UserRequest.java:114)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:270)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@30326 71c3de6d-444a-0410-be80-ed276b4c234a
2010-04-22 17:14:06 +00:00
kohsuke 68edd4f804 [FIXED HUDSON-5391] in 1.344. we should be case insensitive but case preserving.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@26640 71c3de6d-444a-0410-be80-ed276b4c234a
2010-01-28 19:36:52 +00:00
mindless 22b729ff81 Add authentication support in hudson.Main (if username/password are included in
HUDSON_HOME URL, then include Authorization header in Hudson http requests).

Also moved Functions.isUnitTest to Main.isUnitTest, to remove dependency on
winstone.jar for running hudson.Main (Main uses EnvVars which checks isUnitTest
flag.. in Functions which uses servlet classes).

Updated http://wiki.hudson-ci.org/display/HUDSON/Monitoring+external+jobs
with info about required jars and authentication.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21479 71c3de6d-444a-0410-be80-ed276b4c234a
2009-09-05 04:49:03 +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 fcb1e18fc1 forked Maven shouldn't see the Maven debug options.
This is only needed during debuggig Hudson and never in production, but this is the only place where we can put this code.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16510 71c3de6d-444a-0410-be80-ed276b4c234a
2009-03-25 04:22:50 +00:00
kohsuke a9c2567127 We might be handling environment variables for a slave that can have different path separator than the master, so this is an attempt to get it right. It's still more error prone that I'd like, but this should mostly work for our usage pattern.
The real problem is that AbstractBuild.getEnvVars() is designed to return overrides, not the whole thing. This was OK until recently, when we started using environment variables to eagerly perform variable expansions inside Builder/Publisher, which requires them to see the entire variables.
 


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16226 71c3de6d-444a-0410-be80-ed276b4c234a
2009-03-13 21:55:02 +00:00
kohsuke afb1240421 no need to double-wrap
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16224 71c3de6d-444a-0410-be80-ed276b4c234a
2009-03-13 21:14:41 +00:00
kohsuke 48db0a34e9 doc improvement
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16221 71c3de6d-444a-0410-be80-ed276b4c234a
2009-03-13 19:18:38 +00:00
huybrechts 3370ee3e31 support for environment variables in native Maven builds
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15927 71c3de6d-444a-0410-be80-ed276b4c234a
2009-03-01 20:43:52 +00:00
kohsuke c3ae1b7af9 prefer EnvVars over plain Map to signify the semantic difference between those two.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15712 71c3de6d-444a-0410-be80-ed276b4c234a
2009-02-25 01:52:42 +00:00
kohsuke 0c80771feb prefer better static typing
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15710 71c3de6d-444a-0410-be80-ed276b4c234a
2009-02-25 01:39:21 +00:00
huybrechts 87eb6367cd [HUDSON-2918] node properties and environment variables
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15502 71c3de6d-444a-0410-be80-ed276b4c234a
2009-02-20 22:12:06 +00:00
kohsuke 1a1d0d74d5 license header clean up
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15081 71c3de6d-444a-0410-be80-ed276b4c234a
2009-02-06 20:05:24 +00:00
dvrzalik f57418e56c Parameters without the '=' character shouldn't produce StringIndexOutOfBoundsException
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13474 71c3de6d-444a-0410-be80-ed276b4c234a
2008-12-08 14:42:41 +00:00
kohsuke 1537c16c37 clarified the docs.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8596 71c3de6d-444a-0410-be80-ed276b4c234a
2008-04-15 00:53:36 +00:00
kohsuke fe91f1c99b added a convenience method.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7972 71c3de6d-444a-0410-be80-ed276b4c234a
2008-03-23 02:51:39 +00:00
kohsuke ec4f9c86d5 sort items case insensitively (#1211)
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6864 71c3de6d-444a-0410-be80-ed276b4c234a
2008-01-25 03:04:18 +00:00
kohsuke feaeb6e595 moving the code from Computer to EnvVars.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6777 71c3de6d-444a-0410-be80-ed276b4c234a
2008-01-20 18:44:19 +00:00
kohsuke 4ec421c2e9 fixed #1115. the comparator needs to be created first before the masterEnvVars because the latter uses the former.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6461 71c3de6d-444a-0410-be80-ed276b4c234a
2008-01-03 04:38:39 +00:00
kohsuke 074602e668 use EnvVars to handle case insensitive lookup correctly.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6313 71c3de6d-444a-0410-be80-ed276b4c234a
2007-12-16 16:38:48 +00:00
kohsuke 78b96c34ed Fix for #968 was incomplete.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5831 71c3de6d-444a-0410-be80-ed276b4c234a
2007-11-10 22:30:01 +00:00
kohsuke c7d000027b d'oh!
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3209 71c3de6d-444a-0410-be80-ed276b4c234a
2007-04-22 21:23:00 +00:00
kohsuke 69ca99297b fixed #452 "Windows slave won't execute dos commands".
Env variable overrides like PATH needs to be done carefully, so that override happens on the slave, not on the master.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3201 71c3de6d-444a-0410-be80-ed276b4c234a
2007-04-22 17:22:17 +00:00
kohsuke 2dae329902 doc improvement.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3200 71c3de6d-444a-0410-be80-ed276b4c234a
2007-04-22 17:07:01 +00:00
kohsuke 027882b8a0 with Java5 dependency, there's no need to use Ant for environment variables.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3199 71c3de6d-444a-0410-be80-ed276b4c234a
2007-04-22 17:06:32 +00:00
jglick 239948d4d4 Some compiler lint.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1236 71c3de6d-444a-0410-be80-ed276b4c234a
2006-11-23 00:30:05 +00:00
kohsuke 8a0dc230f4 initial commit for a new layout.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@969 71c3de6d-444a-0410-be80-ed276b4c234a
2006-11-05 21:16:01 +00:00