Commit Graph
31 Commits
Author SHA1 Message Date
Josh Soref c0815b50de Use StandardCharsets 2019-02-20 18:54:18 -05:00
mike cirioli 9a4a913e38 [JENKINS-48463] - update jenkins core to use xml v1.1
- switched to KxmlDriver (needed for xml 1.1 support)
  - updated to create xml v1.1 headers
  - updated test to use KXml2Driver explicitly
  - updated unit tests to support xml v1.1
2018-01-24 09:24:56 -05:00
Jesse Glick 1c7d422a12 Noting functionality which really ought to have been factored out into external-monitor-job but could not be. 2017-05-31 15:26:15 -04:00
Stephen Connolly 3871d7778e [JENKINS-43531] Plugins may not be expecting InvalidPathException
- Plugins should really be expecting it, but as historically they have not, may as well convert to IOE for them
2017-04-19 14:04:33 +01:00
Jesse Glick 23cb13aad0 Clean up usages of IOUtils.closeQuietly and related calls (#2830)
* Clean up usages of IOUtils.closeQuietly and related calls predating Java 7.

* Review comments from @oleg-nenashev.

* Noticed another place where try-with-resources would protect against a potential leak.
2017-04-08 00:41:27 +02:00
Stephen Connolly f0cd7ae8ff [JENKINS-42934] Avoid using new FileInputStream / new FileOutputStream 2017-03-20 12:50:46 +00:00
James Nord b6234721c1 kill those pesky hudson temp files 2017-03-06 17:34:16 +00:00
Johannes Ernst 9303136c9d Incorporated pull request feedback:
* moved to jenkins.util.SystemProperties
* consistent naming getString/getInteger/getBoolean
* improved code formatting
Improved JavaDoc
2015-11-18 18:26:41 +00:00
Johannes Ernst 709fe5b9aa Allow setting of system properties from context.xml in addition to setting from command-line.
Accomplished by centralizing calls to System.getProperty(String) and related into new file SystemProperties.java.
There, we first check for existence of system property; if not, we look for property in context.xml
This is done for "application" properties (like hudson.DNSMultiCast.disabled) but not for java properties (like user.name)
2015-11-17 01:38:51 +00:00
Kohsuke Kawaguchi 52b2571126 Merge pull request #737
Conflicts:
	core/src/main/java/hudson/model/UpdateCenter.java
2014-04-19 16:42:31 -07:00
Kohsuke Kawaguchi d1fb126b48 Massaging the fix by stevenpost
- coding style was not matching the rest of Jenkins
- IOUtils.closeQuietly is a lot more concise way of achieving the same
  thing.
- AtomicFileWriter.abort() does close, so no need to close it one more
  time.
2014-04-19 16:40:10 -07:00
Jesse Glick c9d69d36bd [FIXED JENKINS-21525] Make command to run an external job work with folders. 2014-01-27 15:27:02 -05:00
Steven Post f02bf90842 Close stream on exception 2013-10-28 11:11:46 +01:00
Kohsuke Kawaguchi 4ee8d6890c Follow up fix to close streams at the end.
To be really correct, the crumb API call should be using the encoding specified in the HTTP response header, but doing so involves various header parsing, which is cumbersome.

Since we know Jenkins always serve the API call in UTF-8 encoding, here I'm baking that assumption in.
2011-07-23 07:11:06 -07:00
Jerome Lacoste 386ec0d15e Ensure that the Readers are closed properly 2011-07-23 07:11:06 -07:00
Kohsuke Kawaguchi ebd0b303ed Typo as pointed out by Dean. 2011-01-30 21:54:36 -08:00
Kohsuke Kawaguchi 8ea876faa4 Honor $JENKINS_HOME.
Honor $JENKINS_HOME (just like we used to do $HUDSON_HOME)
We still fall back to $HUDSON_HOME every step of the way
for maximum backward compatibility.

I wasn't initially planning to do this for the first version,
but working on native packages made me think we should deliver this.
2011-01-30 16:25:58 -08:00
mindless 791ec9a98c add usage message when too few args
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@36679 71c3de6d-444a-0410-be80-ed276b4c234a
2010-11-05 19:29:52 +00:00
mindless 87eeedc4d3 [FIXED HUDSON-7961] support CSRF protection when submitting results
of external job; patch from davidreiss with 1 minor addition.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@36678 71c3de6d-444a-0410-be80-ed276b4c234a
2010-11-05 19:14:04 +00: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 6312340189 Remote build result submission shouldn't hang forever even if Hudson goes down.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28175 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-03 16:49:20 +00:00
kohsuke bea7fbda4c [FIXED HUDSON-5066] avoid the use of deleteOnExit if the timing to delete the file is known.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@24673 71c3de6d-444a-0410-be80-ed276b4c234a
2009-12-17 02:15:05 +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 85a4bc0b6b External job monitoring was ignoring the possible encoding difference between Hudson and the remote machine that executed the job.
(<a href="http://www.nabble.com/windows%E3%81%AEhudson%E3%81%8B%E3%82%89ssh%E3%82%B9%E3%83%AC%E3%83%BC%E3%83%96%E3%82%92%E4%BD%BF%E3%81%86%E3%81%A8%E3%81%8D%E3%81%AE%E6%96%87%E5%AD%97%E3%82%B3%E3%83%BC%E3%83%89%E5%8F%96%E3%82%8A%E6%89%B1%E3%81%84%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6-td23583532.html">report</a>)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18197 71c3de6d-444a-0410-be80-ed276b4c234a
2009-05-18 21:00:09 +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
kohsuke 0e244a6935 write to a file first and used the fixed content-length mode to avoid buffering.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7102 71c3de6d-444a-0410-be80-ed276b4c234a
2008-02-12 16:16:56 +00:00
kohsuke d4b1cc9d6f removed the local posting support.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4681 71c3de6d-444a-0410-be80-ed276b4c234a
2007-09-11 05:08:06 +00:00
kohsuke db430b3896 introduced more stories around Item/ItemGroup and full names.
updating the rest of the code to work with this.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1826 71c3de6d-444a-0410-be80-ed276b4c234a
2007-01-20 06:31:16 +00:00
kohsuke 19860fa070 merging remoting-integration branch
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1523 71c3de6d-444a-0410-be80-ed276b4c234a
2006-12-29 19:15:53 +00:00
kohsuke 5e8c911497 doc improvement.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1330 71c3de6d-444a-0410-be80-ed276b4c234a
2006-12-15 06:25:30 +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