2009-02-07 04:05:24 +08:00
|
|
|
/*
|
|
|
|
* The MIT License
|
|
|
|
*
|
2010-03-16 01:50:53 +08:00
|
|
|
* Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
|
2010-08-27 21:36:27 +08:00
|
|
|
* Yahoo! Inc., Stephen Connolly, Tom Huybrechts, Alan Harder, Romain Seguy
|
2009-02-07 04:05:24 +08:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
2006-11-06 05:16:01 +08:00
|
|
|
package hudson;
|
|
|
|
|
2011-05-28 23:44:48 +08:00
|
|
|
import hudson.cli.CLICommand;
|
[FIXED HUDSON-2137]
Merged revisions 27137,27564,27566-27567,27578,27586,27599,27603,27606-27609,27611,27616,27626-27632,27640,27654-27656,27687,27701,27801,27816,27819,27843-27845,28087,28158-28161 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/HUDSON-2137
........
r27137 | kohsuke | 2010-02-08 08:46:16 -0800 (Mon, 08 Feb 2010) | 1 line
experimenting with abstractions
........
r27564 | kohsuke | 2010-02-16 07:58:26 -0800 (Tue, 16 Feb 2010) | 1 line
bundling makes it easier for caller to handle ConsoleAnnotator
........
r27566 | kohsuke | 2010-02-16 08:49:48 -0800 (Tue, 16 Feb 2010) | 1 line
this should work with Runs, not AbstractBuilds
........
r27567 | kohsuke | 2010-02-16 08:54:06 -0800 (Tue, 16 Feb 2010) | 1 line
simplified
........
r27578 | kohsuke | 2010-02-16 12:26:11 -0800 (Tue, 16 Feb 2010) | 1 line
still a work in progress, but committing once to pull in trunk changes
........
r27586 | kohsuke | 2010-02-16 14:35:37 -0800 (Tue, 16 Feb 2010) | 1 line
making more progress
........
r27599 | kohsuke | 2010-02-16 19:22:01 -0800 (Tue, 16 Feb 2010) | 2 lines
hooking up the side that writes annotations.
still a work in progress.
........
r27603 | kohsuke | 2010-02-16 23:43:35 -0800 (Tue, 16 Feb 2010) | 3 lines
what appears to me as the first cut of hooking up the reader side of the annotations.
I haven't even run it yet --- this just passed the compilation, and I'm calling it a day.
........
r27606 | kohsuke | 2010-02-17 09:15:16 -0800 (Wed, 17 Feb 2010) | 1 line
demo instance hook up
........
r27607 | kohsuke | 2010-02-17 11:27:02 -0800 (Wed, 17 Feb 2010) | 3 lines
one more utility method.
I never understood what the point of letting the skip method skip less.
........
r27608 | kohsuke | 2010-02-17 11:56:23 -0800 (Wed, 17 Feb 2010) | 3 lines
- moved LargeText subtype to its own class
- skipping log output was done incorrectly --- it had to skip N bytes where it was skipping N chars.
- hooked up console annotations for completed builds.
........
r27609 | kohsuke | 2010-02-17 12:01:46 -0800 (Wed, 17 Feb 2010) | 1 line
copyright header
........
r27611 | kohsuke | 2010-02-17 13:18:10 -0800 (Wed, 17 Feb 2010) | 1 line
introduced a mechanism to register extension during an unit test.
........
r27616 | kohsuke | 2010-02-17 13:38:12 -0800 (Wed, 17 Feb 2010) | 1 line
test case for console annotations
........
r27626 | kohsuke | 2010-02-17 15:23:06 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotator as I write tests as tests
........
r27627 | kohsuke | 2010-02-17 16:06:13 -0800 (Wed, 17 Feb 2010) | 1 line
added a multi-phase cooperative locking mechanism useful during the debugging
........
r27628 | kohsuke | 2010-02-17 16:06:41 -0800 (Wed, 17 Feb 2010) | 1 line
testing progressive log annotation
........
r27629 | kohsuke | 2010-02-17 16:20:32 -0800 (Wed, 17 Feb 2010) | 1 line
adding a test for ConsoleAnnotation that's explicitly placed.
........
r27630 | kohsuke | 2010-02-17 16:23:02 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotation as I write tests as tests
........
r27631 | kohsuke | 2010-02-17 16:28:50 -0800 (Wed, 17 Feb 2010) | 1 line
tweaking the abstraction a bit.
........
r27632 | kohsuke | 2010-02-17 16:44:21 -0800 (Wed, 17 Feb 2010) | 1 line
parameterized the context type so that this can be used in places other than the build console output, such as polling logs, slave logs, and so on.
........
r27640 | kohsuke | 2010-02-17 17:27:52 -0800 (Wed, 17 Feb 2010) | 1 line
bug fix
........
r27654 | kohsuke | 2010-02-17 22:53:04 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27655 | kohsuke | 2010-02-17 22:53:59 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27656 | kohsuke | 2010-02-17 23:10:42 -0800 (Wed, 17 Feb 2010) | 1 line
test case for adjacent tags
........
r27687 | kohsuke | 2010-02-19 14:39:21 -0800 (Fri, 19 Feb 2010) | 1 line
introduced a facotry and descriptor. This allows them to define configuration pages, allow users to disable/enable them, plus define custom behaviors.
........
r27701 | kohsuke | 2010-02-19 18:23:52 -0800 (Fri, 19 Feb 2010) | 1 line
defining a mechanism for ConsoleAnnotatorFactory and ConsoleAnnotationDescriptor to define script.js and have them imported into the console output page
........
r27801 | kohsuke | 2010-02-22 11:59:16 -0800 (Mon, 22 Feb 2010) | 1 line
now embedding annotations inside the console output log file.
........
r27816 | kohsuke | 2010-02-22 15:45:04 -0800 (Mon, 22 Feb 2010) | 1 line
introduced a convenience method for unit tests
........
r27819 | kohsuke | 2010-02-22 17:37:05 -0800 (Mon, 22 Feb 2010) | 5 lines
As an example of using embedded console annotations, implementing Ant target invocation outlines.
It might be better to make the concept of outline more generally reusable, so that different kinds of outlines can be placed into the same container element for a single hierarchical representation.
Still a work in progress.
........
r27843 | kohsuke | 2010-02-23 16:12:13 -0800 (Tue, 23 Feb 2010) | 1 line
for now, disable this for production usage, until I work out a better UI.
........
r27844 | kohsuke | 2010-02-23 19:08:00 -0800 (Tue, 23 Feb 2010) | 1 line
started working on annotating exception.
........
r27845 | kohsuke | 2010-02-23 19:08:33 -0800 (Tue, 23 Feb 2010) | 1 line
more TODOs for myself
........
r28087 | kohsuke | 2010-03-01 10:03:55 -0800 (Mon, 01 Mar 2010) | 1 line
formatting changes
........
r28158 | kohsuke | 2010-03-02 17:00:00 -0800 (Tue, 02 Mar 2010) | 1 line
ConsoleAnnotation and ConsoleAnnotator are too confusing.
........
r28159 | kohsuke | 2010-03-02 17:02:02 -0800 (Tue, 02 Mar 2010) | 1 line
doc improvement
........
r28160 | kohsuke | 2010-03-02 17:05:14 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvements.
........
r28161 | kohsuke | 2010-03-02 17:11:59 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvement
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28173 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-03 23:37:55 +08:00
|
|
|
import hudson.console.ConsoleAnnotationDescriptor;
|
|
|
|
import hudson.console.ConsoleAnnotatorFactory;
|
2011-05-29 01:11:48 +08:00
|
|
|
import hudson.model.*;
|
2009-02-25 22:42:59 +08:00
|
|
|
import hudson.model.ParameterDefinition.ParameterDescriptor;
|
2007-08-05 03:33:27 +08:00
|
|
|
import hudson.search.SearchableModelObject;
|
Merged revisions 8523-8525,8545-8556,8793,8803-8806,8858,9027-9028 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tom
........
r8523 | huybrechts | 2008-04-11 13:41:11 -0700 (Fri, 11 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8524 | huybrechts | 2008-04-11 14:42:58 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8525 | huybrechts | 2008-04-11 14:53:59 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8545 | huybrechts | 2008-04-12 04:17:46 -0700 (Sat, 12 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8546 | huybrechts | 2008-04-12 04:19:26 -0700 (Sat, 12 Apr 2008) | 1 line
deleting IDE-specific files
........
r8547 | huybrechts | 2008-04-12 06:31:32 -0700 (Sat, 12 Apr 2008) | 1 line
added ignores
........
r8548 | huybrechts | 2008-04-12 06:42:49 -0700 (Sat, 12 Apr 2008) | 4 lines
Issue 1158
- extended AuthorizationStrategy to provide ACLs for different types of objects
- changed several object types to use these methods
- changed jelly to check permissions (instead of using isAdmin check)
........
r8549 | huybrechts | 2008-04-12 06:44:26 -0700 (Sat, 12 Apr 2008) | 1 line
Issue 1110: use svn revision number in project-changes.jelly
........
r8550 | huybrechts | 2008-04-12 06:46:18 -0700 (Sat, 12 Apr 2008) | 1 line
Adding a 'My Projects' view which shows only projects the user has permission for
........
r8551 | huybrechts | 2008-04-12 06:47:57 -0700 (Sat, 12 Apr 2008) | 1 line
adding a user name resolver, like the MailAddressResolver
........
r8552 | huybrechts | 2008-04-12 06:49:27 -0700 (Sat, 12 Apr 2008) | 1 line
Adding jdom and cglib to the war, as a workaround for classloading issues
........
r8553 | huybrechts | 2008-04-12 08:01:58 -0700 (Sat, 12 Apr 2008) | 1 line
SFEE integration improvements, including links to project based security
........
r8554 | huybrechts | 2008-04-12 08:27:17 -0700 (Sat, 12 Apr 2008) | 1 line
wsdl for SFEE webservices
........
r8555 | huybrechts | 2008-04-12 08:31:18 -0700 (Sat, 12 Apr 2008) | 1 line
forgot some files...
........
r8556 | huybrechts | 2008-04-12 08:34:31 -0700 (Sat, 12 Apr 2008) | 1 line
an authorization strategy that provides project-based access control (not usable on its own)
........
r8793 | huybrechts | 2008-04-22 14:39:57 -0700 (Tue, 22 Apr 2008) | 1 line
[issue #1573] allow plugins to contribute ServletFilters
........
r8803 | huybrechts | 2008-04-23 10:46:09 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8804 | huybrechts | 2008-04-23 10:52:11 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8805 | huybrechts | 2008-04-23 10:54:12 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8806 | huybrechts | 2008-04-23 10:59:13 -0700 (Wed, 23 Apr 2008) | 1 line
Issue 1158
........
r8858 | huybrechts | 2008-04-25 08:17:41 -0700 (Fri, 25 Apr 2008) | 1 line
bugfixes
........
r9027 | huybrechts | 2008-05-04 12:20:34 -0700 (Sun, 04 May 2008) | 1 line
Issue 1158 - fixing permission checks in jelly
........
r9028 | huybrechts | 2008-05-04 12:22:36 -0700 (Sun, 04 May 2008) | 1 line
creating SFEE releases from Hudson
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9699 71c3de6d-444a-0410-be80-ed276b4c234a
2008-05-30 11:25:15 +08:00
|
|
|
import hudson.security.AccessControlled;
|
|
|
|
import hudson.security.AuthorizationStrategy;
|
|
|
|
import hudson.security.Permission;
|
|
|
|
import hudson.security.SecurityRealm;
|
2009-06-09 15:09:02 +08:00
|
|
|
import hudson.security.csrf.CrumbIssuer;
|
2009-01-11 04:01:56 +08:00
|
|
|
import hudson.slaves.Cloud;
|
Merged revisions 8523-8525,8545-8556,8793,8803-8806,8858,9027-9028 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tom
........
r8523 | huybrechts | 2008-04-11 13:41:11 -0700 (Fri, 11 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8524 | huybrechts | 2008-04-11 14:42:58 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8525 | huybrechts | 2008-04-11 14:53:59 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8545 | huybrechts | 2008-04-12 04:17:46 -0700 (Sat, 12 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8546 | huybrechts | 2008-04-12 04:19:26 -0700 (Sat, 12 Apr 2008) | 1 line
deleting IDE-specific files
........
r8547 | huybrechts | 2008-04-12 06:31:32 -0700 (Sat, 12 Apr 2008) | 1 line
added ignores
........
r8548 | huybrechts | 2008-04-12 06:42:49 -0700 (Sat, 12 Apr 2008) | 4 lines
Issue 1158
- extended AuthorizationStrategy to provide ACLs for different types of objects
- changed several object types to use these methods
- changed jelly to check permissions (instead of using isAdmin check)
........
r8549 | huybrechts | 2008-04-12 06:44:26 -0700 (Sat, 12 Apr 2008) | 1 line
Issue 1110: use svn revision number in project-changes.jelly
........
r8550 | huybrechts | 2008-04-12 06:46:18 -0700 (Sat, 12 Apr 2008) | 1 line
Adding a 'My Projects' view which shows only projects the user has permission for
........
r8551 | huybrechts | 2008-04-12 06:47:57 -0700 (Sat, 12 Apr 2008) | 1 line
adding a user name resolver, like the MailAddressResolver
........
r8552 | huybrechts | 2008-04-12 06:49:27 -0700 (Sat, 12 Apr 2008) | 1 line
Adding jdom and cglib to the war, as a workaround for classloading issues
........
r8553 | huybrechts | 2008-04-12 08:01:58 -0700 (Sat, 12 Apr 2008) | 1 line
SFEE integration improvements, including links to project based security
........
r8554 | huybrechts | 2008-04-12 08:27:17 -0700 (Sat, 12 Apr 2008) | 1 line
wsdl for SFEE webservices
........
r8555 | huybrechts | 2008-04-12 08:31:18 -0700 (Sat, 12 Apr 2008) | 1 line
forgot some files...
........
r8556 | huybrechts | 2008-04-12 08:34:31 -0700 (Sat, 12 Apr 2008) | 1 line
an authorization strategy that provides project-based access control (not usable on its own)
........
r8793 | huybrechts | 2008-04-22 14:39:57 -0700 (Tue, 22 Apr 2008) | 1 line
[issue #1573] allow plugins to contribute ServletFilters
........
r8803 | huybrechts | 2008-04-23 10:46:09 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8804 | huybrechts | 2008-04-23 10:52:11 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8805 | huybrechts | 2008-04-23 10:54:12 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8806 | huybrechts | 2008-04-23 10:59:13 -0700 (Wed, 23 Apr 2008) | 1 line
Issue 1158
........
r8858 | huybrechts | 2008-04-25 08:17:41 -0700 (Fri, 25 Apr 2008) | 1 line
bugfixes
........
r9027 | huybrechts | 2008-05-04 12:20:34 -0700 (Sun, 04 May 2008) | 1 line
Issue 1158 - fixing permission checks in jelly
........
r9028 | huybrechts | 2008-05-04 12:22:36 -0700 (Sun, 04 May 2008) | 1 line
creating SFEE releases from Hudson
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9699 71c3de6d-444a-0410-be80-ed276b4c234a
2008-05-30 11:25:15 +08:00
|
|
|
import hudson.slaves.ComputerLauncher;
|
2009-02-25 22:42:59 +08:00
|
|
|
import hudson.slaves.NodeProperty;
|
|
|
|
import hudson.slaves.NodePropertyDescriptor;
|
Merged revisions 8523-8525,8545-8556,8793,8803-8806,8858,9027-9028 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tom
........
r8523 | huybrechts | 2008-04-11 13:41:11 -0700 (Fri, 11 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8524 | huybrechts | 2008-04-11 14:42:58 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8525 | huybrechts | 2008-04-11 14:53:59 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8545 | huybrechts | 2008-04-12 04:17:46 -0700 (Sat, 12 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8546 | huybrechts | 2008-04-12 04:19:26 -0700 (Sat, 12 Apr 2008) | 1 line
deleting IDE-specific files
........
r8547 | huybrechts | 2008-04-12 06:31:32 -0700 (Sat, 12 Apr 2008) | 1 line
added ignores
........
r8548 | huybrechts | 2008-04-12 06:42:49 -0700 (Sat, 12 Apr 2008) | 4 lines
Issue 1158
- extended AuthorizationStrategy to provide ACLs for different types of objects
- changed several object types to use these methods
- changed jelly to check permissions (instead of using isAdmin check)
........
r8549 | huybrechts | 2008-04-12 06:44:26 -0700 (Sat, 12 Apr 2008) | 1 line
Issue 1110: use svn revision number in project-changes.jelly
........
r8550 | huybrechts | 2008-04-12 06:46:18 -0700 (Sat, 12 Apr 2008) | 1 line
Adding a 'My Projects' view which shows only projects the user has permission for
........
r8551 | huybrechts | 2008-04-12 06:47:57 -0700 (Sat, 12 Apr 2008) | 1 line
adding a user name resolver, like the MailAddressResolver
........
r8552 | huybrechts | 2008-04-12 06:49:27 -0700 (Sat, 12 Apr 2008) | 1 line
Adding jdom and cglib to the war, as a workaround for classloading issues
........
r8553 | huybrechts | 2008-04-12 08:01:58 -0700 (Sat, 12 Apr 2008) | 1 line
SFEE integration improvements, including links to project based security
........
r8554 | huybrechts | 2008-04-12 08:27:17 -0700 (Sat, 12 Apr 2008) | 1 line
wsdl for SFEE webservices
........
r8555 | huybrechts | 2008-04-12 08:31:18 -0700 (Sat, 12 Apr 2008) | 1 line
forgot some files...
........
r8556 | huybrechts | 2008-04-12 08:34:31 -0700 (Sat, 12 Apr 2008) | 1 line
an authorization strategy that provides project-based access control (not usable on its own)
........
r8793 | huybrechts | 2008-04-22 14:39:57 -0700 (Tue, 22 Apr 2008) | 1 line
[issue #1573] allow plugins to contribute ServletFilters
........
r8803 | huybrechts | 2008-04-23 10:46:09 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8804 | huybrechts | 2008-04-23 10:52:11 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8805 | huybrechts | 2008-04-23 10:54:12 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8806 | huybrechts | 2008-04-23 10:59:13 -0700 (Wed, 23 Apr 2008) | 1 line
Issue 1158
........
r8858 | huybrechts | 2008-04-25 08:17:41 -0700 (Fri, 25 Apr 2008) | 1 line
bugfixes
........
r9027 | huybrechts | 2008-05-04 12:20:34 -0700 (Sun, 04 May 2008) | 1 line
Issue 1158 - fixing permission checks in jelly
........
r9028 | huybrechts | 2008-05-04 12:22:36 -0700 (Sun, 04 May 2008) | 1 line
creating SFEE releases from Hudson
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9699 71c3de6d-444a-0410-be80-ed276b4c234a
2008-05-30 11:25:15 +08:00
|
|
|
import hudson.slaves.RetentionStrategy;
|
2007-10-29 07:20:01 +08:00
|
|
|
import hudson.tasks.BuildStepDescriptor;
|
2007-10-29 07:39:31 +08:00
|
|
|
import hudson.tasks.BuildWrapper;
|
|
|
|
import hudson.tasks.BuildWrappers;
|
2007-10-29 07:20:01 +08:00
|
|
|
import hudson.tasks.Builder;
|
|
|
|
import hudson.tasks.Publisher;
|
2008-05-02 06:12:34 +08:00
|
|
|
import hudson.util.Area;
|
2009-01-11 04:01:56 +08:00
|
|
|
import hudson.util.Iterators;
|
2009-03-21 08:57:31 +08:00
|
|
|
import hudson.scm.SCM;
|
|
|
|
import hudson.scm.SCMDescriptor;
|
2010-07-14 08:52:58 +08:00
|
|
|
import hudson.util.Secret;
|
2010-10-12 11:43:40 +08:00
|
|
|
import hudson.views.MyViewsTabBar;
|
|
|
|
import hudson.views.ViewsTabBar;
|
2011-03-11 08:42:49 +08:00
|
|
|
import hudson.widgets.RenderOnDemandClosure;
|
2011-05-29 17:53:24 +08:00
|
|
|
import jenkins.model.Jenkins;
|
Merged revisions 8523-8525,8545-8556,8793,8803-8806,8858,9027-9028 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tom
........
r8523 | huybrechts | 2008-04-11 13:41:11 -0700 (Fri, 11 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8524 | huybrechts | 2008-04-11 14:42:58 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8525 | huybrechts | 2008-04-11 14:53:59 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8545 | huybrechts | 2008-04-12 04:17:46 -0700 (Sat, 12 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8546 | huybrechts | 2008-04-12 04:19:26 -0700 (Sat, 12 Apr 2008) | 1 line
deleting IDE-specific files
........
r8547 | huybrechts | 2008-04-12 06:31:32 -0700 (Sat, 12 Apr 2008) | 1 line
added ignores
........
r8548 | huybrechts | 2008-04-12 06:42:49 -0700 (Sat, 12 Apr 2008) | 4 lines
Issue 1158
- extended AuthorizationStrategy to provide ACLs for different types of objects
- changed several object types to use these methods
- changed jelly to check permissions (instead of using isAdmin check)
........
r8549 | huybrechts | 2008-04-12 06:44:26 -0700 (Sat, 12 Apr 2008) | 1 line
Issue 1110: use svn revision number in project-changes.jelly
........
r8550 | huybrechts | 2008-04-12 06:46:18 -0700 (Sat, 12 Apr 2008) | 1 line
Adding a 'My Projects' view which shows only projects the user has permission for
........
r8551 | huybrechts | 2008-04-12 06:47:57 -0700 (Sat, 12 Apr 2008) | 1 line
adding a user name resolver, like the MailAddressResolver
........
r8552 | huybrechts | 2008-04-12 06:49:27 -0700 (Sat, 12 Apr 2008) | 1 line
Adding jdom and cglib to the war, as a workaround for classloading issues
........
r8553 | huybrechts | 2008-04-12 08:01:58 -0700 (Sat, 12 Apr 2008) | 1 line
SFEE integration improvements, including links to project based security
........
r8554 | huybrechts | 2008-04-12 08:27:17 -0700 (Sat, 12 Apr 2008) | 1 line
wsdl for SFEE webservices
........
r8555 | huybrechts | 2008-04-12 08:31:18 -0700 (Sat, 12 Apr 2008) | 1 line
forgot some files...
........
r8556 | huybrechts | 2008-04-12 08:34:31 -0700 (Sat, 12 Apr 2008) | 1 line
an authorization strategy that provides project-based access control (not usable on its own)
........
r8793 | huybrechts | 2008-04-22 14:39:57 -0700 (Tue, 22 Apr 2008) | 1 line
[issue #1573] allow plugins to contribute ServletFilters
........
r8803 | huybrechts | 2008-04-23 10:46:09 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8804 | huybrechts | 2008-04-23 10:52:11 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8805 | huybrechts | 2008-04-23 10:54:12 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8806 | huybrechts | 2008-04-23 10:59:13 -0700 (Wed, 23 Apr 2008) | 1 line
Issue 1158
........
r8858 | huybrechts | 2008-04-25 08:17:41 -0700 (Fri, 25 Apr 2008) | 1 line
bugfixes
........
r9027 | huybrechts | 2008-05-04 12:20:34 -0700 (Sun, 04 May 2008) | 1 line
Issue 1158 - fixing permission checks in jelly
........
r9028 | huybrechts | 2008-05-04 12:22:36 -0700 (Sun, 04 May 2008) | 1 line
creating SFEE releases from Hudson
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9699 71c3de6d-444a-0410-be80-ed276b4c234a
2008-05-30 11:25:15 +08:00
|
|
|
import org.acegisecurity.providers.anonymous.AnonymousAuthenticationToken;
|
|
|
|
import org.apache.commons.jelly.JellyContext;
|
2008-12-23 03:42:11 +08:00
|
|
|
import org.apache.commons.jelly.JellyTagException;
|
|
|
|
import org.apache.commons.jelly.Script;
|
2009-02-25 22:42:59 +08:00
|
|
|
import org.apache.commons.jelly.XMLOutput;
|
2007-04-11 13:11:12 +08:00
|
|
|
import org.apache.commons.jexl.parser.ASTSizeFunction;
|
2007-10-23 02:28:11 +08:00
|
|
|
import org.apache.commons.jexl.util.Introspector;
|
2009-01-11 04:01:56 +08:00
|
|
|
import org.jvnet.animal_sniffer.IgnoreJRERequirement;
|
Merged revisions 17324-17325,17428,17430,17473-17475,17481-17482,17555-17563,17571,17593-17595,17619-17620,17637-17644,17656-17657,17663-17665,17667-17670,17730,17753,17755-17758,17763-17768,17770-17771,17901,17906,17911-17912,17958,17961-17962,17970-17977 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tool-autoinstallation
........
r17324 | jglick | 2009-04-20 18:24:32 -0700 (Mon, 20 Apr 2009) | 2 lines
Defensive cloning and Javadoc corrections.
(Though it seems no one is using the default impls of these methods yet anyway.)
........
r17325 | jglick | 2009-04-20 18:29:06 -0700 (Mon, 20 Apr 2009) | 1 line
Deprecation of delegate method is intentional.
........
r17428 | jglick | 2009-04-23 08:07:14 -0700 (Thu, 23 Apr 2009) | 1 line
Noting ToolLocationTranslator more prominently.
........
r17430 | jglick | 2009-04-23 09:16:40 -0700 (Thu, 23 Apr 2009) | 1 line
Unused imports.
........
r17473 | jglick | 2009-04-23 19:21:11 -0700 (Thu, 23 Apr 2009) | 1 line
Allow Plugin.configure to see the StaplerRequest, needed for some kinds of calls.
........
r17474 | jglick | 2009-04-23 19:25:54 -0700 (Thu, 23 Apr 2009) | 3 lines
Initial sketch of plugin to manage tool installations across slaves.
(Should really be under ../plugins/ but that was not branched, so putting here for the moment.)
........
r17475 | jglick | 2009-04-23 20:29:36 -0700 (Thu, 23 Apr 2009) | 1 line
Typo in Javadoc.
........
r17481 | jglick | 2009-04-23 22:46:26 -0700 (Thu, 23 Apr 2009) | 1 line
Unzip of an unbuffered stream is painfully slow.
........
r17482 | jglick | 2009-04-23 22:48:01 -0700 (Thu, 23 Apr 2009) | 1 line
ZIP-based tool installer now functional.
........
r17555 | jglick | 2009-04-27 17:50:38 -0700 (Mon, 27 Apr 2009) | 1 line
Build against newest trunk.
........
r17556 | jglick | 2009-04-27 18:38:28 -0700 (Mon, 27 Apr 2009) | 1 line
Adding help.
........
r17557 | jglick | 2009-04-27 18:57:46 -0700 (Mon, 27 Apr 2009) | 1 line
Moving toolName & label config GUI into generic files.
........
r17558 | jglick | 2009-04-27 19:37:30 -0700 (Mon, 27 Apr 2009) | 1 line
Typo.
........
r17559 | jglick | 2009-04-27 20:07:47 -0700 (Mon, 27 Apr 2009) | 1 line
Second tool installer type based on a freeform command.
........
r17560 | jglick | 2009-04-27 20:24:36 -0700 (Mon, 27 Apr 2009) | 1 line
installIfNecessaryFrom will now just return false in case the target dir exists but the URL cannot be opened.
........
r17561 | jglick | 2009-04-27 20:25:22 -0700 (Mon, 27 Apr 2009) | 2 lines
chmod only if something was actually installed.
Use a+x, not o+x.
........
r17562 | jglick | 2009-04-27 20:26:46 -0700 (Mon, 27 Apr 2009) | 1 line
Comment only.
........
r17563 | jglick | 2009-04-27 20:41:12 -0700 (Mon, 27 Apr 2009) | 1 line
I18N.
........
r17571 | jglick | 2009-04-28 08:15:31 -0700 (Tue, 28 Apr 2009) | 2 lines
Wiki link.
........
r17593 | jglick | 2009-04-28 15:38:33 -0700 (Tue, 28 Apr 2009) | 1 line
Turn off echo mode, it's just noise.
........
r17594 | jglick | 2009-04-28 15:39:29 -0700 (Tue, 28 Apr 2009) | 2 lines
Synchronizing access to installers for a given node/tool combo.
Sending log messages to Hudson log in real time.
........
r17595 | jglick | 2009-04-28 15:46:29 -0700 (Tue, 28 Apr 2009) | 1 line
Copyrights.
........
r17619 | jglick | 2009-04-29 06:25:23 -0700 (Wed, 29 Apr 2009) | 1 line
Improved Javadoc.
........
r17620 | jglick | 2009-04-29 06:51:11 -0700 (Wed, 29 Apr 2009) | 1 line
Demonstraing how to use DLJ to mechanically install official JDK releases on supported operating systems.
........
r17637 | kohsuke | 2009-04-30 16:15:24 -0700 (Thu, 30 Apr 2009) | 1 line
fixed what appears to be a C&P mistake
........
r17638 | kohsuke | 2009-04-30 16:16:21 -0700 (Thu, 30 Apr 2009) | 1 line
show YUI logger if YUI debugging mode is set.
........
r17639 | kohsuke | 2009-04-30 16:52:28 -0700 (Thu, 30 Apr 2009) | 7 lines
Fixed a UI script problem when <hetero-list> nests inside <repeatable>.
The cause of the problem was that the behavior for inner <hetero-list> kicks in first, altering HTML (by removing "prototypes"), before behavior for outer <repetable> kicks in and removes the master copy from DOM tree.
So <repeatable> ends up computing a master copy after some elements are removed, and hence when we try to reinsert them later by clicking "Add", it'll get incorrect copy, and re-execution of the <hetero-list> behavior bombs out.
I fixed this by skipping those HTML-altering behaviors if they show up in the part of DOM tree that's supposed to be snapshotted and removed.
........
r17640 | kohsuke | 2009-04-30 16:57:58 -0700 (Thu, 30 Apr 2009) | 7 lines
Added ToolProperty to ToolInstallation (which acts like NodeProperty to Node --- basically decorates the base object with additional properties.)
The original motivation is to implement ToolInstaller this way, if Jesse is OK. But decorating tools seem to have some other interesting use, such as a plugin for configuring $M2_HOME/conf/settings.xml, or a plugin to insert unlimited cryptography extension to JDK, or a plugin to add a few more jars into $ANT_HOME/lib.
For this to work, ToolInstallations that want properties needs to be modified to use a new constructor. For a starter, I modified the JDK class to do this.
I also took the opportunity to modernize JDK/config.jelly.
........
r17641 | kohsuke | 2009-04-30 17:02:04 -0700 (Thu, 30 Apr 2009) | 1 line
this appears to be a left-over from early days when we didn't have a means to do form validation
........
r17642 | kohsuke | 2009-04-30 17:02:35 -0700 (Thu, 30 Apr 2009) | 1 line
we don't need no.such.JDK but we need name. rebranching
........
r17643 | kohsuke | 2009-04-30 17:03:22 -0700 (Thu, 30 Apr 2009) | 1 line
rebranched from Hudson's configure.properties
........
r17644 | kohsuke | 2009-04-30 17:05:31 -0700 (Thu, 30 Apr 2009) | 1 line
removed unnecessary translations
........
r17656 | kohsuke | 2009-05-01 11:27:36 -0700 (Fri, 01 May 2009) | 1 line
Less hack for improved type safety. Asking people to write more code is not necessarily bad as long as what they need to do is obvious to them.
........
r17657 | kohsuke | 2009-05-01 12:07:20 -0700 (Fri, 01 May 2009) | 5 lines
The toolautoinst part of the change that corresponds to rev.17640.
ToolInstallers are now hooked under ToolInstallation through InstallSourceProperty as a ToolProperty.
This allows the relevant UIs to be shown in one place. Still pending Jesse's feedback. Making it a single commit to simplify a revert if necessary
........
r17663 | kohsuke | 2009-05-01 13:23:51 -0700 (Fri, 01 May 2009) | 1 line
doc improvement
........
r17664 | kohsuke | 2009-05-01 13:24:10 -0700 (Fri, 01 May 2009) | 1 line
needs this to allow Stapler to databind hetero-list automatically
........
r17665 | jglick | 2009-05-01 13:31:27 -0700 (Fri, 01 May 2009) | 1 line
Warnings.
........
r17667 | kohsuke | 2009-05-01 14:20:53 -0700 (Fri, 01 May 2009) | 1 line
added a method to do chmod
........
r17668 | kohsuke | 2009-05-01 14:30:35 -0700 (Fri, 01 May 2009) | 1 line
prefer JDK6 version to avoid unnecessary JNA loading
........
r17669 | kohsuke | 2009-05-01 14:33:09 -0700 (Fri, 01 May 2009) | 1 line
no, I must have confused this.
........
r17670 | kohsuke | 2009-05-01 15:57:11 -0700 (Fri, 01 May 2009) | 2 lines
- Automated JDK installer and its test.
- Minor update to the signature of ToolInstaller for supplying the expected default location.
........
r17730 | kohsuke | 2009-05-04 11:27:34 -0700 (Mon, 04 May 2009) | 1 line
avoid NPE as reported in HUDSON-3608
........
r17753 | jglick | 2009-05-04 19:34:08 -0700 (Mon, 04 May 2009) | 2 lines
Moved toolautoinst functionality into core.
........
r17755 | jglick | 2009-05-04 20:28:34 -0700 (Mon, 04 May 2009) | 8 lines
Added TaskListener parameter and IOException and InterruptedException to several methods:
Run.getEnvironment
NodeSpecific.forNode
ToolLocationTranslator.getToolHome
ToolLocationNodeProperty.getToolHome
ToolInstallation.translateFor
ProcessCache.Factory.getMavenInstallation
ProcessCache.Factory.getJava
........
r17756 | jglick | 2009-05-04 20:36:56 -0700 (Mon, 04 May 2009) | 1 line
expectedLocation was never strictly necessary, and will soon no longer be used even by JDKInstaller.
........
r17757 | jglick | 2009-05-04 20:40:41 -0700 (Mon, 04 May 2009) | 1 line
Not sure yet what @since should be.
........
r17758 | jglick | 2009-05-04 20:41:51 -0700 (Mon, 04 May 2009) | 1 line
getDefaultInstallers method added. Not yet in use.
........
r17763 | kohsuke | 2009-05-05 10:50:36 -0700 (Tue, 05 May 2009) | 1 line
deprecated redundant getJavaHome method
........
r17764 | kohsuke | 2009-05-05 12:10:45 -0700 (Tue, 05 May 2009) | 1 line
added general-purpose property defaulting mechanism, and added default tool installer for JDK
........
r17765 | jglick | 2009-05-05 12:35:56 -0700 (Tue, 05 May 2009) | 1 line
capitalize("") -> ""
........
r17766 | jglick | 2009-05-05 12:49:52 -0700 (Tue, 05 May 2009) | 1 line
Missing @since.
........
r17767 | jglick | 2009-05-05 13:01:41 -0700 (Tue, 05 May 2009) | 1 line
Unchecked warning.
........
r17768 | jglick | 2009-05-05 13:19:49 -0700 (Tue, 05 May 2009) | 2 lines
Two unsuccessful attempts at form validation.
........
r17770 | jglick | 2009-05-05 13:48:37 -0700 (Tue, 05 May 2009) | 1 line
Better class names.
........
r17771 | kohsuke | 2009-05-05 14:12:21 -0700 (Tue, 05 May 2009) | 5 lines
brought the form validation check back. The trick is to use the 'value' parameter.
In the end we'd expect this check to go away anyway, as we change input field to drop-down list, but in the mean time, this is why it didn't work.
Maybe we probably need more static code checkers? Like FindBugs rules?
........
r17901 | kohsuke | 2009-05-09 19:15:40 -0700 (Sat, 09 May 2009) | 1 line
having two toolHome is odd.
........
r17906 | kohsuke | 2009-05-10 11:09:13 -0700 (Sun, 10 May 2009) | 1 line
adding the generalization of UpdateCenter, but for compatibility reasons, we are leaving UpdateCenter as-is.
........
r17911 | kohsuke | 2009-05-10 17:02:53 -0700 (Sun, 10 May 2009) | 1 line
integrated json-lib with a bit of bug fix
........
r17912 | kohsuke | 2009-05-10 17:13:05 -0700 (Sun, 10 May 2009) | 1 line
JDK list is now fetched from hudson.dev.java.net
........
r17958 | kohsuke | 2009-05-11 13:44:25 -0700 (Mon, 11 May 2009) | 48 lines
Handle AbortException better to avoid error like this:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to delete directory: C:\files\hudson\workspace\hudson\hudson\main\remoting\target. Reason: Unable to delete file C:\files\hudson\workspace\hudson\hudson\main\remoting\target\remoting-1.304-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Sun May 10 18:15:33 PDT 2009
[INFO] Final Memory: 25M/48M
[INFO] ------------------------------------------------------------------------
Recording fingerprints
Archiving artifacts
Recording test results
ERROR: Failed to archive JUnit reports
hudson.util.IOException2: remote file operation failed
at hudson.FilePath.act(FilePath.java:596)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:82)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:372)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:360)
at hudson.model.Build$RunnerImpl.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:345)
at hudson.model.Run.run(Run.java:943)
at hudson.model.Build.run(Build.java:112)
at hudson.model.ResourceController.execute(ResourceController.java:93)
at hudson.model.Executor.run(Executor.java:119)
Caused by: hudson.AbortException: Test reports were found but none of them are new. Did tests run?
For example, \files\hudson\workspace\hudson\hudson\main\core\target\surefire-reports\TEST-hudson.BulkChangeTest.xml is 2 days 23 hr old
at hudson.tasks.junit.TestResult.parse(TestResult.java:134)
at hudson.tasks.junit.TestResult.<init>(TestResult.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:82)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1583)
at hudson.remoting.UserRequest.perform(UserRequest.java:92)
at hudson.remoting.UserRequest.perform(UserRequest.java:46)
at hudson.remoting.Request$2.run(Request.java:236)
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)
........
r17961 | kohsuke | 2009-05-11 15:16:39 -0700 (Mon, 11 May 2009) | 1 line
adding Windows JDK silent installation
........
r17962 | kohsuke | 2009-05-11 16:08:13 -0700 (Mon, 11 May 2009) | 1 line
Fixing JDK offline installatino for Windows
........
r17970 | kohsuke | 2009-05-11 19:37:59 -0700 (Mon, 11 May 2009) | 1 line
Fixing a problem that prevents the usage of this tag in <repeatable> block, which reinserts the same fragment over and over. So statically assigning IDs won't work
........
r17971 | kohsuke | 2009-05-11 22:17:09 -0700 (Mon, 11 May 2009) | 1 line
continuing to remove static ID generation, which breaks the tag when used inside <repetable> tag.
........
r17972 | kohsuke | 2009-05-11 22:19:11 -0700 (Mon, 11 May 2009) | 1 line
I don't know when this started, but even in the hudson-dev:run mode, the versionis no longer '?', so we need a different way to force reload
........
r17973 | kohsuke | 2009-05-11 22:26:34 -0700 (Mon, 11 May 2009) | 1 line
adjusted the text a bit since multiple "add" and "delete"s were rather confusing
........
r17974 | kohsuke | 2009-05-11 22:31:58 -0700 (Mon, 11 May 2009) | 1 line
added help screen
........
r17975 | kohsuke | 2009-05-11 22:41:39 -0700 (Mon, 11 May 2009) | 1 line
form validation now works against the checkbox, too
........
r17976 | kohsuke | 2009-05-11 22:43:00 -0700 (Mon, 11 May 2009) | 1 line
with auto installation, we expect users to specify a directory that doesn't exist yet, so don't report it as an error
........
r17977 | kohsuke | 2009-05-11 22:43:24 -0700 (Mon, 11 May 2009) | 1 line
improving the text
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17985 71c3de6d-444a-0410-be80-ed276b4c234a
2009-05-12 21:59:10 +08:00
|
|
|
import org.jvnet.tiger_types.Types;
|
2006-11-06 05:16:01 +08:00
|
|
|
import org.kohsuke.stapler.Ancestor;
|
2007-04-11 13:11:12 +08:00
|
|
|
import org.kohsuke.stapler.Stapler;
|
2006-11-06 05:16:01 +08:00
|
|
|
import org.kohsuke.stapler.StaplerRequest;
|
2007-03-11 02:03:02 +08:00
|
|
|
import org.kohsuke.stapler.StaplerResponse;
|
2011-04-12 15:15:30 +08:00
|
|
|
import org.kohsuke.stapler.jelly.InternationalizedStringExpression.RawHtmlArgument;
|
2006-11-06 05:16:01 +08:00
|
|
|
|
2007-04-11 13:11:12 +08:00
|
|
|
import javax.servlet.ServletException;
|
2006-11-06 05:16:01 +08:00
|
|
|
import javax.servlet.http.Cookie;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
2006-12-30 03:15:53 +08:00
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import java.io.File;
|
2007-01-20 15:31:24 +08:00
|
|
|
import java.io.IOException;
|
2007-09-23 00:39:31 +08:00
|
|
|
import java.io.PrintWriter;
|
2007-09-27 12:16:44 +08:00
|
|
|
import java.io.StringWriter;
|
2008-12-23 13:20:42 +08:00
|
|
|
import java.io.UnsupportedEncodingException;
|
2007-07-30 03:05:37 +08:00
|
|
|
import java.lang.management.LockInfo;
|
|
|
|
import java.lang.management.ManagementFactory;
|
|
|
|
import java.lang.management.MonitorInfo;
|
|
|
|
import java.lang.management.ThreadInfo;
|
|
|
|
import java.lang.management.ThreadMXBean;
|
Merged revisions 17324-17325,17428,17430,17473-17475,17481-17482,17555-17563,17571,17593-17595,17619-17620,17637-17644,17656-17657,17663-17665,17667-17670,17730,17753,17755-17758,17763-17768,17770-17771,17901,17906,17911-17912,17958,17961-17962,17970-17977 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tool-autoinstallation
........
r17324 | jglick | 2009-04-20 18:24:32 -0700 (Mon, 20 Apr 2009) | 2 lines
Defensive cloning and Javadoc corrections.
(Though it seems no one is using the default impls of these methods yet anyway.)
........
r17325 | jglick | 2009-04-20 18:29:06 -0700 (Mon, 20 Apr 2009) | 1 line
Deprecation of delegate method is intentional.
........
r17428 | jglick | 2009-04-23 08:07:14 -0700 (Thu, 23 Apr 2009) | 1 line
Noting ToolLocationTranslator more prominently.
........
r17430 | jglick | 2009-04-23 09:16:40 -0700 (Thu, 23 Apr 2009) | 1 line
Unused imports.
........
r17473 | jglick | 2009-04-23 19:21:11 -0700 (Thu, 23 Apr 2009) | 1 line
Allow Plugin.configure to see the StaplerRequest, needed for some kinds of calls.
........
r17474 | jglick | 2009-04-23 19:25:54 -0700 (Thu, 23 Apr 2009) | 3 lines
Initial sketch of plugin to manage tool installations across slaves.
(Should really be under ../plugins/ but that was not branched, so putting here for the moment.)
........
r17475 | jglick | 2009-04-23 20:29:36 -0700 (Thu, 23 Apr 2009) | 1 line
Typo in Javadoc.
........
r17481 | jglick | 2009-04-23 22:46:26 -0700 (Thu, 23 Apr 2009) | 1 line
Unzip of an unbuffered stream is painfully slow.
........
r17482 | jglick | 2009-04-23 22:48:01 -0700 (Thu, 23 Apr 2009) | 1 line
ZIP-based tool installer now functional.
........
r17555 | jglick | 2009-04-27 17:50:38 -0700 (Mon, 27 Apr 2009) | 1 line
Build against newest trunk.
........
r17556 | jglick | 2009-04-27 18:38:28 -0700 (Mon, 27 Apr 2009) | 1 line
Adding help.
........
r17557 | jglick | 2009-04-27 18:57:46 -0700 (Mon, 27 Apr 2009) | 1 line
Moving toolName & label config GUI into generic files.
........
r17558 | jglick | 2009-04-27 19:37:30 -0700 (Mon, 27 Apr 2009) | 1 line
Typo.
........
r17559 | jglick | 2009-04-27 20:07:47 -0700 (Mon, 27 Apr 2009) | 1 line
Second tool installer type based on a freeform command.
........
r17560 | jglick | 2009-04-27 20:24:36 -0700 (Mon, 27 Apr 2009) | 1 line
installIfNecessaryFrom will now just return false in case the target dir exists but the URL cannot be opened.
........
r17561 | jglick | 2009-04-27 20:25:22 -0700 (Mon, 27 Apr 2009) | 2 lines
chmod only if something was actually installed.
Use a+x, not o+x.
........
r17562 | jglick | 2009-04-27 20:26:46 -0700 (Mon, 27 Apr 2009) | 1 line
Comment only.
........
r17563 | jglick | 2009-04-27 20:41:12 -0700 (Mon, 27 Apr 2009) | 1 line
I18N.
........
r17571 | jglick | 2009-04-28 08:15:31 -0700 (Tue, 28 Apr 2009) | 2 lines
Wiki link.
........
r17593 | jglick | 2009-04-28 15:38:33 -0700 (Tue, 28 Apr 2009) | 1 line
Turn off echo mode, it's just noise.
........
r17594 | jglick | 2009-04-28 15:39:29 -0700 (Tue, 28 Apr 2009) | 2 lines
Synchronizing access to installers for a given node/tool combo.
Sending log messages to Hudson log in real time.
........
r17595 | jglick | 2009-04-28 15:46:29 -0700 (Tue, 28 Apr 2009) | 1 line
Copyrights.
........
r17619 | jglick | 2009-04-29 06:25:23 -0700 (Wed, 29 Apr 2009) | 1 line
Improved Javadoc.
........
r17620 | jglick | 2009-04-29 06:51:11 -0700 (Wed, 29 Apr 2009) | 1 line
Demonstraing how to use DLJ to mechanically install official JDK releases on supported operating systems.
........
r17637 | kohsuke | 2009-04-30 16:15:24 -0700 (Thu, 30 Apr 2009) | 1 line
fixed what appears to be a C&P mistake
........
r17638 | kohsuke | 2009-04-30 16:16:21 -0700 (Thu, 30 Apr 2009) | 1 line
show YUI logger if YUI debugging mode is set.
........
r17639 | kohsuke | 2009-04-30 16:52:28 -0700 (Thu, 30 Apr 2009) | 7 lines
Fixed a UI script problem when <hetero-list> nests inside <repeatable>.
The cause of the problem was that the behavior for inner <hetero-list> kicks in first, altering HTML (by removing "prototypes"), before behavior for outer <repetable> kicks in and removes the master copy from DOM tree.
So <repeatable> ends up computing a master copy after some elements are removed, and hence when we try to reinsert them later by clicking "Add", it'll get incorrect copy, and re-execution of the <hetero-list> behavior bombs out.
I fixed this by skipping those HTML-altering behaviors if they show up in the part of DOM tree that's supposed to be snapshotted and removed.
........
r17640 | kohsuke | 2009-04-30 16:57:58 -0700 (Thu, 30 Apr 2009) | 7 lines
Added ToolProperty to ToolInstallation (which acts like NodeProperty to Node --- basically decorates the base object with additional properties.)
The original motivation is to implement ToolInstaller this way, if Jesse is OK. But decorating tools seem to have some other interesting use, such as a plugin for configuring $M2_HOME/conf/settings.xml, or a plugin to insert unlimited cryptography extension to JDK, or a plugin to add a few more jars into $ANT_HOME/lib.
For this to work, ToolInstallations that want properties needs to be modified to use a new constructor. For a starter, I modified the JDK class to do this.
I also took the opportunity to modernize JDK/config.jelly.
........
r17641 | kohsuke | 2009-04-30 17:02:04 -0700 (Thu, 30 Apr 2009) | 1 line
this appears to be a left-over from early days when we didn't have a means to do form validation
........
r17642 | kohsuke | 2009-04-30 17:02:35 -0700 (Thu, 30 Apr 2009) | 1 line
we don't need no.such.JDK but we need name. rebranching
........
r17643 | kohsuke | 2009-04-30 17:03:22 -0700 (Thu, 30 Apr 2009) | 1 line
rebranched from Hudson's configure.properties
........
r17644 | kohsuke | 2009-04-30 17:05:31 -0700 (Thu, 30 Apr 2009) | 1 line
removed unnecessary translations
........
r17656 | kohsuke | 2009-05-01 11:27:36 -0700 (Fri, 01 May 2009) | 1 line
Less hack for improved type safety. Asking people to write more code is not necessarily bad as long as what they need to do is obvious to them.
........
r17657 | kohsuke | 2009-05-01 12:07:20 -0700 (Fri, 01 May 2009) | 5 lines
The toolautoinst part of the change that corresponds to rev.17640.
ToolInstallers are now hooked under ToolInstallation through InstallSourceProperty as a ToolProperty.
This allows the relevant UIs to be shown in one place. Still pending Jesse's feedback. Making it a single commit to simplify a revert if necessary
........
r17663 | kohsuke | 2009-05-01 13:23:51 -0700 (Fri, 01 May 2009) | 1 line
doc improvement
........
r17664 | kohsuke | 2009-05-01 13:24:10 -0700 (Fri, 01 May 2009) | 1 line
needs this to allow Stapler to databind hetero-list automatically
........
r17665 | jglick | 2009-05-01 13:31:27 -0700 (Fri, 01 May 2009) | 1 line
Warnings.
........
r17667 | kohsuke | 2009-05-01 14:20:53 -0700 (Fri, 01 May 2009) | 1 line
added a method to do chmod
........
r17668 | kohsuke | 2009-05-01 14:30:35 -0700 (Fri, 01 May 2009) | 1 line
prefer JDK6 version to avoid unnecessary JNA loading
........
r17669 | kohsuke | 2009-05-01 14:33:09 -0700 (Fri, 01 May 2009) | 1 line
no, I must have confused this.
........
r17670 | kohsuke | 2009-05-01 15:57:11 -0700 (Fri, 01 May 2009) | 2 lines
- Automated JDK installer and its test.
- Minor update to the signature of ToolInstaller for supplying the expected default location.
........
r17730 | kohsuke | 2009-05-04 11:27:34 -0700 (Mon, 04 May 2009) | 1 line
avoid NPE as reported in HUDSON-3608
........
r17753 | jglick | 2009-05-04 19:34:08 -0700 (Mon, 04 May 2009) | 2 lines
Moved toolautoinst functionality into core.
........
r17755 | jglick | 2009-05-04 20:28:34 -0700 (Mon, 04 May 2009) | 8 lines
Added TaskListener parameter and IOException and InterruptedException to several methods:
Run.getEnvironment
NodeSpecific.forNode
ToolLocationTranslator.getToolHome
ToolLocationNodeProperty.getToolHome
ToolInstallation.translateFor
ProcessCache.Factory.getMavenInstallation
ProcessCache.Factory.getJava
........
r17756 | jglick | 2009-05-04 20:36:56 -0700 (Mon, 04 May 2009) | 1 line
expectedLocation was never strictly necessary, and will soon no longer be used even by JDKInstaller.
........
r17757 | jglick | 2009-05-04 20:40:41 -0700 (Mon, 04 May 2009) | 1 line
Not sure yet what @since should be.
........
r17758 | jglick | 2009-05-04 20:41:51 -0700 (Mon, 04 May 2009) | 1 line
getDefaultInstallers method added. Not yet in use.
........
r17763 | kohsuke | 2009-05-05 10:50:36 -0700 (Tue, 05 May 2009) | 1 line
deprecated redundant getJavaHome method
........
r17764 | kohsuke | 2009-05-05 12:10:45 -0700 (Tue, 05 May 2009) | 1 line
added general-purpose property defaulting mechanism, and added default tool installer for JDK
........
r17765 | jglick | 2009-05-05 12:35:56 -0700 (Tue, 05 May 2009) | 1 line
capitalize("") -> ""
........
r17766 | jglick | 2009-05-05 12:49:52 -0700 (Tue, 05 May 2009) | 1 line
Missing @since.
........
r17767 | jglick | 2009-05-05 13:01:41 -0700 (Tue, 05 May 2009) | 1 line
Unchecked warning.
........
r17768 | jglick | 2009-05-05 13:19:49 -0700 (Tue, 05 May 2009) | 2 lines
Two unsuccessful attempts at form validation.
........
r17770 | jglick | 2009-05-05 13:48:37 -0700 (Tue, 05 May 2009) | 1 line
Better class names.
........
r17771 | kohsuke | 2009-05-05 14:12:21 -0700 (Tue, 05 May 2009) | 5 lines
brought the form validation check back. The trick is to use the 'value' parameter.
In the end we'd expect this check to go away anyway, as we change input field to drop-down list, but in the mean time, this is why it didn't work.
Maybe we probably need more static code checkers? Like FindBugs rules?
........
r17901 | kohsuke | 2009-05-09 19:15:40 -0700 (Sat, 09 May 2009) | 1 line
having two toolHome is odd.
........
r17906 | kohsuke | 2009-05-10 11:09:13 -0700 (Sun, 10 May 2009) | 1 line
adding the generalization of UpdateCenter, but for compatibility reasons, we are leaving UpdateCenter as-is.
........
r17911 | kohsuke | 2009-05-10 17:02:53 -0700 (Sun, 10 May 2009) | 1 line
integrated json-lib with a bit of bug fix
........
r17912 | kohsuke | 2009-05-10 17:13:05 -0700 (Sun, 10 May 2009) | 1 line
JDK list is now fetched from hudson.dev.java.net
........
r17958 | kohsuke | 2009-05-11 13:44:25 -0700 (Mon, 11 May 2009) | 48 lines
Handle AbortException better to avoid error like this:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to delete directory: C:\files\hudson\workspace\hudson\hudson\main\remoting\target. Reason: Unable to delete file C:\files\hudson\workspace\hudson\hudson\main\remoting\target\remoting-1.304-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Sun May 10 18:15:33 PDT 2009
[INFO] Final Memory: 25M/48M
[INFO] ------------------------------------------------------------------------
Recording fingerprints
Archiving artifacts
Recording test results
ERROR: Failed to archive JUnit reports
hudson.util.IOException2: remote file operation failed
at hudson.FilePath.act(FilePath.java:596)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:82)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:372)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:360)
at hudson.model.Build$RunnerImpl.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:345)
at hudson.model.Run.run(Run.java:943)
at hudson.model.Build.run(Build.java:112)
at hudson.model.ResourceController.execute(ResourceController.java:93)
at hudson.model.Executor.run(Executor.java:119)
Caused by: hudson.AbortException: Test reports were found but none of them are new. Did tests run?
For example, \files\hudson\workspace\hudson\hudson\main\core\target\surefire-reports\TEST-hudson.BulkChangeTest.xml is 2 days 23 hr old
at hudson.tasks.junit.TestResult.parse(TestResult.java:134)
at hudson.tasks.junit.TestResult.<init>(TestResult.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:82)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1583)
at hudson.remoting.UserRequest.perform(UserRequest.java:92)
at hudson.remoting.UserRequest.perform(UserRequest.java:46)
at hudson.remoting.Request$2.run(Request.java:236)
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)
........
r17961 | kohsuke | 2009-05-11 15:16:39 -0700 (Mon, 11 May 2009) | 1 line
adding Windows JDK silent installation
........
r17962 | kohsuke | 2009-05-11 16:08:13 -0700 (Mon, 11 May 2009) | 1 line
Fixing JDK offline installatino for Windows
........
r17970 | kohsuke | 2009-05-11 19:37:59 -0700 (Mon, 11 May 2009) | 1 line
Fixing a problem that prevents the usage of this tag in <repeatable> block, which reinserts the same fragment over and over. So statically assigning IDs won't work
........
r17971 | kohsuke | 2009-05-11 22:17:09 -0700 (Mon, 11 May 2009) | 1 line
continuing to remove static ID generation, which breaks the tag when used inside <repetable> tag.
........
r17972 | kohsuke | 2009-05-11 22:19:11 -0700 (Mon, 11 May 2009) | 1 line
I don't know when this started, but even in the hudson-dev:run mode, the versionis no longer '?', so we need a different way to force reload
........
r17973 | kohsuke | 2009-05-11 22:26:34 -0700 (Mon, 11 May 2009) | 1 line
adjusted the text a bit since multiple "add" and "delete"s were rather confusing
........
r17974 | kohsuke | 2009-05-11 22:31:58 -0700 (Mon, 11 May 2009) | 1 line
added help screen
........
r17975 | kohsuke | 2009-05-11 22:41:39 -0700 (Mon, 11 May 2009) | 1 line
form validation now works against the checkbox, too
........
r17976 | kohsuke | 2009-05-11 22:43:00 -0700 (Mon, 11 May 2009) | 1 line
with auto installation, we expect users to specify a directory that doesn't exist yet, so don't report it as an error
........
r17977 | kohsuke | 2009-05-11 22:43:24 -0700 (Mon, 11 May 2009) | 1 line
improving the text
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17985 71c3de6d-444a-0410-be80-ed276b4c234a
2009-05-12 21:59:10 +08:00
|
|
|
import java.lang.reflect.Type;
|
|
|
|
import java.lang.reflect.ParameterizedType;
|
2008-07-02 02:01:38 +08:00
|
|
|
import java.net.MalformedURLException;
|
2009-01-11 04:01:56 +08:00
|
|
|
import java.net.URL;
|
2008-12-23 13:20:42 +08:00
|
|
|
import java.net.URLDecoder;
|
2009-02-25 22:42:59 +08:00
|
|
|
import java.util.ArrayList;
|
2010-03-16 01:50:53 +08:00
|
|
|
import java.util.Arrays;
|
2006-12-30 03:15:53 +08:00
|
|
|
import java.util.Calendar;
|
2007-07-30 03:05:37 +08:00
|
|
|
import java.util.Collection;
|
|
|
|
import java.util.Collections;
|
2010-03-16 01:50:53 +08:00
|
|
|
import java.util.Comparator;
|
Merged revisions 29309-29311,29421,29449,29451,29459 via svnmerge from
https://svn.dev.java.net/svn/hudson/branches/rc
........
r29309 | kohsuke | 2010-03-26 14:44:45 -0700 (Fri, 26 Mar 2010) | 1 line
Work around for http://n4.nabble.com/hudson-logging-LogRecorderManagerTest-failing-tp1589811p1589811.html
........
r29310 | kohsuke | 2010-03-26 14:45:29 -0700 (Fri, 26 Mar 2010) | 1 line
unnecessary boxing
........
r29311 | kohsuke | 2010-03-26 16:00:41 -0700 (Fri, 26 Mar 2010) | 1 line
fixed a stability in the test.
........
r29421 | kohsuke | 2010-03-29 11:40:37 -0700 (Mon, 29 Mar 2010) | 1 line
improving the test stability
........
r29449 | kohsuke | 2010-03-29 18:08:26 -0700 (Mon, 29 Mar 2010) | 1 line
[maven-release-plugin] prepare release hudson-1_353
........
r29451 | kohsuke | 2010-03-29 18:08:46 -0700 (Mon, 29 Mar 2010) | 1 line
[maven-release-plugin] prepare for next development iteration
........
r29459 | kohsuke | 2010-03-29 19:20:42 -0700 (Mon, 29 Mar 2010) | 1 line
updated changelog as a part of the release
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29490 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-30 17:47:41 +08:00
|
|
|
import java.util.ConcurrentModificationException;
|
|
|
|
import java.util.Enumeration;
|
2007-04-11 13:11:12 +08:00
|
|
|
import java.util.HashMap;
|
2006-11-06 05:16:01 +08:00
|
|
|
import java.util.List;
|
2011-03-01 16:15:15 +08:00
|
|
|
import java.util.Locale;
|
2006-11-06 05:16:01 +08:00
|
|
|
import java.util.Map;
|
|
|
|
import java.util.SortedMap;
|
2006-12-30 03:15:53 +08:00
|
|
|
import java.util.TreeMap;
|
2009-09-01 09:19:59 +08:00
|
|
|
import java.util.Date;
|
Merged revisions 29309-29311,29421,29449,29451,29459 via svnmerge from
https://svn.dev.java.net/svn/hudson/branches/rc
........
r29309 | kohsuke | 2010-03-26 14:44:45 -0700 (Fri, 26 Mar 2010) | 1 line
Work around for http://n4.nabble.com/hudson-logging-LogRecorderManagerTest-failing-tp1589811p1589811.html
........
r29310 | kohsuke | 2010-03-26 14:45:29 -0700 (Fri, 26 Mar 2010) | 1 line
unnecessary boxing
........
r29311 | kohsuke | 2010-03-26 16:00:41 -0700 (Fri, 26 Mar 2010) | 1 line
fixed a stability in the test.
........
r29421 | kohsuke | 2010-03-29 11:40:37 -0700 (Mon, 29 Mar 2010) | 1 line
improving the test stability
........
r29449 | kohsuke | 2010-03-29 18:08:26 -0700 (Mon, 29 Mar 2010) | 1 line
[maven-release-plugin] prepare release hudson-1_353
........
r29451 | kohsuke | 2010-03-29 18:08:46 -0700 (Mon, 29 Mar 2010) | 1 line
[maven-release-plugin] prepare for next development iteration
........
r29459 | kohsuke | 2010-03-29 19:20:42 -0700 (Mon, 29 Mar 2010) | 1 line
updated changelog as a part of the release
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29490 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-30 17:47:41 +08:00
|
|
|
import java.util.logging.LogManager;
|
2006-11-06 05:16:01 +08:00
|
|
|
import java.util.logging.LogRecord;
|
|
|
|
import java.util.logging.SimpleFormatter;
|
2007-09-27 12:16:44 +08:00
|
|
|
import java.util.regex.Pattern;
|
2006-11-06 05:16:01 +08:00
|
|
|
|
|
|
|
/**
|
2006-12-21 14:57:43 +08:00
|
|
|
* Utility functions used in views.
|
|
|
|
*
|
|
|
|
* <p>
|
2008-02-03 04:14:15 +08:00
|
|
|
* An instance of this class is created for each request and made accessible
|
|
|
|
* from view pages via the variable 'h' (h stands for Hudson.)
|
2006-12-21 14:57:43 +08:00
|
|
|
*
|
2006-11-06 05:16:01 +08:00
|
|
|
* @author Kohsuke Kawaguchi
|
|
|
|
*/
|
|
|
|
public class Functions {
|
2007-03-01 09:51:32 +08:00
|
|
|
private static volatile int globalIota = 0;
|
|
|
|
private int iota;
|
|
|
|
|
|
|
|
public Functions() {
|
|
|
|
iota = globalIota;
|
|
|
|
// concurrent requests can use the same ID --- we are just trying to
|
|
|
|
// prevent the same user from seeing the same ID repeatedly.
|
|
|
|
globalIota+=1000;
|
|
|
|
}
|
2006-12-21 14:57:43 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Generates an unique ID.
|
|
|
|
*/
|
|
|
|
public String generateId() {
|
|
|
|
return "id"+iota++;
|
|
|
|
}
|
|
|
|
|
2006-11-06 05:16:01 +08:00
|
|
|
public static boolean isModel(Object o) {
|
|
|
|
return o instanceof ModelObject;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static String xsDate(Calendar cal) {
|
|
|
|
return Util.XS_DATETIME_FORMATTER.format(cal.getTime());
|
|
|
|
}
|
|
|
|
|
2006-11-25 04:08:18 +08:00
|
|
|
public static String rfc822Date(Calendar cal) {
|
|
|
|
return Util.RFC822_DATETIME_FORMATTER.format(cal.getTime());
|
|
|
|
}
|
|
|
|
|
Merged revisions 17324-17325,17428,17430,17473-17475,17481-17482,17555-17563,17571,17593-17595,17619-17620,17637-17644,17656-17657,17663-17665,17667-17670,17730,17753,17755-17758,17763-17768,17770-17771,17901,17906,17911-17912,17958,17961-17962,17970-17977 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tool-autoinstallation
........
r17324 | jglick | 2009-04-20 18:24:32 -0700 (Mon, 20 Apr 2009) | 2 lines
Defensive cloning and Javadoc corrections.
(Though it seems no one is using the default impls of these methods yet anyway.)
........
r17325 | jglick | 2009-04-20 18:29:06 -0700 (Mon, 20 Apr 2009) | 1 line
Deprecation of delegate method is intentional.
........
r17428 | jglick | 2009-04-23 08:07:14 -0700 (Thu, 23 Apr 2009) | 1 line
Noting ToolLocationTranslator more prominently.
........
r17430 | jglick | 2009-04-23 09:16:40 -0700 (Thu, 23 Apr 2009) | 1 line
Unused imports.
........
r17473 | jglick | 2009-04-23 19:21:11 -0700 (Thu, 23 Apr 2009) | 1 line
Allow Plugin.configure to see the StaplerRequest, needed for some kinds of calls.
........
r17474 | jglick | 2009-04-23 19:25:54 -0700 (Thu, 23 Apr 2009) | 3 lines
Initial sketch of plugin to manage tool installations across slaves.
(Should really be under ../plugins/ but that was not branched, so putting here for the moment.)
........
r17475 | jglick | 2009-04-23 20:29:36 -0700 (Thu, 23 Apr 2009) | 1 line
Typo in Javadoc.
........
r17481 | jglick | 2009-04-23 22:46:26 -0700 (Thu, 23 Apr 2009) | 1 line
Unzip of an unbuffered stream is painfully slow.
........
r17482 | jglick | 2009-04-23 22:48:01 -0700 (Thu, 23 Apr 2009) | 1 line
ZIP-based tool installer now functional.
........
r17555 | jglick | 2009-04-27 17:50:38 -0700 (Mon, 27 Apr 2009) | 1 line
Build against newest trunk.
........
r17556 | jglick | 2009-04-27 18:38:28 -0700 (Mon, 27 Apr 2009) | 1 line
Adding help.
........
r17557 | jglick | 2009-04-27 18:57:46 -0700 (Mon, 27 Apr 2009) | 1 line
Moving toolName & label config GUI into generic files.
........
r17558 | jglick | 2009-04-27 19:37:30 -0700 (Mon, 27 Apr 2009) | 1 line
Typo.
........
r17559 | jglick | 2009-04-27 20:07:47 -0700 (Mon, 27 Apr 2009) | 1 line
Second tool installer type based on a freeform command.
........
r17560 | jglick | 2009-04-27 20:24:36 -0700 (Mon, 27 Apr 2009) | 1 line
installIfNecessaryFrom will now just return false in case the target dir exists but the URL cannot be opened.
........
r17561 | jglick | 2009-04-27 20:25:22 -0700 (Mon, 27 Apr 2009) | 2 lines
chmod only if something was actually installed.
Use a+x, not o+x.
........
r17562 | jglick | 2009-04-27 20:26:46 -0700 (Mon, 27 Apr 2009) | 1 line
Comment only.
........
r17563 | jglick | 2009-04-27 20:41:12 -0700 (Mon, 27 Apr 2009) | 1 line
I18N.
........
r17571 | jglick | 2009-04-28 08:15:31 -0700 (Tue, 28 Apr 2009) | 2 lines
Wiki link.
........
r17593 | jglick | 2009-04-28 15:38:33 -0700 (Tue, 28 Apr 2009) | 1 line
Turn off echo mode, it's just noise.
........
r17594 | jglick | 2009-04-28 15:39:29 -0700 (Tue, 28 Apr 2009) | 2 lines
Synchronizing access to installers for a given node/tool combo.
Sending log messages to Hudson log in real time.
........
r17595 | jglick | 2009-04-28 15:46:29 -0700 (Tue, 28 Apr 2009) | 1 line
Copyrights.
........
r17619 | jglick | 2009-04-29 06:25:23 -0700 (Wed, 29 Apr 2009) | 1 line
Improved Javadoc.
........
r17620 | jglick | 2009-04-29 06:51:11 -0700 (Wed, 29 Apr 2009) | 1 line
Demonstraing how to use DLJ to mechanically install official JDK releases on supported operating systems.
........
r17637 | kohsuke | 2009-04-30 16:15:24 -0700 (Thu, 30 Apr 2009) | 1 line
fixed what appears to be a C&P mistake
........
r17638 | kohsuke | 2009-04-30 16:16:21 -0700 (Thu, 30 Apr 2009) | 1 line
show YUI logger if YUI debugging mode is set.
........
r17639 | kohsuke | 2009-04-30 16:52:28 -0700 (Thu, 30 Apr 2009) | 7 lines
Fixed a UI script problem when <hetero-list> nests inside <repeatable>.
The cause of the problem was that the behavior for inner <hetero-list> kicks in first, altering HTML (by removing "prototypes"), before behavior for outer <repetable> kicks in and removes the master copy from DOM tree.
So <repeatable> ends up computing a master copy after some elements are removed, and hence when we try to reinsert them later by clicking "Add", it'll get incorrect copy, and re-execution of the <hetero-list> behavior bombs out.
I fixed this by skipping those HTML-altering behaviors if they show up in the part of DOM tree that's supposed to be snapshotted and removed.
........
r17640 | kohsuke | 2009-04-30 16:57:58 -0700 (Thu, 30 Apr 2009) | 7 lines
Added ToolProperty to ToolInstallation (which acts like NodeProperty to Node --- basically decorates the base object with additional properties.)
The original motivation is to implement ToolInstaller this way, if Jesse is OK. But decorating tools seem to have some other interesting use, such as a plugin for configuring $M2_HOME/conf/settings.xml, or a plugin to insert unlimited cryptography extension to JDK, or a plugin to add a few more jars into $ANT_HOME/lib.
For this to work, ToolInstallations that want properties needs to be modified to use a new constructor. For a starter, I modified the JDK class to do this.
I also took the opportunity to modernize JDK/config.jelly.
........
r17641 | kohsuke | 2009-04-30 17:02:04 -0700 (Thu, 30 Apr 2009) | 1 line
this appears to be a left-over from early days when we didn't have a means to do form validation
........
r17642 | kohsuke | 2009-04-30 17:02:35 -0700 (Thu, 30 Apr 2009) | 1 line
we don't need no.such.JDK but we need name. rebranching
........
r17643 | kohsuke | 2009-04-30 17:03:22 -0700 (Thu, 30 Apr 2009) | 1 line
rebranched from Hudson's configure.properties
........
r17644 | kohsuke | 2009-04-30 17:05:31 -0700 (Thu, 30 Apr 2009) | 1 line
removed unnecessary translations
........
r17656 | kohsuke | 2009-05-01 11:27:36 -0700 (Fri, 01 May 2009) | 1 line
Less hack for improved type safety. Asking people to write more code is not necessarily bad as long as what they need to do is obvious to them.
........
r17657 | kohsuke | 2009-05-01 12:07:20 -0700 (Fri, 01 May 2009) | 5 lines
The toolautoinst part of the change that corresponds to rev.17640.
ToolInstallers are now hooked under ToolInstallation through InstallSourceProperty as a ToolProperty.
This allows the relevant UIs to be shown in one place. Still pending Jesse's feedback. Making it a single commit to simplify a revert if necessary
........
r17663 | kohsuke | 2009-05-01 13:23:51 -0700 (Fri, 01 May 2009) | 1 line
doc improvement
........
r17664 | kohsuke | 2009-05-01 13:24:10 -0700 (Fri, 01 May 2009) | 1 line
needs this to allow Stapler to databind hetero-list automatically
........
r17665 | jglick | 2009-05-01 13:31:27 -0700 (Fri, 01 May 2009) | 1 line
Warnings.
........
r17667 | kohsuke | 2009-05-01 14:20:53 -0700 (Fri, 01 May 2009) | 1 line
added a method to do chmod
........
r17668 | kohsuke | 2009-05-01 14:30:35 -0700 (Fri, 01 May 2009) | 1 line
prefer JDK6 version to avoid unnecessary JNA loading
........
r17669 | kohsuke | 2009-05-01 14:33:09 -0700 (Fri, 01 May 2009) | 1 line
no, I must have confused this.
........
r17670 | kohsuke | 2009-05-01 15:57:11 -0700 (Fri, 01 May 2009) | 2 lines
- Automated JDK installer and its test.
- Minor update to the signature of ToolInstaller for supplying the expected default location.
........
r17730 | kohsuke | 2009-05-04 11:27:34 -0700 (Mon, 04 May 2009) | 1 line
avoid NPE as reported in HUDSON-3608
........
r17753 | jglick | 2009-05-04 19:34:08 -0700 (Mon, 04 May 2009) | 2 lines
Moved toolautoinst functionality into core.
........
r17755 | jglick | 2009-05-04 20:28:34 -0700 (Mon, 04 May 2009) | 8 lines
Added TaskListener parameter and IOException and InterruptedException to several methods:
Run.getEnvironment
NodeSpecific.forNode
ToolLocationTranslator.getToolHome
ToolLocationNodeProperty.getToolHome
ToolInstallation.translateFor
ProcessCache.Factory.getMavenInstallation
ProcessCache.Factory.getJava
........
r17756 | jglick | 2009-05-04 20:36:56 -0700 (Mon, 04 May 2009) | 1 line
expectedLocation was never strictly necessary, and will soon no longer be used even by JDKInstaller.
........
r17757 | jglick | 2009-05-04 20:40:41 -0700 (Mon, 04 May 2009) | 1 line
Not sure yet what @since should be.
........
r17758 | jglick | 2009-05-04 20:41:51 -0700 (Mon, 04 May 2009) | 1 line
getDefaultInstallers method added. Not yet in use.
........
r17763 | kohsuke | 2009-05-05 10:50:36 -0700 (Tue, 05 May 2009) | 1 line
deprecated redundant getJavaHome method
........
r17764 | kohsuke | 2009-05-05 12:10:45 -0700 (Tue, 05 May 2009) | 1 line
added general-purpose property defaulting mechanism, and added default tool installer for JDK
........
r17765 | jglick | 2009-05-05 12:35:56 -0700 (Tue, 05 May 2009) | 1 line
capitalize("") -> ""
........
r17766 | jglick | 2009-05-05 12:49:52 -0700 (Tue, 05 May 2009) | 1 line
Missing @since.
........
r17767 | jglick | 2009-05-05 13:01:41 -0700 (Tue, 05 May 2009) | 1 line
Unchecked warning.
........
r17768 | jglick | 2009-05-05 13:19:49 -0700 (Tue, 05 May 2009) | 2 lines
Two unsuccessful attempts at form validation.
........
r17770 | jglick | 2009-05-05 13:48:37 -0700 (Tue, 05 May 2009) | 1 line
Better class names.
........
r17771 | kohsuke | 2009-05-05 14:12:21 -0700 (Tue, 05 May 2009) | 5 lines
brought the form validation check back. The trick is to use the 'value' parameter.
In the end we'd expect this check to go away anyway, as we change input field to drop-down list, but in the mean time, this is why it didn't work.
Maybe we probably need more static code checkers? Like FindBugs rules?
........
r17901 | kohsuke | 2009-05-09 19:15:40 -0700 (Sat, 09 May 2009) | 1 line
having two toolHome is odd.
........
r17906 | kohsuke | 2009-05-10 11:09:13 -0700 (Sun, 10 May 2009) | 1 line
adding the generalization of UpdateCenter, but for compatibility reasons, we are leaving UpdateCenter as-is.
........
r17911 | kohsuke | 2009-05-10 17:02:53 -0700 (Sun, 10 May 2009) | 1 line
integrated json-lib with a bit of bug fix
........
r17912 | kohsuke | 2009-05-10 17:13:05 -0700 (Sun, 10 May 2009) | 1 line
JDK list is now fetched from hudson.dev.java.net
........
r17958 | kohsuke | 2009-05-11 13:44:25 -0700 (Mon, 11 May 2009) | 48 lines
Handle AbortException better to avoid error like this:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to delete directory: C:\files\hudson\workspace\hudson\hudson\main\remoting\target. Reason: Unable to delete file C:\files\hudson\workspace\hudson\hudson\main\remoting\target\remoting-1.304-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Sun May 10 18:15:33 PDT 2009
[INFO] Final Memory: 25M/48M
[INFO] ------------------------------------------------------------------------
Recording fingerprints
Archiving artifacts
Recording test results
ERROR: Failed to archive JUnit reports
hudson.util.IOException2: remote file operation failed
at hudson.FilePath.act(FilePath.java:596)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:82)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:372)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:360)
at hudson.model.Build$RunnerImpl.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:345)
at hudson.model.Run.run(Run.java:943)
at hudson.model.Build.run(Build.java:112)
at hudson.model.ResourceController.execute(ResourceController.java:93)
at hudson.model.Executor.run(Executor.java:119)
Caused by: hudson.AbortException: Test reports were found but none of them are new. Did tests run?
For example, \files\hudson\workspace\hudson\hudson\main\core\target\surefire-reports\TEST-hudson.BulkChangeTest.xml is 2 days 23 hr old
at hudson.tasks.junit.TestResult.parse(TestResult.java:134)
at hudson.tasks.junit.TestResult.<init>(TestResult.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:82)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1583)
at hudson.remoting.UserRequest.perform(UserRequest.java:92)
at hudson.remoting.UserRequest.perform(UserRequest.java:46)
at hudson.remoting.Request$2.run(Request.java:236)
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)
........
r17961 | kohsuke | 2009-05-11 15:16:39 -0700 (Mon, 11 May 2009) | 1 line
adding Windows JDK silent installation
........
r17962 | kohsuke | 2009-05-11 16:08:13 -0700 (Mon, 11 May 2009) | 1 line
Fixing JDK offline installatino for Windows
........
r17970 | kohsuke | 2009-05-11 19:37:59 -0700 (Mon, 11 May 2009) | 1 line
Fixing a problem that prevents the usage of this tag in <repeatable> block, which reinserts the same fragment over and over. So statically assigning IDs won't work
........
r17971 | kohsuke | 2009-05-11 22:17:09 -0700 (Mon, 11 May 2009) | 1 line
continuing to remove static ID generation, which breaks the tag when used inside <repetable> tag.
........
r17972 | kohsuke | 2009-05-11 22:19:11 -0700 (Mon, 11 May 2009) | 1 line
I don't know when this started, but even in the hudson-dev:run mode, the versionis no longer '?', so we need a different way to force reload
........
r17973 | kohsuke | 2009-05-11 22:26:34 -0700 (Mon, 11 May 2009) | 1 line
adjusted the text a bit since multiple "add" and "delete"s were rather confusing
........
r17974 | kohsuke | 2009-05-11 22:31:58 -0700 (Mon, 11 May 2009) | 1 line
added help screen
........
r17975 | kohsuke | 2009-05-11 22:41:39 -0700 (Mon, 11 May 2009) | 1 line
form validation now works against the checkbox, too
........
r17976 | kohsuke | 2009-05-11 22:43:00 -0700 (Mon, 11 May 2009) | 1 line
with auto installation, we expect users to specify a directory that doesn't exist yet, so don't report it as an error
........
r17977 | kohsuke | 2009-05-11 22:43:24 -0700 (Mon, 11 May 2009) | 1 line
improving the text
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17985 71c3de6d-444a-0410-be80-ed276b4c234a
2009-05-12 21:59:10 +08:00
|
|
|
/**
|
|
|
|
* Given {@code c=MyList (extends ArrayList<Foo>), base=List}, compute the parameterization of 'base'
|
|
|
|
* that's assignable from 'c' (in this case {@code List<Foo>}), and return its n-th type parameter
|
|
|
|
* (n=0 would return {@code Foo}).
|
|
|
|
*
|
|
|
|
* <p>
|
|
|
|
* This method is useful for doing type arithmetic.
|
|
|
|
*
|
|
|
|
* @throws AssertionError
|
|
|
|
* if c' is not parameterized.
|
|
|
|
*/
|
|
|
|
public static <B> Class getTypeParameter(Class<? extends B> c, Class<B> base, int n) {
|
|
|
|
Type parameterization = Types.getBaseClass(c,base);
|
|
|
|
if (parameterization instanceof ParameterizedType) {
|
|
|
|
ParameterizedType pt = (ParameterizedType) parameterization;
|
|
|
|
return Types.erasure(Types.getTypeArgument(pt,n));
|
|
|
|
} else {
|
|
|
|
throw new AssertionError(c+" doesn't properly parameterize "+base);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public JDK.DescriptorImpl getJDKDescriptor() {
|
2011-05-29 01:11:48 +08:00
|
|
|
return Jenkins.getInstance().getDescriptorByType(JDK.DescriptorImpl.class);
|
Merged revisions 17324-17325,17428,17430,17473-17475,17481-17482,17555-17563,17571,17593-17595,17619-17620,17637-17644,17656-17657,17663-17665,17667-17670,17730,17753,17755-17758,17763-17768,17770-17771,17901,17906,17911-17912,17958,17961-17962,17970-17977 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tool-autoinstallation
........
r17324 | jglick | 2009-04-20 18:24:32 -0700 (Mon, 20 Apr 2009) | 2 lines
Defensive cloning and Javadoc corrections.
(Though it seems no one is using the default impls of these methods yet anyway.)
........
r17325 | jglick | 2009-04-20 18:29:06 -0700 (Mon, 20 Apr 2009) | 1 line
Deprecation of delegate method is intentional.
........
r17428 | jglick | 2009-04-23 08:07:14 -0700 (Thu, 23 Apr 2009) | 1 line
Noting ToolLocationTranslator more prominently.
........
r17430 | jglick | 2009-04-23 09:16:40 -0700 (Thu, 23 Apr 2009) | 1 line
Unused imports.
........
r17473 | jglick | 2009-04-23 19:21:11 -0700 (Thu, 23 Apr 2009) | 1 line
Allow Plugin.configure to see the StaplerRequest, needed for some kinds of calls.
........
r17474 | jglick | 2009-04-23 19:25:54 -0700 (Thu, 23 Apr 2009) | 3 lines
Initial sketch of plugin to manage tool installations across slaves.
(Should really be under ../plugins/ but that was not branched, so putting here for the moment.)
........
r17475 | jglick | 2009-04-23 20:29:36 -0700 (Thu, 23 Apr 2009) | 1 line
Typo in Javadoc.
........
r17481 | jglick | 2009-04-23 22:46:26 -0700 (Thu, 23 Apr 2009) | 1 line
Unzip of an unbuffered stream is painfully slow.
........
r17482 | jglick | 2009-04-23 22:48:01 -0700 (Thu, 23 Apr 2009) | 1 line
ZIP-based tool installer now functional.
........
r17555 | jglick | 2009-04-27 17:50:38 -0700 (Mon, 27 Apr 2009) | 1 line
Build against newest trunk.
........
r17556 | jglick | 2009-04-27 18:38:28 -0700 (Mon, 27 Apr 2009) | 1 line
Adding help.
........
r17557 | jglick | 2009-04-27 18:57:46 -0700 (Mon, 27 Apr 2009) | 1 line
Moving toolName & label config GUI into generic files.
........
r17558 | jglick | 2009-04-27 19:37:30 -0700 (Mon, 27 Apr 2009) | 1 line
Typo.
........
r17559 | jglick | 2009-04-27 20:07:47 -0700 (Mon, 27 Apr 2009) | 1 line
Second tool installer type based on a freeform command.
........
r17560 | jglick | 2009-04-27 20:24:36 -0700 (Mon, 27 Apr 2009) | 1 line
installIfNecessaryFrom will now just return false in case the target dir exists but the URL cannot be opened.
........
r17561 | jglick | 2009-04-27 20:25:22 -0700 (Mon, 27 Apr 2009) | 2 lines
chmod only if something was actually installed.
Use a+x, not o+x.
........
r17562 | jglick | 2009-04-27 20:26:46 -0700 (Mon, 27 Apr 2009) | 1 line
Comment only.
........
r17563 | jglick | 2009-04-27 20:41:12 -0700 (Mon, 27 Apr 2009) | 1 line
I18N.
........
r17571 | jglick | 2009-04-28 08:15:31 -0700 (Tue, 28 Apr 2009) | 2 lines
Wiki link.
........
r17593 | jglick | 2009-04-28 15:38:33 -0700 (Tue, 28 Apr 2009) | 1 line
Turn off echo mode, it's just noise.
........
r17594 | jglick | 2009-04-28 15:39:29 -0700 (Tue, 28 Apr 2009) | 2 lines
Synchronizing access to installers for a given node/tool combo.
Sending log messages to Hudson log in real time.
........
r17595 | jglick | 2009-04-28 15:46:29 -0700 (Tue, 28 Apr 2009) | 1 line
Copyrights.
........
r17619 | jglick | 2009-04-29 06:25:23 -0700 (Wed, 29 Apr 2009) | 1 line
Improved Javadoc.
........
r17620 | jglick | 2009-04-29 06:51:11 -0700 (Wed, 29 Apr 2009) | 1 line
Demonstraing how to use DLJ to mechanically install official JDK releases on supported operating systems.
........
r17637 | kohsuke | 2009-04-30 16:15:24 -0700 (Thu, 30 Apr 2009) | 1 line
fixed what appears to be a C&P mistake
........
r17638 | kohsuke | 2009-04-30 16:16:21 -0700 (Thu, 30 Apr 2009) | 1 line
show YUI logger if YUI debugging mode is set.
........
r17639 | kohsuke | 2009-04-30 16:52:28 -0700 (Thu, 30 Apr 2009) | 7 lines
Fixed a UI script problem when <hetero-list> nests inside <repeatable>.
The cause of the problem was that the behavior for inner <hetero-list> kicks in first, altering HTML (by removing "prototypes"), before behavior for outer <repetable> kicks in and removes the master copy from DOM tree.
So <repeatable> ends up computing a master copy after some elements are removed, and hence when we try to reinsert them later by clicking "Add", it'll get incorrect copy, and re-execution of the <hetero-list> behavior bombs out.
I fixed this by skipping those HTML-altering behaviors if they show up in the part of DOM tree that's supposed to be snapshotted and removed.
........
r17640 | kohsuke | 2009-04-30 16:57:58 -0700 (Thu, 30 Apr 2009) | 7 lines
Added ToolProperty to ToolInstallation (which acts like NodeProperty to Node --- basically decorates the base object with additional properties.)
The original motivation is to implement ToolInstaller this way, if Jesse is OK. But decorating tools seem to have some other interesting use, such as a plugin for configuring $M2_HOME/conf/settings.xml, or a plugin to insert unlimited cryptography extension to JDK, or a plugin to add a few more jars into $ANT_HOME/lib.
For this to work, ToolInstallations that want properties needs to be modified to use a new constructor. For a starter, I modified the JDK class to do this.
I also took the opportunity to modernize JDK/config.jelly.
........
r17641 | kohsuke | 2009-04-30 17:02:04 -0700 (Thu, 30 Apr 2009) | 1 line
this appears to be a left-over from early days when we didn't have a means to do form validation
........
r17642 | kohsuke | 2009-04-30 17:02:35 -0700 (Thu, 30 Apr 2009) | 1 line
we don't need no.such.JDK but we need name. rebranching
........
r17643 | kohsuke | 2009-04-30 17:03:22 -0700 (Thu, 30 Apr 2009) | 1 line
rebranched from Hudson's configure.properties
........
r17644 | kohsuke | 2009-04-30 17:05:31 -0700 (Thu, 30 Apr 2009) | 1 line
removed unnecessary translations
........
r17656 | kohsuke | 2009-05-01 11:27:36 -0700 (Fri, 01 May 2009) | 1 line
Less hack for improved type safety. Asking people to write more code is not necessarily bad as long as what they need to do is obvious to them.
........
r17657 | kohsuke | 2009-05-01 12:07:20 -0700 (Fri, 01 May 2009) | 5 lines
The toolautoinst part of the change that corresponds to rev.17640.
ToolInstallers are now hooked under ToolInstallation through InstallSourceProperty as a ToolProperty.
This allows the relevant UIs to be shown in one place. Still pending Jesse's feedback. Making it a single commit to simplify a revert if necessary
........
r17663 | kohsuke | 2009-05-01 13:23:51 -0700 (Fri, 01 May 2009) | 1 line
doc improvement
........
r17664 | kohsuke | 2009-05-01 13:24:10 -0700 (Fri, 01 May 2009) | 1 line
needs this to allow Stapler to databind hetero-list automatically
........
r17665 | jglick | 2009-05-01 13:31:27 -0700 (Fri, 01 May 2009) | 1 line
Warnings.
........
r17667 | kohsuke | 2009-05-01 14:20:53 -0700 (Fri, 01 May 2009) | 1 line
added a method to do chmod
........
r17668 | kohsuke | 2009-05-01 14:30:35 -0700 (Fri, 01 May 2009) | 1 line
prefer JDK6 version to avoid unnecessary JNA loading
........
r17669 | kohsuke | 2009-05-01 14:33:09 -0700 (Fri, 01 May 2009) | 1 line
no, I must have confused this.
........
r17670 | kohsuke | 2009-05-01 15:57:11 -0700 (Fri, 01 May 2009) | 2 lines
- Automated JDK installer and its test.
- Minor update to the signature of ToolInstaller for supplying the expected default location.
........
r17730 | kohsuke | 2009-05-04 11:27:34 -0700 (Mon, 04 May 2009) | 1 line
avoid NPE as reported in HUDSON-3608
........
r17753 | jglick | 2009-05-04 19:34:08 -0700 (Mon, 04 May 2009) | 2 lines
Moved toolautoinst functionality into core.
........
r17755 | jglick | 2009-05-04 20:28:34 -0700 (Mon, 04 May 2009) | 8 lines
Added TaskListener parameter and IOException and InterruptedException to several methods:
Run.getEnvironment
NodeSpecific.forNode
ToolLocationTranslator.getToolHome
ToolLocationNodeProperty.getToolHome
ToolInstallation.translateFor
ProcessCache.Factory.getMavenInstallation
ProcessCache.Factory.getJava
........
r17756 | jglick | 2009-05-04 20:36:56 -0700 (Mon, 04 May 2009) | 1 line
expectedLocation was never strictly necessary, and will soon no longer be used even by JDKInstaller.
........
r17757 | jglick | 2009-05-04 20:40:41 -0700 (Mon, 04 May 2009) | 1 line
Not sure yet what @since should be.
........
r17758 | jglick | 2009-05-04 20:41:51 -0700 (Mon, 04 May 2009) | 1 line
getDefaultInstallers method added. Not yet in use.
........
r17763 | kohsuke | 2009-05-05 10:50:36 -0700 (Tue, 05 May 2009) | 1 line
deprecated redundant getJavaHome method
........
r17764 | kohsuke | 2009-05-05 12:10:45 -0700 (Tue, 05 May 2009) | 1 line
added general-purpose property defaulting mechanism, and added default tool installer for JDK
........
r17765 | jglick | 2009-05-05 12:35:56 -0700 (Tue, 05 May 2009) | 1 line
capitalize("") -> ""
........
r17766 | jglick | 2009-05-05 12:49:52 -0700 (Tue, 05 May 2009) | 1 line
Missing @since.
........
r17767 | jglick | 2009-05-05 13:01:41 -0700 (Tue, 05 May 2009) | 1 line
Unchecked warning.
........
r17768 | jglick | 2009-05-05 13:19:49 -0700 (Tue, 05 May 2009) | 2 lines
Two unsuccessful attempts at form validation.
........
r17770 | jglick | 2009-05-05 13:48:37 -0700 (Tue, 05 May 2009) | 1 line
Better class names.
........
r17771 | kohsuke | 2009-05-05 14:12:21 -0700 (Tue, 05 May 2009) | 5 lines
brought the form validation check back. The trick is to use the 'value' parameter.
In the end we'd expect this check to go away anyway, as we change input field to drop-down list, but in the mean time, this is why it didn't work.
Maybe we probably need more static code checkers? Like FindBugs rules?
........
r17901 | kohsuke | 2009-05-09 19:15:40 -0700 (Sat, 09 May 2009) | 1 line
having two toolHome is odd.
........
r17906 | kohsuke | 2009-05-10 11:09:13 -0700 (Sun, 10 May 2009) | 1 line
adding the generalization of UpdateCenter, but for compatibility reasons, we are leaving UpdateCenter as-is.
........
r17911 | kohsuke | 2009-05-10 17:02:53 -0700 (Sun, 10 May 2009) | 1 line
integrated json-lib with a bit of bug fix
........
r17912 | kohsuke | 2009-05-10 17:13:05 -0700 (Sun, 10 May 2009) | 1 line
JDK list is now fetched from hudson.dev.java.net
........
r17958 | kohsuke | 2009-05-11 13:44:25 -0700 (Mon, 11 May 2009) | 48 lines
Handle AbortException better to avoid error like this:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to delete directory: C:\files\hudson\workspace\hudson\hudson\main\remoting\target. Reason: Unable to delete file C:\files\hudson\workspace\hudson\hudson\main\remoting\target\remoting-1.304-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Sun May 10 18:15:33 PDT 2009
[INFO] Final Memory: 25M/48M
[INFO] ------------------------------------------------------------------------
Recording fingerprints
Archiving artifacts
Recording test results
ERROR: Failed to archive JUnit reports
hudson.util.IOException2: remote file operation failed
at hudson.FilePath.act(FilePath.java:596)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:82)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:372)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:360)
at hudson.model.Build$RunnerImpl.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:345)
at hudson.model.Run.run(Run.java:943)
at hudson.model.Build.run(Build.java:112)
at hudson.model.ResourceController.execute(ResourceController.java:93)
at hudson.model.Executor.run(Executor.java:119)
Caused by: hudson.AbortException: Test reports were found but none of them are new. Did tests run?
For example, \files\hudson\workspace\hudson\hudson\main\core\target\surefire-reports\TEST-hudson.BulkChangeTest.xml is 2 days 23 hr old
at hudson.tasks.junit.TestResult.parse(TestResult.java:134)
at hudson.tasks.junit.TestResult.<init>(TestResult.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:82)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1583)
at hudson.remoting.UserRequest.perform(UserRequest.java:92)
at hudson.remoting.UserRequest.perform(UserRequest.java:46)
at hudson.remoting.Request$2.run(Request.java:236)
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)
........
r17961 | kohsuke | 2009-05-11 15:16:39 -0700 (Mon, 11 May 2009) | 1 line
adding Windows JDK silent installation
........
r17962 | kohsuke | 2009-05-11 16:08:13 -0700 (Mon, 11 May 2009) | 1 line
Fixing JDK offline installatino for Windows
........
r17970 | kohsuke | 2009-05-11 19:37:59 -0700 (Mon, 11 May 2009) | 1 line
Fixing a problem that prevents the usage of this tag in <repeatable> block, which reinserts the same fragment over and over. So statically assigning IDs won't work
........
r17971 | kohsuke | 2009-05-11 22:17:09 -0700 (Mon, 11 May 2009) | 1 line
continuing to remove static ID generation, which breaks the tag when used inside <repetable> tag.
........
r17972 | kohsuke | 2009-05-11 22:19:11 -0700 (Mon, 11 May 2009) | 1 line
I don't know when this started, but even in the hudson-dev:run mode, the versionis no longer '?', so we need a different way to force reload
........
r17973 | kohsuke | 2009-05-11 22:26:34 -0700 (Mon, 11 May 2009) | 1 line
adjusted the text a bit since multiple "add" and "delete"s were rather confusing
........
r17974 | kohsuke | 2009-05-11 22:31:58 -0700 (Mon, 11 May 2009) | 1 line
added help screen
........
r17975 | kohsuke | 2009-05-11 22:41:39 -0700 (Mon, 11 May 2009) | 1 line
form validation now works against the checkbox, too
........
r17976 | kohsuke | 2009-05-11 22:43:00 -0700 (Mon, 11 May 2009) | 1 line
with auto installation, we expect users to specify a directory that doesn't exist yet, so don't report it as an error
........
r17977 | kohsuke | 2009-05-11 22:43:24 -0700 (Mon, 11 May 2009) | 1 line
improving the text
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17985 71c3de6d-444a-0410-be80-ed276b4c234a
2009-05-12 21:59:10 +08:00
|
|
|
}
|
|
|
|
|
2006-12-17 14:14:43 +08:00
|
|
|
/**
|
|
|
|
* Prints the integer as a string that represents difference,
|
|
|
|
* like "-5", "+/-0", "+3".
|
|
|
|
*/
|
2006-11-06 05:16:01 +08:00
|
|
|
public static String getDiffString(int i) {
|
|
|
|
if(i==0) return "\u00B10"; // +/-0
|
|
|
|
String s = Integer.toString(i);
|
|
|
|
if(i>0) return "+"+s;
|
|
|
|
else return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2008-04-07 02:10:17 +08:00
|
|
|
* {@link #getDiffString(int)} that doesn't show anything for +/-0
|
2006-11-06 05:16:01 +08:00
|
|
|
*/
|
|
|
|
public static String getDiffString2(int i) {
|
|
|
|
if(i==0) return "";
|
|
|
|
String s = Integer.toString(i);
|
|
|
|
if(i>0) return "+"+s;
|
|
|
|
else return s;
|
|
|
|
}
|
|
|
|
|
2008-04-07 02:10:17 +08:00
|
|
|
/**
|
|
|
|
* {@link #getDiffString2(int)} that puts the result into prefix and suffix
|
|
|
|
* if there's something to print
|
|
|
|
*/
|
|
|
|
public static String getDiffString2(String prefix, int i, String suffix) {
|
|
|
|
if(i==0) return "";
|
|
|
|
String s = Integer.toString(i);
|
|
|
|
if(i>0) return prefix+"+"+s+suffix;
|
|
|
|
else return prefix+s+suffix;
|
|
|
|
}
|
|
|
|
|
2006-11-06 05:16:01 +08:00
|
|
|
/**
|
|
|
|
* Adds the proper suffix.
|
|
|
|
*/
|
|
|
|
public static String addSuffix(int n, String singular, String plural) {
|
2009-02-24 13:23:27 +08:00
|
|
|
StringBuilder buf = new StringBuilder();
|
2006-11-06 05:16:01 +08:00
|
|
|
buf.append(n).append(' ');
|
|
|
|
if(n==1)
|
|
|
|
buf.append(singular);
|
|
|
|
else
|
|
|
|
buf.append(plural);
|
|
|
|
return buf.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static RunUrl decompose(StaplerRequest req) {
|
2006-11-23 08:30:05 +08:00
|
|
|
List<Ancestor> ancestors = req.getAncestors();
|
2007-06-25 06:37:24 +08:00
|
|
|
|
|
|
|
// find the first and last Run instances
|
|
|
|
Ancestor f=null,l=null;
|
2006-11-06 05:16:01 +08:00
|
|
|
for (Ancestor anc : ancestors) {
|
|
|
|
if(anc.getObject() instanceof Run) {
|
2007-06-25 06:37:24 +08:00
|
|
|
if(f==null) f=anc;
|
|
|
|
l=anc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(l==null) return null; // there was no Run object
|
|
|
|
|
|
|
|
String head = f.getPrev().getUrl()+'/';
|
|
|
|
String base = l.getUrl();
|
|
|
|
|
|
|
|
String reqUri = req.getOriginalRequestURI();
|
2009-01-06 07:15:36 +08:00
|
|
|
// Find "rest" or URI by removing N path components.
|
|
|
|
// Not using reqUri.substring(f.getUrl().length()) to avoid mismatches due to
|
|
|
|
// url-encoding or extra slashes. Former may occur in Tomcat (despite the spec saying
|
|
|
|
// this string is not decoded, Tomcat apparently decodes this string. You see ' '
|
|
|
|
// instead of '%20', which is what the browser has sent), latter may occur in some
|
|
|
|
// proxy or URL-rewriting setups where extra slashes are inadvertently added.
|
|
|
|
String furl = f.getUrl();
|
|
|
|
int slashCount = 0;
|
|
|
|
// Count components in ancestor URL
|
|
|
|
for (int i = furl.indexOf('/'); i >= 0; i = furl.indexOf('/', i + 1)) slashCount++;
|
|
|
|
// Remove that many from request URL, ignoring extra slashes
|
|
|
|
String rest = reqUri.replaceFirst("(?:/+[^/]*){" + slashCount + "}", "");
|
2007-06-25 06:37:24 +08:00
|
|
|
|
|
|
|
return new RunUrl( (Run) f.getObject(), head, base, rest);
|
2006-11-06 05:16:01 +08:00
|
|
|
}
|
|
|
|
|
2008-05-02 06:12:34 +08:00
|
|
|
/**
|
|
|
|
* If we know the user's screen resolution, return it. Otherwise null.
|
|
|
|
* @since 1.213
|
|
|
|
*/
|
|
|
|
public static Area getScreenResolution() {
|
|
|
|
Cookie res = Functions.getCookie(Stapler.getCurrentRequest(),"screenResolution");
|
|
|
|
if(res!=null)
|
|
|
|
return Area.parse(res.getValue());
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2007-06-25 06:37:24 +08:00
|
|
|
/**
|
|
|
|
* URL decomposed for easier computation of relevant URLs.
|
|
|
|
*
|
|
|
|
* <p>
|
|
|
|
* The decomposed URL will be of the form:
|
|
|
|
* <pre>
|
|
|
|
* aaaaaa/524/bbbbb/cccc
|
|
|
|
* -head-| N |---rest---
|
|
|
|
* ----- base -----|
|
|
|
|
* </pre>
|
|
|
|
*
|
|
|
|
* <p>
|
2011-05-29 17:53:24 +08:00
|
|
|
* The head portion is the part of the URL from the {@link jenkins.model.Jenkins}
|
2007-06-25 06:37:24 +08:00
|
|
|
* object to the first {@link Run} subtype. When "next/prev build"
|
|
|
|
* is chosen, this part remains intact.
|
|
|
|
*
|
|
|
|
* <p>
|
|
|
|
* The <tt>524</tt> is the path from {@link Job} to {@link Run}.
|
|
|
|
*
|
|
|
|
* <p>
|
|
|
|
* The <tt>bbb</tt> portion is the path after that till the last
|
|
|
|
* {@link Run} subtype. The <tt>ccc</tt> portion is the part
|
|
|
|
* after that.
|
|
|
|
*/
|
2006-11-06 05:16:01 +08:00
|
|
|
public static final class RunUrl {
|
2007-06-25 06:37:24 +08:00
|
|
|
private final String head, base, rest;
|
2006-11-06 05:16:01 +08:00
|
|
|
private final Run run;
|
|
|
|
|
2007-06-25 06:37:24 +08:00
|
|
|
|
|
|
|
public RunUrl(Run run, String head, String base, String rest) {
|
2006-11-06 05:16:01 +08:00
|
|
|
this.run = run;
|
2007-06-25 06:37:24 +08:00
|
|
|
this.head = head;
|
|
|
|
this.base = base;
|
2006-11-06 05:16:01 +08:00
|
|
|
this.rest = rest;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getBaseUrl() {
|
2007-06-25 06:37:24 +08:00
|
|
|
return base;
|
2006-11-06 05:16:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the same page in the next build.
|
|
|
|
*/
|
|
|
|
public String getNextBuildUrl() {
|
|
|
|
return getUrl(run.getNextBuild());
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the same page in the previous build.
|
|
|
|
*/
|
|
|
|
public String getPreviousBuildUrl() {
|
|
|
|
return getUrl(run.getPreviousBuild());
|
|
|
|
}
|
|
|
|
|
|
|
|
private String getUrl(Run n) {
|
|
|
|
if(n ==null)
|
|
|
|
return null;
|
|
|
|
else {
|
2007-06-25 06:37:24 +08:00
|
|
|
return head+n.getNumber()+rest;
|
2006-11-06 05:16:01 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Node.Mode[] getNodeModes() {
|
|
|
|
return Node.Mode.values();
|
2007-05-25 21:16:04 +08:00
|
|
|
}
|
|
|
|
|
2006-11-06 05:16:01 +08:00
|
|
|
public static String getProjectListString(List<Project> projects) {
|
2007-01-20 14:31:16 +08:00
|
|
|
return Items.toNameList(projects);
|
2006-11-06 05:16:01 +08:00
|
|
|
}
|
|
|
|
|
2009-03-24 02:21:12 +08:00
|
|
|
/**
|
|
|
|
* @deprecated as of 1.294
|
|
|
|
* JEXL now supports the real ternary operator "x?y:z", so this work around
|
|
|
|
* is no longer necessary.
|
|
|
|
*/
|
2006-11-06 05:16:01 +08:00
|
|
|
public static Object ifThenElse(boolean cond, Object thenValue, Object elseValue) {
|
|
|
|
return cond ? thenValue : elseValue;
|
|
|
|
}
|
2007-05-25 21:16:04 +08:00
|
|
|
|
2006-11-06 05:16:01 +08:00
|
|
|
public static String appendIfNotNull(String text, String suffix, String nullText) {
|
|
|
|
return text == null ? nullText : text + suffix;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Map getSystemProperties() {
|
2006-11-23 08:30:05 +08:00
|
|
|
return new TreeMap<Object,Object>(System.getProperties());
|
2006-11-06 05:16:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public static Map getEnvVars() {
|
2006-11-23 08:30:05 +08:00
|
|
|
return new TreeMap<String,String>(EnvVars.masterEnvVars);
|
2006-11-06 05:16:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public static boolean isWindows() {
|
|
|
|
return File.pathSeparatorChar==';';
|
|
|
|
}
|
|
|
|
|
|
|
|
public static List<LogRecord> getLogRecords() {
|
2011-05-29 01:11:48 +08:00
|
|
|
return Jenkins.logRecords;
|
2006-11-06 05:16:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public static String printLogRecord(LogRecord r) {
|
|
|
|
return formatter.format(r);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Cookie getCookie(HttpServletRequest req,String name) {
|
|
|
|
Cookie[] cookies = req.getCookies();
|
|
|
|
if(cookies!=null) {
|
|
|
|
for (Cookie cookie : cookies) {
|
|
|
|
if(cookie.getName().equals(name)) {
|
|
|
|
return cookie;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2006-11-17 00:29:56 +08:00
|
|
|
public static String getCookie(HttpServletRequest req,String name, String defaultValue) {
|
|
|
|
Cookie c = getCookie(req, name);
|
|
|
|
if(c==null || c.getValue()==null) return defaultValue;
|
|
|
|
return c.getValue();
|
|
|
|
}
|
|
|
|
|
2006-12-07 02:52:54 +08:00
|
|
|
/**
|
|
|
|
* Gets the suffix to use for YUI JavaScript.
|
|
|
|
*/
|
|
|
|
public static String getYuiSuffix() {
|
|
|
|
return DEBUG_YUI ? "debug" : "min";
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set to true if you need to use the debug version of YUI.
|
|
|
|
*/
|
Merged revisions 17324-17325,17428,17430,17473-17475,17481-17482,17555-17563,17571,17593-17595,17619-17620,17637-17644,17656-17657,17663-17665,17667-17670,17730,17753,17755-17758,17763-17768,17770-17771,17901,17906,17911-17912,17958,17961-17962,17970-17977 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tool-autoinstallation
........
r17324 | jglick | 2009-04-20 18:24:32 -0700 (Mon, 20 Apr 2009) | 2 lines
Defensive cloning and Javadoc corrections.
(Though it seems no one is using the default impls of these methods yet anyway.)
........
r17325 | jglick | 2009-04-20 18:29:06 -0700 (Mon, 20 Apr 2009) | 1 line
Deprecation of delegate method is intentional.
........
r17428 | jglick | 2009-04-23 08:07:14 -0700 (Thu, 23 Apr 2009) | 1 line
Noting ToolLocationTranslator more prominently.
........
r17430 | jglick | 2009-04-23 09:16:40 -0700 (Thu, 23 Apr 2009) | 1 line
Unused imports.
........
r17473 | jglick | 2009-04-23 19:21:11 -0700 (Thu, 23 Apr 2009) | 1 line
Allow Plugin.configure to see the StaplerRequest, needed for some kinds of calls.
........
r17474 | jglick | 2009-04-23 19:25:54 -0700 (Thu, 23 Apr 2009) | 3 lines
Initial sketch of plugin to manage tool installations across slaves.
(Should really be under ../plugins/ but that was not branched, so putting here for the moment.)
........
r17475 | jglick | 2009-04-23 20:29:36 -0700 (Thu, 23 Apr 2009) | 1 line
Typo in Javadoc.
........
r17481 | jglick | 2009-04-23 22:46:26 -0700 (Thu, 23 Apr 2009) | 1 line
Unzip of an unbuffered stream is painfully slow.
........
r17482 | jglick | 2009-04-23 22:48:01 -0700 (Thu, 23 Apr 2009) | 1 line
ZIP-based tool installer now functional.
........
r17555 | jglick | 2009-04-27 17:50:38 -0700 (Mon, 27 Apr 2009) | 1 line
Build against newest trunk.
........
r17556 | jglick | 2009-04-27 18:38:28 -0700 (Mon, 27 Apr 2009) | 1 line
Adding help.
........
r17557 | jglick | 2009-04-27 18:57:46 -0700 (Mon, 27 Apr 2009) | 1 line
Moving toolName & label config GUI into generic files.
........
r17558 | jglick | 2009-04-27 19:37:30 -0700 (Mon, 27 Apr 2009) | 1 line
Typo.
........
r17559 | jglick | 2009-04-27 20:07:47 -0700 (Mon, 27 Apr 2009) | 1 line
Second tool installer type based on a freeform command.
........
r17560 | jglick | 2009-04-27 20:24:36 -0700 (Mon, 27 Apr 2009) | 1 line
installIfNecessaryFrom will now just return false in case the target dir exists but the URL cannot be opened.
........
r17561 | jglick | 2009-04-27 20:25:22 -0700 (Mon, 27 Apr 2009) | 2 lines
chmod only if something was actually installed.
Use a+x, not o+x.
........
r17562 | jglick | 2009-04-27 20:26:46 -0700 (Mon, 27 Apr 2009) | 1 line
Comment only.
........
r17563 | jglick | 2009-04-27 20:41:12 -0700 (Mon, 27 Apr 2009) | 1 line
I18N.
........
r17571 | jglick | 2009-04-28 08:15:31 -0700 (Tue, 28 Apr 2009) | 2 lines
Wiki link.
........
r17593 | jglick | 2009-04-28 15:38:33 -0700 (Tue, 28 Apr 2009) | 1 line
Turn off echo mode, it's just noise.
........
r17594 | jglick | 2009-04-28 15:39:29 -0700 (Tue, 28 Apr 2009) | 2 lines
Synchronizing access to installers for a given node/tool combo.
Sending log messages to Hudson log in real time.
........
r17595 | jglick | 2009-04-28 15:46:29 -0700 (Tue, 28 Apr 2009) | 1 line
Copyrights.
........
r17619 | jglick | 2009-04-29 06:25:23 -0700 (Wed, 29 Apr 2009) | 1 line
Improved Javadoc.
........
r17620 | jglick | 2009-04-29 06:51:11 -0700 (Wed, 29 Apr 2009) | 1 line
Demonstraing how to use DLJ to mechanically install official JDK releases on supported operating systems.
........
r17637 | kohsuke | 2009-04-30 16:15:24 -0700 (Thu, 30 Apr 2009) | 1 line
fixed what appears to be a C&P mistake
........
r17638 | kohsuke | 2009-04-30 16:16:21 -0700 (Thu, 30 Apr 2009) | 1 line
show YUI logger if YUI debugging mode is set.
........
r17639 | kohsuke | 2009-04-30 16:52:28 -0700 (Thu, 30 Apr 2009) | 7 lines
Fixed a UI script problem when <hetero-list> nests inside <repeatable>.
The cause of the problem was that the behavior for inner <hetero-list> kicks in first, altering HTML (by removing "prototypes"), before behavior for outer <repetable> kicks in and removes the master copy from DOM tree.
So <repeatable> ends up computing a master copy after some elements are removed, and hence when we try to reinsert them later by clicking "Add", it'll get incorrect copy, and re-execution of the <hetero-list> behavior bombs out.
I fixed this by skipping those HTML-altering behaviors if they show up in the part of DOM tree that's supposed to be snapshotted and removed.
........
r17640 | kohsuke | 2009-04-30 16:57:58 -0700 (Thu, 30 Apr 2009) | 7 lines
Added ToolProperty to ToolInstallation (which acts like NodeProperty to Node --- basically decorates the base object with additional properties.)
The original motivation is to implement ToolInstaller this way, if Jesse is OK. But decorating tools seem to have some other interesting use, such as a plugin for configuring $M2_HOME/conf/settings.xml, or a plugin to insert unlimited cryptography extension to JDK, or a plugin to add a few more jars into $ANT_HOME/lib.
For this to work, ToolInstallations that want properties needs to be modified to use a new constructor. For a starter, I modified the JDK class to do this.
I also took the opportunity to modernize JDK/config.jelly.
........
r17641 | kohsuke | 2009-04-30 17:02:04 -0700 (Thu, 30 Apr 2009) | 1 line
this appears to be a left-over from early days when we didn't have a means to do form validation
........
r17642 | kohsuke | 2009-04-30 17:02:35 -0700 (Thu, 30 Apr 2009) | 1 line
we don't need no.such.JDK but we need name. rebranching
........
r17643 | kohsuke | 2009-04-30 17:03:22 -0700 (Thu, 30 Apr 2009) | 1 line
rebranched from Hudson's configure.properties
........
r17644 | kohsuke | 2009-04-30 17:05:31 -0700 (Thu, 30 Apr 2009) | 1 line
removed unnecessary translations
........
r17656 | kohsuke | 2009-05-01 11:27:36 -0700 (Fri, 01 May 2009) | 1 line
Less hack for improved type safety. Asking people to write more code is not necessarily bad as long as what they need to do is obvious to them.
........
r17657 | kohsuke | 2009-05-01 12:07:20 -0700 (Fri, 01 May 2009) | 5 lines
The toolautoinst part of the change that corresponds to rev.17640.
ToolInstallers are now hooked under ToolInstallation through InstallSourceProperty as a ToolProperty.
This allows the relevant UIs to be shown in one place. Still pending Jesse's feedback. Making it a single commit to simplify a revert if necessary
........
r17663 | kohsuke | 2009-05-01 13:23:51 -0700 (Fri, 01 May 2009) | 1 line
doc improvement
........
r17664 | kohsuke | 2009-05-01 13:24:10 -0700 (Fri, 01 May 2009) | 1 line
needs this to allow Stapler to databind hetero-list automatically
........
r17665 | jglick | 2009-05-01 13:31:27 -0700 (Fri, 01 May 2009) | 1 line
Warnings.
........
r17667 | kohsuke | 2009-05-01 14:20:53 -0700 (Fri, 01 May 2009) | 1 line
added a method to do chmod
........
r17668 | kohsuke | 2009-05-01 14:30:35 -0700 (Fri, 01 May 2009) | 1 line
prefer JDK6 version to avoid unnecessary JNA loading
........
r17669 | kohsuke | 2009-05-01 14:33:09 -0700 (Fri, 01 May 2009) | 1 line
no, I must have confused this.
........
r17670 | kohsuke | 2009-05-01 15:57:11 -0700 (Fri, 01 May 2009) | 2 lines
- Automated JDK installer and its test.
- Minor update to the signature of ToolInstaller for supplying the expected default location.
........
r17730 | kohsuke | 2009-05-04 11:27:34 -0700 (Mon, 04 May 2009) | 1 line
avoid NPE as reported in HUDSON-3608
........
r17753 | jglick | 2009-05-04 19:34:08 -0700 (Mon, 04 May 2009) | 2 lines
Moved toolautoinst functionality into core.
........
r17755 | jglick | 2009-05-04 20:28:34 -0700 (Mon, 04 May 2009) | 8 lines
Added TaskListener parameter and IOException and InterruptedException to several methods:
Run.getEnvironment
NodeSpecific.forNode
ToolLocationTranslator.getToolHome
ToolLocationNodeProperty.getToolHome
ToolInstallation.translateFor
ProcessCache.Factory.getMavenInstallation
ProcessCache.Factory.getJava
........
r17756 | jglick | 2009-05-04 20:36:56 -0700 (Mon, 04 May 2009) | 1 line
expectedLocation was never strictly necessary, and will soon no longer be used even by JDKInstaller.
........
r17757 | jglick | 2009-05-04 20:40:41 -0700 (Mon, 04 May 2009) | 1 line
Not sure yet what @since should be.
........
r17758 | jglick | 2009-05-04 20:41:51 -0700 (Mon, 04 May 2009) | 1 line
getDefaultInstallers method added. Not yet in use.
........
r17763 | kohsuke | 2009-05-05 10:50:36 -0700 (Tue, 05 May 2009) | 1 line
deprecated redundant getJavaHome method
........
r17764 | kohsuke | 2009-05-05 12:10:45 -0700 (Tue, 05 May 2009) | 1 line
added general-purpose property defaulting mechanism, and added default tool installer for JDK
........
r17765 | jglick | 2009-05-05 12:35:56 -0700 (Tue, 05 May 2009) | 1 line
capitalize("") -> ""
........
r17766 | jglick | 2009-05-05 12:49:52 -0700 (Tue, 05 May 2009) | 1 line
Missing @since.
........
r17767 | jglick | 2009-05-05 13:01:41 -0700 (Tue, 05 May 2009) | 1 line
Unchecked warning.
........
r17768 | jglick | 2009-05-05 13:19:49 -0700 (Tue, 05 May 2009) | 2 lines
Two unsuccessful attempts at form validation.
........
r17770 | jglick | 2009-05-05 13:48:37 -0700 (Tue, 05 May 2009) | 1 line
Better class names.
........
r17771 | kohsuke | 2009-05-05 14:12:21 -0700 (Tue, 05 May 2009) | 5 lines
brought the form validation check back. The trick is to use the 'value' parameter.
In the end we'd expect this check to go away anyway, as we change input field to drop-down list, but in the mean time, this is why it didn't work.
Maybe we probably need more static code checkers? Like FindBugs rules?
........
r17901 | kohsuke | 2009-05-09 19:15:40 -0700 (Sat, 09 May 2009) | 1 line
having two toolHome is odd.
........
r17906 | kohsuke | 2009-05-10 11:09:13 -0700 (Sun, 10 May 2009) | 1 line
adding the generalization of UpdateCenter, but for compatibility reasons, we are leaving UpdateCenter as-is.
........
r17911 | kohsuke | 2009-05-10 17:02:53 -0700 (Sun, 10 May 2009) | 1 line
integrated json-lib with a bit of bug fix
........
r17912 | kohsuke | 2009-05-10 17:13:05 -0700 (Sun, 10 May 2009) | 1 line
JDK list is now fetched from hudson.dev.java.net
........
r17958 | kohsuke | 2009-05-11 13:44:25 -0700 (Mon, 11 May 2009) | 48 lines
Handle AbortException better to avoid error like this:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to delete directory: C:\files\hudson\workspace\hudson\hudson\main\remoting\target. Reason: Unable to delete file C:\files\hudson\workspace\hudson\hudson\main\remoting\target\remoting-1.304-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Sun May 10 18:15:33 PDT 2009
[INFO] Final Memory: 25M/48M
[INFO] ------------------------------------------------------------------------
Recording fingerprints
Archiving artifacts
Recording test results
ERROR: Failed to archive JUnit reports
hudson.util.IOException2: remote file operation failed
at hudson.FilePath.act(FilePath.java:596)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:82)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:372)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:360)
at hudson.model.Build$RunnerImpl.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:345)
at hudson.model.Run.run(Run.java:943)
at hudson.model.Build.run(Build.java:112)
at hudson.model.ResourceController.execute(ResourceController.java:93)
at hudson.model.Executor.run(Executor.java:119)
Caused by: hudson.AbortException: Test reports were found but none of them are new. Did tests run?
For example, \files\hudson\workspace\hudson\hudson\main\core\target\surefire-reports\TEST-hudson.BulkChangeTest.xml is 2 days 23 hr old
at hudson.tasks.junit.TestResult.parse(TestResult.java:134)
at hudson.tasks.junit.TestResult.<init>(TestResult.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:82)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1583)
at hudson.remoting.UserRequest.perform(UserRequest.java:92)
at hudson.remoting.UserRequest.perform(UserRequest.java:46)
at hudson.remoting.Request$2.run(Request.java:236)
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)
........
r17961 | kohsuke | 2009-05-11 15:16:39 -0700 (Mon, 11 May 2009) | 1 line
adding Windows JDK silent installation
........
r17962 | kohsuke | 2009-05-11 16:08:13 -0700 (Mon, 11 May 2009) | 1 line
Fixing JDK offline installatino for Windows
........
r17970 | kohsuke | 2009-05-11 19:37:59 -0700 (Mon, 11 May 2009) | 1 line
Fixing a problem that prevents the usage of this tag in <repeatable> block, which reinserts the same fragment over and over. So statically assigning IDs won't work
........
r17971 | kohsuke | 2009-05-11 22:17:09 -0700 (Mon, 11 May 2009) | 1 line
continuing to remove static ID generation, which breaks the tag when used inside <repetable> tag.
........
r17972 | kohsuke | 2009-05-11 22:19:11 -0700 (Mon, 11 May 2009) | 1 line
I don't know when this started, but even in the hudson-dev:run mode, the versionis no longer '?', so we need a different way to force reload
........
r17973 | kohsuke | 2009-05-11 22:26:34 -0700 (Mon, 11 May 2009) | 1 line
adjusted the text a bit since multiple "add" and "delete"s were rather confusing
........
r17974 | kohsuke | 2009-05-11 22:31:58 -0700 (Mon, 11 May 2009) | 1 line
added help screen
........
r17975 | kohsuke | 2009-05-11 22:41:39 -0700 (Mon, 11 May 2009) | 1 line
form validation now works against the checkbox, too
........
r17976 | kohsuke | 2009-05-11 22:43:00 -0700 (Mon, 11 May 2009) | 1 line
with auto installation, we expect users to specify a directory that doesn't exist yet, so don't report it as an error
........
r17977 | kohsuke | 2009-05-11 22:43:24 -0700 (Mon, 11 May 2009) | 1 line
improving the text
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17985 71c3de6d-444a-0410-be80-ed276b4c234a
2009-05-12 21:59:10 +08:00
|
|
|
public static boolean DEBUG_YUI = Boolean.getBoolean("debug.YUI");
|
2006-12-07 02:52:54 +08:00
|
|
|
|
2006-11-06 05:16:01 +08:00
|
|
|
/**
|
|
|
|
* Creates a sub map by using the given range (both ends inclusive).
|
|
|
|
*/
|
|
|
|
public static <V> SortedMap<Integer,V> filter(SortedMap<Integer,V> map, String from, String to) {
|
|
|
|
if(from==null && to==null) return map;
|
|
|
|
if(to==null)
|
|
|
|
return map.headMap(Integer.parseInt(from)-1);
|
|
|
|
if(from==null)
|
|
|
|
return map.tailMap(Integer.parseInt(to));
|
|
|
|
|
|
|
|
return map.subMap(Integer.parseInt(to),Integer.parseInt(from)-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
private static final SimpleFormatter formatter = new SimpleFormatter();
|
2006-12-03 07:53:00 +08:00
|
|
|
|
2006-12-15 14:04:38 +08:00
|
|
|
/**
|
|
|
|
* Used by <tt>layout.jelly</tt> to control the auto refresh behavior.
|
|
|
|
*
|
|
|
|
* @param noAutoRefresh
|
|
|
|
* On certain pages, like a page with forms, will have annoying interference
|
2007-05-25 21:16:04 +08:00
|
|
|
* with auto refresh. On those pages, disable auto-refresh.
|
2006-12-15 14:04:38 +08:00
|
|
|
*/
|
|
|
|
public static void configureAutoRefresh(HttpServletRequest request, HttpServletResponse response, boolean noAutoRefresh) {
|
|
|
|
if(noAutoRefresh)
|
|
|
|
return;
|
|
|
|
|
2006-12-03 07:53:00 +08:00
|
|
|
String param = request.getParameter("auto_refresh");
|
|
|
|
boolean refresh = isAutoRefresh(request);
|
|
|
|
if (param != null) {
|
|
|
|
refresh = Boolean.parseBoolean(param);
|
|
|
|
Cookie c = new Cookie("hudson_auto_refresh", Boolean.toString(refresh));
|
|
|
|
// Need to set path or it will not stick from e.g. a project page to the dashboard.
|
|
|
|
// Using request.getContextPath() might work but it seems simpler to just use the hudson_ prefix
|
|
|
|
// to avoid conflicts with any other web apps that might be on the same machine.
|
|
|
|
c.setPath("/");
|
2007-07-11 22:06:14 +08:00
|
|
|
c.setMaxAge(60*60*24*30); // persist it roughly for a month
|
2006-12-03 07:53:00 +08:00
|
|
|
response.addCookie(c);
|
|
|
|
}
|
|
|
|
if (refresh) {
|
2010-06-29 06:31:48 +08:00
|
|
|
response.addHeader("Refresh", System.getProperty("hudson.Functions.autoRefreshSeconds", "10"));
|
2006-12-03 07:53:00 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static boolean isAutoRefresh(HttpServletRequest request) {
|
|
|
|
String param = request.getParameter("auto_refresh");
|
|
|
|
if (param != null) {
|
|
|
|
return Boolean.parseBoolean(param);
|
|
|
|
}
|
2006-12-30 03:15:53 +08:00
|
|
|
Cookie[] cookies = request.getCookies();
|
|
|
|
if(cookies==null)
|
|
|
|
return false; // when API design messes it up, we all suffer
|
|
|
|
|
|
|
|
for (Cookie c : cookies) {
|
2006-12-03 07:53:00 +08:00
|
|
|
if (c.getName().equals("hudson_auto_refresh")) {
|
|
|
|
return Boolean.parseBoolean(c.getValue());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2007-01-08 05:00:49 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Finds the given object in the ancestor list and returns its URL.
|
|
|
|
* This is used to determine the "current" URL assigned to the given object,
|
|
|
|
* so that one can compute relative URLs from it.
|
|
|
|
*/
|
|
|
|
public static String getNearestAncestorUrl(StaplerRequest req,Object it) {
|
|
|
|
List list = req.getAncestors();
|
|
|
|
for( int i=list.size()-1; i>=0; i-- ) {
|
|
|
|
Ancestor anc = (Ancestor) list.get(i);
|
|
|
|
if(anc.getObject()==it)
|
|
|
|
return anc.getUrl();
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
2007-01-18 23:07:20 +08:00
|
|
|
|
2007-08-05 03:33:27 +08:00
|
|
|
/**
|
|
|
|
* Finds the inner-most {@link SearchableModelObject} in scope.
|
|
|
|
*/
|
|
|
|
public static String getSearchURL() {
|
|
|
|
List list = Stapler.getCurrentRequest().getAncestors();
|
|
|
|
for( int i=list.size()-1; i>=0; i-- ) {
|
|
|
|
Ancestor anc = (Ancestor) list.get(i);
|
|
|
|
if(anc.getObject() instanceof SearchableModelObject)
|
2007-08-05 04:10:28 +08:00
|
|
|
return anc.getUrl()+"/search/";
|
2007-08-05 03:33:27 +08:00
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2007-01-18 23:07:20 +08:00
|
|
|
public static String appendSpaceIfNotNull(String n) {
|
|
|
|
if(n==null) return null;
|
|
|
|
else return n+' ';
|
|
|
|
}
|
2007-01-20 15:31:24 +08:00
|
|
|
|
2009-02-06 09:00:20 +08:00
|
|
|
/**
|
|
|
|
* One nbsp per 10 pixels in given size, which may be a plain number or "NxN"
|
|
|
|
* (like an iconSize). Useful in a sortable table heading.
|
|
|
|
*/
|
|
|
|
public static String nbspIndent(String size) {
|
|
|
|
int i = size.indexOf('x');
|
|
|
|
i = Integer.parseInt(i > 0 ? size.substring(0, i) : size) / 10;
|
|
|
|
StringBuilder buf = new StringBuilder(30);
|
|
|
|
for (int j = 0; j < i; j++)
|
|
|
|
buf.append(" ");
|
|
|
|
return buf.toString();
|
|
|
|
}
|
|
|
|
|
2007-01-20 15:31:24 +08:00
|
|
|
public static String getWin32ErrorMessage(IOException e) {
|
|
|
|
return Util.getWin32ErrorMessage(e);
|
|
|
|
}
|
2007-01-25 23:46:05 +08:00
|
|
|
|
|
|
|
public static boolean isMultiline(String s) {
|
2007-01-26 21:12:40 +08:00
|
|
|
if(s==null) return false;
|
2007-01-25 23:46:05 +08:00
|
|
|
return s.indexOf('\r')>=0 || s.indexOf('\n')>=0;
|
|
|
|
}
|
2007-03-04 13:53:34 +08:00
|
|
|
|
|
|
|
public static String encode(String s) {
|
|
|
|
return Util.encode(s);
|
|
|
|
}
|
2007-03-11 02:03:02 +08:00
|
|
|
|
2007-04-17 09:03:55 +08:00
|
|
|
public static String escape(String s) {
|
|
|
|
return Util.escape(s);
|
|
|
|
}
|
|
|
|
|
2007-04-17 09:15:20 +08:00
|
|
|
public static String xmlEscape(String s) {
|
|
|
|
return Util.xmlEscape(s);
|
|
|
|
}
|
|
|
|
|
2011-04-13 07:52:52 +08:00
|
|
|
public static String xmlUnescape(String s) {
|
|
|
|
return s.replace("<","<").replace(">",">").replace("&","&");
|
|
|
|
}
|
|
|
|
|
2011-04-02 13:48:58 +08:00
|
|
|
public static String htmlAttributeEscape(String text) {
|
|
|
|
StringBuilder buf = new StringBuilder(text.length()+64);
|
|
|
|
for( int i=0; i<text.length(); i++ ) {
|
|
|
|
char ch = text.charAt(i);
|
|
|
|
if(ch=='<')
|
|
|
|
buf.append("<");
|
|
|
|
else
|
|
|
|
if(ch=='>')
|
|
|
|
buf.append(">");
|
|
|
|
else
|
|
|
|
if(ch=='&')
|
|
|
|
buf.append("&");
|
|
|
|
else
|
|
|
|
if(ch=='"')
|
|
|
|
buf.append(""");
|
|
|
|
else
|
|
|
|
if(ch=='\'')
|
|
|
|
buf.append("'");
|
|
|
|
else
|
|
|
|
buf.append(ch);
|
|
|
|
}
|
|
|
|
return buf.toString();
|
|
|
|
}
|
|
|
|
|
2008-01-04 09:32:30 +08:00
|
|
|
public static void checkPermission(Permission permission) throws IOException, ServletException {
|
2011-05-29 01:11:48 +08:00
|
|
|
checkPermission(Jenkins.getInstance(),permission);
|
Merged revisions 8523-8525,8545-8556,8793,8803-8806,8858,9027-9028 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tom
........
r8523 | huybrechts | 2008-04-11 13:41:11 -0700 (Fri, 11 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8524 | huybrechts | 2008-04-11 14:42:58 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8525 | huybrechts | 2008-04-11 14:53:59 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8545 | huybrechts | 2008-04-12 04:17:46 -0700 (Sat, 12 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8546 | huybrechts | 2008-04-12 04:19:26 -0700 (Sat, 12 Apr 2008) | 1 line
deleting IDE-specific files
........
r8547 | huybrechts | 2008-04-12 06:31:32 -0700 (Sat, 12 Apr 2008) | 1 line
added ignores
........
r8548 | huybrechts | 2008-04-12 06:42:49 -0700 (Sat, 12 Apr 2008) | 4 lines
Issue 1158
- extended AuthorizationStrategy to provide ACLs for different types of objects
- changed several object types to use these methods
- changed jelly to check permissions (instead of using isAdmin check)
........
r8549 | huybrechts | 2008-04-12 06:44:26 -0700 (Sat, 12 Apr 2008) | 1 line
Issue 1110: use svn revision number in project-changes.jelly
........
r8550 | huybrechts | 2008-04-12 06:46:18 -0700 (Sat, 12 Apr 2008) | 1 line
Adding a 'My Projects' view which shows only projects the user has permission for
........
r8551 | huybrechts | 2008-04-12 06:47:57 -0700 (Sat, 12 Apr 2008) | 1 line
adding a user name resolver, like the MailAddressResolver
........
r8552 | huybrechts | 2008-04-12 06:49:27 -0700 (Sat, 12 Apr 2008) | 1 line
Adding jdom and cglib to the war, as a workaround for classloading issues
........
r8553 | huybrechts | 2008-04-12 08:01:58 -0700 (Sat, 12 Apr 2008) | 1 line
SFEE integration improvements, including links to project based security
........
r8554 | huybrechts | 2008-04-12 08:27:17 -0700 (Sat, 12 Apr 2008) | 1 line
wsdl for SFEE webservices
........
r8555 | huybrechts | 2008-04-12 08:31:18 -0700 (Sat, 12 Apr 2008) | 1 line
forgot some files...
........
r8556 | huybrechts | 2008-04-12 08:34:31 -0700 (Sat, 12 Apr 2008) | 1 line
an authorization strategy that provides project-based access control (not usable on its own)
........
r8793 | huybrechts | 2008-04-22 14:39:57 -0700 (Tue, 22 Apr 2008) | 1 line
[issue #1573] allow plugins to contribute ServletFilters
........
r8803 | huybrechts | 2008-04-23 10:46:09 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8804 | huybrechts | 2008-04-23 10:52:11 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8805 | huybrechts | 2008-04-23 10:54:12 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8806 | huybrechts | 2008-04-23 10:59:13 -0700 (Wed, 23 Apr 2008) | 1 line
Issue 1158
........
r8858 | huybrechts | 2008-04-25 08:17:41 -0700 (Fri, 25 Apr 2008) | 1 line
bugfixes
........
r9027 | huybrechts | 2008-05-04 12:20:34 -0700 (Sun, 04 May 2008) | 1 line
Issue 1158 - fixing permission checks in jelly
........
r9028 | huybrechts | 2008-05-04 12:22:36 -0700 (Sun, 04 May 2008) | 1 line
creating SFEE releases from Hudson
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9699 71c3de6d-444a-0410-be80-ed276b4c234a
2008-05-30 11:25:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public static void checkPermission(AccessControlled object, Permission permission) throws IOException, ServletException {
|
|
|
|
if (permission != null) {
|
2008-06-10 07:42:36 +08:00
|
|
|
object.checkPermission(permission);
|
Merged revisions 8523-8525,8545-8556,8793,8803-8806,8858,9027-9028 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tom
........
r8523 | huybrechts | 2008-04-11 13:41:11 -0700 (Fri, 11 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8524 | huybrechts | 2008-04-11 14:42:58 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8525 | huybrechts | 2008-04-11 14:53:59 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8545 | huybrechts | 2008-04-12 04:17:46 -0700 (Sat, 12 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8546 | huybrechts | 2008-04-12 04:19:26 -0700 (Sat, 12 Apr 2008) | 1 line
deleting IDE-specific files
........
r8547 | huybrechts | 2008-04-12 06:31:32 -0700 (Sat, 12 Apr 2008) | 1 line
added ignores
........
r8548 | huybrechts | 2008-04-12 06:42:49 -0700 (Sat, 12 Apr 2008) | 4 lines
Issue 1158
- extended AuthorizationStrategy to provide ACLs for different types of objects
- changed several object types to use these methods
- changed jelly to check permissions (instead of using isAdmin check)
........
r8549 | huybrechts | 2008-04-12 06:44:26 -0700 (Sat, 12 Apr 2008) | 1 line
Issue 1110: use svn revision number in project-changes.jelly
........
r8550 | huybrechts | 2008-04-12 06:46:18 -0700 (Sat, 12 Apr 2008) | 1 line
Adding a 'My Projects' view which shows only projects the user has permission for
........
r8551 | huybrechts | 2008-04-12 06:47:57 -0700 (Sat, 12 Apr 2008) | 1 line
adding a user name resolver, like the MailAddressResolver
........
r8552 | huybrechts | 2008-04-12 06:49:27 -0700 (Sat, 12 Apr 2008) | 1 line
Adding jdom and cglib to the war, as a workaround for classloading issues
........
r8553 | huybrechts | 2008-04-12 08:01:58 -0700 (Sat, 12 Apr 2008) | 1 line
SFEE integration improvements, including links to project based security
........
r8554 | huybrechts | 2008-04-12 08:27:17 -0700 (Sat, 12 Apr 2008) | 1 line
wsdl for SFEE webservices
........
r8555 | huybrechts | 2008-04-12 08:31:18 -0700 (Sat, 12 Apr 2008) | 1 line
forgot some files...
........
r8556 | huybrechts | 2008-04-12 08:34:31 -0700 (Sat, 12 Apr 2008) | 1 line
an authorization strategy that provides project-based access control (not usable on its own)
........
r8793 | huybrechts | 2008-04-22 14:39:57 -0700 (Tue, 22 Apr 2008) | 1 line
[issue #1573] allow plugins to contribute ServletFilters
........
r8803 | huybrechts | 2008-04-23 10:46:09 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8804 | huybrechts | 2008-04-23 10:52:11 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8805 | huybrechts | 2008-04-23 10:54:12 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8806 | huybrechts | 2008-04-23 10:59:13 -0700 (Wed, 23 Apr 2008) | 1 line
Issue 1158
........
r8858 | huybrechts | 2008-04-25 08:17:41 -0700 (Fri, 25 Apr 2008) | 1 line
bugfixes
........
r9027 | huybrechts | 2008-05-04 12:20:34 -0700 (Sun, 04 May 2008) | 1 line
Issue 1158 - fixing permission checks in jelly
........
r9028 | huybrechts | 2008-05-04 12:22:36 -0700 (Sun, 04 May 2008) | 1 line
creating SFEE releases from Hudson
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9699 71c3de6d-444a-0410-be80-ed276b4c234a
2008-05-30 11:25:15 +08:00
|
|
|
}
|
2008-01-04 09:32:30 +08:00
|
|
|
}
|
|
|
|
|
2008-06-23 09:56:46 +08:00
|
|
|
/**
|
|
|
|
* This version is so that the 'checkPermission' on <tt>layout.jelly</tt>
|
|
|
|
* degrades gracefully if "it" is not an {@link AccessControlled} object.
|
|
|
|
* Otherwise it will perform no check and that problem is hard to notice.
|
|
|
|
*/
|
|
|
|
public static void checkPermission(Object object, Permission permission) throws IOException, ServletException {
|
2008-06-25 03:05:01 +08:00
|
|
|
if (permission == null)
|
|
|
|
return;
|
|
|
|
|
2008-06-23 09:56:46 +08:00
|
|
|
if (object instanceof AccessControlled)
|
|
|
|
checkPermission((AccessControlled) object,permission);
|
|
|
|
else {
|
|
|
|
List<Ancestor> ancs = Stapler.getCurrentRequest().getAncestors();
|
|
|
|
for(Ancestor anc : Iterators.reverse(ancs)) {
|
|
|
|
Object o = anc.getObject();
|
|
|
|
if (o instanceof AccessControlled) {
|
|
|
|
checkPermission((AccessControlled) o,permission);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2011-05-29 01:11:48 +08:00
|
|
|
checkPermission(Jenkins.getInstance(),permission);
|
2008-06-23 09:56:46 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-01-04 09:32:30 +08:00
|
|
|
/**
|
|
|
|
* Returns true if the current user has the given permission.
|
2008-01-04 09:58:09 +08:00
|
|
|
*
|
|
|
|
* @param permission
|
|
|
|
* If null, returns true. This defaulting is convenient in making the use of this method terse.
|
2008-01-04 09:32:30 +08:00
|
|
|
*/
|
|
|
|
public static boolean hasPermission(Permission permission) throws IOException, ServletException {
|
2011-05-29 01:11:48 +08:00
|
|
|
return hasPermission(Jenkins.getInstance(),permission);
|
2008-01-04 09:32:30 +08:00
|
|
|
}
|
|
|
|
|
2008-12-17 02:40:32 +08:00
|
|
|
/**
|
|
|
|
* This version is so that the 'hasPermission' can degrade gracefully
|
|
|
|
* if "it" is not an {@link AccessControlled} object.
|
|
|
|
*/
|
|
|
|
public static boolean hasPermission(Object object, Permission permission) throws IOException, ServletException {
|
|
|
|
if (permission == null)
|
|
|
|
return true;
|
|
|
|
if (object instanceof AccessControlled)
|
|
|
|
return ((AccessControlled)object).hasPermission(permission);
|
|
|
|
else {
|
|
|
|
List<Ancestor> ancs = Stapler.getCurrentRequest().getAncestors();
|
|
|
|
for(Ancestor anc : Iterators.reverse(ancs)) {
|
|
|
|
Object o = anc.getObject();
|
|
|
|
if (o instanceof AccessControlled) {
|
|
|
|
return ((AccessControlled)o).hasPermission(permission);
|
|
|
|
}
|
|
|
|
}
|
2011-05-29 01:11:48 +08:00
|
|
|
return Jenkins.getInstance().hasPermission(permission);
|
2008-12-17 02:40:32 +08:00
|
|
|
}
|
Merged revisions 8523-8525,8545-8556,8793,8803-8806,8858,9027-9028 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tom
........
r8523 | huybrechts | 2008-04-11 13:41:11 -0700 (Fri, 11 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8524 | huybrechts | 2008-04-11 14:42:58 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8525 | huybrechts | 2008-04-11 14:53:59 -0700 (Fri, 11 Apr 2008) | 1 line
[#710] project option to automatically delete the svn wc if it is locked
........
r8545 | huybrechts | 2008-04-12 04:17:46 -0700 (Sat, 12 Apr 2008) | 1 line
profile to build against current snapshot of hudson-core
........
r8546 | huybrechts | 2008-04-12 04:19:26 -0700 (Sat, 12 Apr 2008) | 1 line
deleting IDE-specific files
........
r8547 | huybrechts | 2008-04-12 06:31:32 -0700 (Sat, 12 Apr 2008) | 1 line
added ignores
........
r8548 | huybrechts | 2008-04-12 06:42:49 -0700 (Sat, 12 Apr 2008) | 4 lines
Issue 1158
- extended AuthorizationStrategy to provide ACLs for different types of objects
- changed several object types to use these methods
- changed jelly to check permissions (instead of using isAdmin check)
........
r8549 | huybrechts | 2008-04-12 06:44:26 -0700 (Sat, 12 Apr 2008) | 1 line
Issue 1110: use svn revision number in project-changes.jelly
........
r8550 | huybrechts | 2008-04-12 06:46:18 -0700 (Sat, 12 Apr 2008) | 1 line
Adding a 'My Projects' view which shows only projects the user has permission for
........
r8551 | huybrechts | 2008-04-12 06:47:57 -0700 (Sat, 12 Apr 2008) | 1 line
adding a user name resolver, like the MailAddressResolver
........
r8552 | huybrechts | 2008-04-12 06:49:27 -0700 (Sat, 12 Apr 2008) | 1 line
Adding jdom and cglib to the war, as a workaround for classloading issues
........
r8553 | huybrechts | 2008-04-12 08:01:58 -0700 (Sat, 12 Apr 2008) | 1 line
SFEE integration improvements, including links to project based security
........
r8554 | huybrechts | 2008-04-12 08:27:17 -0700 (Sat, 12 Apr 2008) | 1 line
wsdl for SFEE webservices
........
r8555 | huybrechts | 2008-04-12 08:31:18 -0700 (Sat, 12 Apr 2008) | 1 line
forgot some files...
........
r8556 | huybrechts | 2008-04-12 08:34:31 -0700 (Sat, 12 Apr 2008) | 1 line
an authorization strategy that provides project-based access control (not usable on its own)
........
r8793 | huybrechts | 2008-04-22 14:39:57 -0700 (Tue, 22 Apr 2008) | 1 line
[issue #1573] allow plugins to contribute ServletFilters
........
r8803 | huybrechts | 2008-04-23 10:46:09 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8804 | huybrechts | 2008-04-23 10:52:11 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8805 | huybrechts | 2008-04-23 10:54:12 -0700 (Wed, 23 Apr 2008) | 1 line
added ignores
........
r8806 | huybrechts | 2008-04-23 10:59:13 -0700 (Wed, 23 Apr 2008) | 1 line
Issue 1158
........
r8858 | huybrechts | 2008-04-25 08:17:41 -0700 (Fri, 25 Apr 2008) | 1 line
bugfixes
........
r9027 | huybrechts | 2008-05-04 12:20:34 -0700 (Sun, 04 May 2008) | 1 line
Issue 1158 - fixing permission checks in jelly
........
r9028 | huybrechts | 2008-05-04 12:22:36 -0700 (Sun, 04 May 2008) | 1 line
creating SFEE releases from Hudson
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9699 71c3de6d-444a-0410-be80-ed276b4c234a
2008-05-30 11:25:15 +08:00
|
|
|
}
|
|
|
|
|
2007-12-18 14:55:31 +08:00
|
|
|
public static void adminCheck(StaplerRequest req, StaplerResponse rsp, Object required, Permission permission) throws IOException, ServletException {
|
|
|
|
// this is legacy --- all views should be eventually converted to
|
|
|
|
// the permission based model.
|
2011-05-29 01:11:48 +08:00
|
|
|
if(required!=null && !Hudson.adminCheck(req, rsp)) {
|
2007-07-30 01:53:56 +08:00
|
|
|
// check failed. commit the FORBIDDEN response, then abort.
|
|
|
|
rsp.setStatus(HttpServletResponse.SC_FORBIDDEN);
|
|
|
|
rsp.getOutputStream().close();
|
2007-03-11 02:03:02 +08:00
|
|
|
throw new ServletException("Unauthorized access");
|
|
|
|
}
|
2007-12-18 14:55:31 +08:00
|
|
|
|
|
|
|
// make sure the user owns the necessary permission to access this page.
|
2007-12-20 14:35:28 +08:00
|
|
|
if(permission!=null)
|
2008-01-04 09:32:30 +08:00
|
|
|
checkPermission(permission);
|
2007-03-11 02:03:02 +08:00
|
|
|
}
|
2007-03-11 06:43:16 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Infers the hudson installation URL from the given request.
|
|
|
|
*/
|
|
|
|
public static String inferHudsonURL(StaplerRequest req) {
|
2011-05-29 01:11:48 +08:00
|
|
|
String rootUrl = Jenkins.getInstance().getRootUrl();
|
2007-09-03 08:12:13 +08:00
|
|
|
if(rootUrl !=null)
|
|
|
|
// prefer the one explicitly configured, to work with load-balancer, frontend, etc.
|
|
|
|
return rootUrl;
|
2007-03-11 06:43:16 +08:00
|
|
|
StringBuilder buf = new StringBuilder();
|
|
|
|
buf.append(req.getScheme()).append("://");
|
|
|
|
buf.append(req.getServerName());
|
|
|
|
if(req.getLocalPort()!=80)
|
|
|
|
buf.append(':').append(req.getLocalPort());
|
2007-08-11 13:29:33 +08:00
|
|
|
buf.append(req.getContextPath()).append('/');
|
2007-03-11 06:43:16 +08:00
|
|
|
return buf.toString();
|
|
|
|
}
|
2007-03-11 08:56:41 +08:00
|
|
|
|
|
|
|
public static List<JobPropertyDescriptor> getJobPropertyDescriptors(Class<? extends Job> clazz) {
|
|
|
|
return JobPropertyDescriptor.getPropertyDescriptors(clazz);
|
|
|
|
}
|
2007-03-26 07:50:35 +08:00
|
|
|
|
2007-10-29 07:39:31 +08:00
|
|
|
public static List<Descriptor<BuildWrapper>> getBuildWrapperDescriptors(AbstractProject<?,?> project) {
|
|
|
|
return BuildWrappers.getFor(project);
|
|
|
|
}
|
|
|
|
|
2007-12-06 13:53:00 +08:00
|
|
|
public static List<Descriptor<SecurityRealm>> getSecurityRealmDescriptors() {
|
2009-02-25 12:45:34 +08:00
|
|
|
return SecurityRealm.all();
|
2007-12-05 15:09:29 +08:00
|
|
|
}
|
|
|
|
|
2007-12-06 13:53:00 +08:00
|
|
|
public static List<Descriptor<AuthorizationStrategy>> getAuthorizationStrategyDescriptors() {
|
2009-02-25 03:20:44 +08:00
|
|
|
return AuthorizationStrategy.all();
|
2007-12-06 13:53:00 +08:00
|
|
|
}
|
|
|
|
|
2007-10-29 07:20:01 +08:00
|
|
|
public static List<Descriptor<Builder>> getBuilderDescriptors(AbstractProject<?,?> project) {
|
2009-02-24 12:58:40 +08:00
|
|
|
return BuildStepDescriptor.filter(Builder.all(), project.getClass());
|
2007-10-29 07:20:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public static List<Descriptor<Publisher>> getPublisherDescriptors(AbstractProject<?,?> project) {
|
2009-02-25 06:53:04 +08:00
|
|
|
return BuildStepDescriptor.filter(Publisher.all(), project.getClass());
|
2007-10-29 07:20:01 +08:00
|
|
|
}
|
|
|
|
|
2009-03-21 08:57:31 +08:00
|
|
|
public static List<SCMDescriptor<?>> getSCMDescriptors(AbstractProject<?,?> project) {
|
|
|
|
return SCM._for(project);
|
|
|
|
}
|
|
|
|
|
2008-05-19 07:38:27 +08:00
|
|
|
public static List<Descriptor<ComputerLauncher>> getComputerLauncherDescriptors() {
|
2011-05-29 01:11:48 +08:00
|
|
|
return Jenkins.getInstance().<ComputerLauncher,Descriptor<ComputerLauncher>>getDescriptorList(ComputerLauncher.class);
|
2008-05-19 01:07:24 +08:00
|
|
|
}
|
|
|
|
|
2008-05-19 07:42:52 +08:00
|
|
|
public static List<Descriptor<RetentionStrategy<?>>> getRetentionStrategyDescriptors() {
|
2009-02-25 02:45:42 +08:00
|
|
|
return RetentionStrategy.all();
|
2008-05-19 01:07:24 +08:00
|
|
|
}
|
|
|
|
|
2009-02-25 03:44:48 +08:00
|
|
|
public static List<ParameterDescriptor> getParameterDescriptors() {
|
2009-02-25 02:39:58 +08:00
|
|
|
return ParameterDefinition.all();
|
Merged revisions 9727,9739,9765-9766,9927,10332,10334-10338,10340,10416,10421,10553,10839-10845,10876 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tom
........
r9727 | huybrechts | 2008-05-31 12:49:18 -0700 (Sat, 31 May 2008) | 3 lines
Issue 1659
- cleaning up static Trigger, Hudson instances
- resetting commons-logging
........
r9739 | huybrechts | 2008-06-01 12:05:51 -0700 (Sun, 01 Jun 2008) | 1 line
#1770 catching and logging InstantiationError
........
r9765 | huybrechts | 2008-06-02 11:34:45 -0700 (Mon, 02 Jun 2008) | 1 line
project-based security: fixed a new isAdmin call
........
r9766 | huybrechts | 2008-06-02 11:35:27 -0700 (Mon, 02 Jun 2008) | 1 line
"theInstance = null" caused some reloading problems
........
r9927 | huybrechts | 2008-06-07 15:31:20 -0700 (Sat, 07 Jun 2008) | 8 lines
Initial commit of parameterized builds. Provided functionality:
- users can define parameters per project (only string paramters for now)
- if a project has parameters, the 'build' button will redirect to an input page
- parameter values can be used as ${variable} in Ant, Maven and CommandInterpreter builders
- after the build, parameter values can be viewed in a separate page
- tasks for parameterized builds are persisted in the queue over restarts
- queue persistence is now in XML (with backwards compatibility for text format)
........
r10332 | huybrechts | 2008-06-23 05:32:45 -0700 (Mon, 23 Jun 2008) | 1 line
made EmbedderLoggerImpl public for use in plugins
........
r10334 | huybrechts | 2008-06-23 05:48:10 -0700 (Mon, 23 Jun 2008) | 1 line
[HUDSON-1914] additional parameter types (job, run), bugfixes
........
r10335 | huybrechts | 2008-06-23 05:49:10 -0700 (Mon, 23 Jun 2008) | 1 line
[HUDSON-1573] initialize servlet filters
........
r10336 | huybrechts | 2008-06-23 05:52:14 -0700 (Mon, 23 Jun 2008) | 1 line
[HUDSON-1915] onStarted onevent
........
r10337 | huybrechts | 2008-06-23 06:07:32 -0700 (Mon, 23 Jun 2008) | 4 lines
[HUDSON-1504] basic ui for job-based access control
This allows assigning permissions per user and per job.
It is still possible to provide defaults using a global matrix.
........
r10338 | huybrechts | 2008-06-23 06:18:13 -0700 (Mon, 23 Jun 2008) | 3 lines
[HUDSON-1504] basic ui for job-based access control
adding it to the list...
........
r10340 | huybrechts | 2008-06-23 07:23:12 -0700 (Mon, 23 Jun 2008) | 1 line
[HUDSON-1504] fix compile error
........
r10416 | huybrechts | 2008-06-25 01:13:11 -0700 (Wed, 25 Jun 2008) | 1 line
initial commit staging plugin: supports doing a maven release to a staging repository, serving that repository for Hudson, and uploading it on demand
........
r10421 | huybrechts | 2008-06-25 12:32:06 -0700 (Wed, 25 Jun 2008) | 1 line
[HUDSON-1954] initial commit jbpm plugin and staging workflow example
........
r10553 | huybrechts | 2008-07-01 14:13:57 -0700 (Tue, 01 Jul 2008) | 1 line
moving registration for parameter definition out of registered class
........
r10839 | kohsuke | 2008-07-15 13:48:05 -0700 (Tue, 15 Jul 2008) | 6 lines
Making a few adjustments in preparation of merging back to the trunk.
- doc updates
- added QueueTaskFilter as a plain delegation implementation to simplify ParameterizedProjectTask.
- renamed ParameterDefinition.newInstance(...) to createValue, to avoid having two newInstance methods
in this part of the system that does different things
........
r10840 | kohsuke | 2008-07-15 13:51:16 -0700 (Tue, 15 Jul 2008) | 1 line
Hudson's coding convention is to use WS and no TAB.
........
r10841 | kohsuke | 2008-07-15 14:34:37 -0700 (Tue, 15 Jul 2008) | 2 lines
- making ParameterValue an abstract class to allow evolution without breaking plugins in the future
- tweaked the UI a bit so that parameterization don't get too much visibility.
........
r10842 | kohsuke | 2008-07-15 14:49:35 -0700 (Tue, 15 Jul 2008) | 2 lines
improving the UI a bit.
Added an icon
........
r10843 | kohsuke | 2008-07-15 15:08:28 -0700 (Tue, 15 Jul 2008) | 1 line
adding help
........
r10844 | kohsuke | 2008-07-15 15:10:42 -0700 (Tue, 15 Jul 2008) | 1 line
TAB->WS
........
r10845 | kohsuke | 2008-07-15 15:44:47 -0700 (Tue, 15 Jul 2008) | 2 lines
- Use HTTP status code to notify the automated clients that the build triggering failed.
- Overload the "/build" URL to render the parameter entry form.
........
r10876 | kohsuke | 2008-07-18 13:52:51 -0700 (Fri, 18 Jul 2008) | 10 lines
Giving more hooks to ParameterValue to affect a build
- abstracting the variable substitution process so that the actual syntax for marking
variables (e.g., %VAR% vs ${var} vs #{xyz}) and the actual resolution process are
orthogonal.
- parameter values can now contribute BuildWrapper to a build.
- parameter values can now contribute environment variables to a build.
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@10950 71c3de6d-444a-0410-be80-ed276b4c234a
2008-07-22 08:48:13 +08:00
|
|
|
}
|
|
|
|
|
2010-10-12 11:43:40 +08:00
|
|
|
public static List<Descriptor<ViewsTabBar>> getViewsTabBarDescriptors() {
|
|
|
|
return ViewsTabBar.all();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static List<Descriptor<MyViewsTabBar>> getMyViewsTabBarDescriptors() {
|
|
|
|
return MyViewsTabBar.all();
|
|
|
|
}
|
|
|
|
|
2009-02-25 22:42:59 +08:00
|
|
|
public static List<NodePropertyDescriptor> getNodePropertyDescriptors(Class<? extends Node> clazz) {
|
|
|
|
List<NodePropertyDescriptor> result = new ArrayList<NodePropertyDescriptor>();
|
2011-05-29 01:11:48 +08:00
|
|
|
Collection<NodePropertyDescriptor> list = (Collection) Jenkins.getInstance().getDescriptorList(NodeProperty.class);
|
2009-02-25 22:42:59 +08:00
|
|
|
for (NodePropertyDescriptor npd : list) {
|
|
|
|
if (npd.isApplicable(clazz)) {
|
|
|
|
result.add(npd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2010-08-14 15:58:33 +08:00
|
|
|
/**
|
|
|
|
* Gets all the descriptors sorted by their inheritance tree of {@link Describable}
|
|
|
|
* so that descriptors of similar types come nearby.
|
|
|
|
*/
|
|
|
|
public static Collection<Descriptor> getSortedDescriptorsForGlobalConfig() {
|
|
|
|
Map<String,Descriptor> r = new TreeMap<String, Descriptor>();
|
2011-05-29 01:11:48 +08:00
|
|
|
for (Descriptor<?> d : Jenkins.getInstance().getExtensionList(Descriptor.class)) {
|
2010-08-14 15:58:33 +08:00
|
|
|
if (d.getGlobalConfigPage()==null) continue;
|
|
|
|
r.put(buildSuperclassHierarchy(d.clazz, new StringBuilder()).toString(),d);
|
|
|
|
}
|
|
|
|
return r.values();
|
|
|
|
}
|
|
|
|
|
|
|
|
private static StringBuilder buildSuperclassHierarchy(Class c, StringBuilder buf) {
|
|
|
|
Class sc = c.getSuperclass();
|
|
|
|
if (sc!=null) buildSuperclassHierarchy(sc,buf).append(':');
|
|
|
|
return buf.append(c.getName());
|
|
|
|
}
|
|
|
|
|
2007-03-26 07:50:35 +08:00
|
|
|
/**
|
|
|
|
* Computes the path to the icon of the given action
|
|
|
|
* from the context path.
|
|
|
|
*/
|
|
|
|
public static String getIconFilePath(Action a) {
|
|
|
|
String name = a.getIconFileName();
|
|
|
|
if(name.startsWith("/"))
|
|
|
|
return name.substring(1);
|
|
|
|
else
|
|
|
|
return "images/24x24/"+name;
|
|
|
|
}
|
2007-03-27 03:37:49 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Works like JSTL build-in size(x) function,
|
|
|
|
* but handle null gracefully.
|
|
|
|
*/
|
2007-03-27 03:40:34 +08:00
|
|
|
public static int size2(Object o) throws Exception {
|
2007-03-27 03:37:49 +08:00
|
|
|
if(o==null) return 0;
|
2007-10-23 02:28:11 +08:00
|
|
|
return ASTSizeFunction.sizeOf(o,Introspector.getUberspect());
|
2007-03-27 03:37:49 +08:00
|
|
|
}
|
2007-04-08 10:10:13 +08:00
|
|
|
|
2007-04-11 13:11:12 +08:00
|
|
|
/**
|
|
|
|
* Computes the relative path from the current page to the given item.
|
|
|
|
*/
|
|
|
|
public static String getRelativeLinkTo(Item p) {
|
|
|
|
Map<Object,String> ancestors = new HashMap<Object,String>();
|
|
|
|
View view=null;
|
|
|
|
|
|
|
|
StaplerRequest request = Stapler.getCurrentRequest();
|
|
|
|
for( Ancestor a : request.getAncestors() ) {
|
|
|
|
ancestors.put(a.getObject(),a.getRelativePath());
|
|
|
|
if(a.getObject() instanceof View)
|
|
|
|
view = (View) a.getObject();
|
|
|
|
}
|
|
|
|
|
|
|
|
String path = ancestors.get(p);
|
|
|
|
if(path!=null) return path;
|
|
|
|
|
|
|
|
Item i=p;
|
|
|
|
String url = "";
|
|
|
|
while(true) {
|
|
|
|
ItemGroup ig = i.getParent();
|
|
|
|
url = i.getShortUrl()+url;
|
|
|
|
|
2011-05-29 01:11:48 +08:00
|
|
|
if(ig== Jenkins.getInstance()) {
|
2007-04-11 13:11:12 +08:00
|
|
|
assert i instanceof TopLevelItem;
|
|
|
|
if(view!=null && view.contains((TopLevelItem)i)) {
|
|
|
|
// if p and the current page belongs to the same view, then return a relative path
|
|
|
|
return ancestors.get(view)+'/'+url;
|
|
|
|
} else {
|
|
|
|
// otherwise return a path from the root Hudson
|
|
|
|
return request.getContextPath()+'/'+p.getUrl();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
path = ancestors.get(ig);
|
|
|
|
if(path!=null) return path+'/'+url;
|
|
|
|
|
|
|
|
assert ig instanceof Item; // if not, ig must have been the Hudson instance
|
|
|
|
i = (Item) ig;
|
|
|
|
}
|
|
|
|
}
|
2007-04-13 13:54:45 +08:00
|
|
|
|
2007-04-13 14:19:00 +08:00
|
|
|
public static Map<Thread,StackTraceElement[]> dumpAllThreads() {
|
2010-03-16 01:50:53 +08:00
|
|
|
Map<Thread,StackTraceElement[]> sorted = new TreeMap<Thread,StackTraceElement[]>(new ThreadSorter());
|
|
|
|
sorted.putAll(Thread.getAllStackTraces());
|
|
|
|
return sorted;
|
2007-04-13 13:54:45 +08:00
|
|
|
}
|
2007-04-13 14:09:38 +08:00
|
|
|
|
2008-11-15 08:44:57 +08:00
|
|
|
@IgnoreJRERequirement
|
2007-04-13 14:19:00 +08:00
|
|
|
public static ThreadInfo[] getThreadInfos() {
|
2007-04-13 14:09:38 +08:00
|
|
|
ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
|
2010-03-16 01:50:53 +08:00
|
|
|
return mbean.dumpAllThreads(mbean.isObjectMonitorUsageSupported(),mbean.isSynchronizerUsageSupported());
|
|
|
|
}
|
|
|
|
|
|
|
|
public static ThreadGroupMap sortThreadsAndGetGroupMap(ThreadInfo[] list) {
|
|
|
|
ThreadGroupMap sorter = new ThreadGroupMap();
|
|
|
|
Arrays.sort(list, sorter);
|
|
|
|
return sorter;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Common code for sorting Threads/ThreadInfos by ThreadGroup
|
|
|
|
private static class ThreadSorterBase {
|
|
|
|
protected Map<Long,String> map = new HashMap<Long,String>();
|
|
|
|
|
|
|
|
private ThreadSorterBase() {
|
|
|
|
ThreadGroup tg = Thread.currentThread().getThreadGroup();
|
|
|
|
while (tg.getParent() != null) tg = tg.getParent();
|
|
|
|
Thread[] threads = new Thread[tg.activeCount()*2];
|
|
|
|
int threadsLen = tg.enumerate(threads, true);
|
|
|
|
for (int i = 0; i < threadsLen; i++)
|
|
|
|
map.put(threads[i].getId(), threads[i].getThreadGroup().getName());
|
|
|
|
}
|
|
|
|
|
|
|
|
protected int compare(long idA, long idB) {
|
|
|
|
String tga = map.get(idA), tgb = map.get(idB);
|
|
|
|
int result = (tga!=null?-1:0) + (tgb!=null?1:0); // Will be non-zero if only one is null
|
|
|
|
if (result==0 && tga!=null)
|
|
|
|
result = tga.compareToIgnoreCase(tgb);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static class ThreadGroupMap extends ThreadSorterBase implements Comparator<ThreadInfo> {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return ThreadGroup name or null if unknown
|
|
|
|
*/
|
|
|
|
public String getThreadGroup(ThreadInfo ti) {
|
|
|
|
return map.get(ti.getThreadId());
|
|
|
|
}
|
|
|
|
|
|
|
|
public int compare(ThreadInfo a, ThreadInfo b) {
|
|
|
|
int result = compare(a.getThreadId(), b.getThreadId());
|
|
|
|
if (result == 0)
|
|
|
|
result = a.getThreadName().compareToIgnoreCase(b.getThreadName());
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private static class ThreadSorter extends ThreadSorterBase implements Comparator<Thread> {
|
|
|
|
|
|
|
|
public int compare(Thread a, Thread b) {
|
|
|
|
int result = compare(a.getId(), b.getId());
|
|
|
|
if (result == 0)
|
|
|
|
result = a.getName().compareToIgnoreCase(b.getName());
|
|
|
|
return result;
|
|
|
|
}
|
2007-04-13 14:09:38 +08:00
|
|
|
}
|
|
|
|
|
2007-07-30 03:05:37 +08:00
|
|
|
/**
|
|
|
|
* Are we running on JRE6 or above?
|
|
|
|
*/
|
2008-11-15 08:44:57 +08:00
|
|
|
@IgnoreJRERequirement
|
2007-07-30 03:05:37 +08:00
|
|
|
public static boolean isMustangOrAbove() {
|
|
|
|
try {
|
|
|
|
System.console();
|
|
|
|
return true;
|
|
|
|
} catch(LinkageError e) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-04-13 14:09:38 +08:00
|
|
|
// ThreadInfo.toString() truncates the stack trace by first 8, so needed my own version
|
2008-11-15 08:44:57 +08:00
|
|
|
@IgnoreJRERequirement
|
2010-03-16 01:50:53 +08:00
|
|
|
public static String dumpThreadInfo(ThreadInfo ti, ThreadGroupMap map) {
|
|
|
|
String grp = map.getThreadGroup(ti);
|
2007-04-13 14:09:38 +08:00
|
|
|
StringBuilder sb = new StringBuilder("\"" + ti.getThreadName() + "\"" +
|
2010-03-16 01:50:53 +08:00
|
|
|
" Id=" + ti.getThreadId() + " Group=" +
|
|
|
|
(grp != null ? grp : "?") + " " +
|
2007-04-13 14:09:38 +08:00
|
|
|
ti.getThreadState());
|
|
|
|
if (ti.getLockName() != null) {
|
|
|
|
sb.append(" on " + ti.getLockName());
|
|
|
|
}
|
|
|
|
if (ti.getLockOwnerName() != null) {
|
|
|
|
sb.append(" owned by \"" + ti.getLockOwnerName() +
|
|
|
|
"\" Id=" + ti.getLockOwnerId());
|
|
|
|
}
|
|
|
|
if (ti.isSuspended()) {
|
|
|
|
sb.append(" (suspended)");
|
|
|
|
}
|
|
|
|
if (ti.isInNative()) {
|
|
|
|
sb.append(" (in native)");
|
|
|
|
}
|
|
|
|
sb.append('\n');
|
|
|
|
StackTraceElement[] stackTrace = ti.getStackTrace();
|
|
|
|
for (int i=0; i < stackTrace.length; i++) {
|
|
|
|
StackTraceElement ste = stackTrace[i];
|
|
|
|
sb.append("\tat " + ste.toString());
|
|
|
|
sb.append('\n');
|
|
|
|
if (i == 0 && ti.getLockInfo() != null) {
|
|
|
|
Thread.State ts = ti.getThreadState();
|
|
|
|
switch (ts) {
|
|
|
|
case BLOCKED:
|
|
|
|
sb.append("\t- blocked on " + ti.getLockInfo());
|
|
|
|
sb.append('\n');
|
|
|
|
break;
|
|
|
|
case WAITING:
|
|
|
|
sb.append("\t- waiting on " + ti.getLockInfo());
|
|
|
|
sb.append('\n');
|
|
|
|
break;
|
|
|
|
case TIMED_WAITING:
|
|
|
|
sb.append("\t- waiting on " + ti.getLockInfo());
|
|
|
|
sb.append('\n');
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for (MonitorInfo mi : ti.getLockedMonitors()) {
|
|
|
|
if (mi.getLockedStackDepth() == i) {
|
|
|
|
sb.append("\t- locked " + mi);
|
|
|
|
sb.append('\n');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LockInfo[] locks = ti.getLockedSynchronizers();
|
|
|
|
if (locks.length > 0) {
|
|
|
|
sb.append("\n\tNumber of locked synchronizers = " + locks.length);
|
|
|
|
sb.append('\n');
|
|
|
|
for (LockInfo li : locks) {
|
|
|
|
sb.append("\t- " + li);
|
|
|
|
sb.append('\n');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sb.append('\n');
|
|
|
|
return sb.toString();
|
|
|
|
}
|
2007-06-24 14:51:59 +08:00
|
|
|
|
|
|
|
public static <T> Collection<T> emptyList() {
|
|
|
|
return Collections.emptyList();
|
|
|
|
}
|
2007-07-10 03:19:35 +08:00
|
|
|
|
|
|
|
public static String jsStringEscape(String s) {
|
|
|
|
StringBuilder buf = new StringBuilder();
|
|
|
|
for( int i=0; i<s.length(); i++ ) {
|
|
|
|
char ch = s.charAt(i);
|
|
|
|
switch(ch) {
|
|
|
|
case '\'':
|
|
|
|
buf.append("\\'");
|
|
|
|
break;
|
|
|
|
case '\\':
|
|
|
|
buf.append("\\\\");
|
|
|
|
break;
|
|
|
|
case '"':
|
|
|
|
buf.append("\\\"");
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
buf.append(ch);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return buf.toString();
|
|
|
|
}
|
2007-08-05 03:33:27 +08:00
|
|
|
|
Merged revisions 17324-17325,17428,17430,17473-17475,17481-17482,17555-17563,17571,17593-17595,17619-17620,17637-17644,17656-17657,17663-17665,17667-17670,17730,17753,17755-17758,17763-17768,17770-17771,17901,17906,17911-17912,17958,17961-17962,17970-17977 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tool-autoinstallation
........
r17324 | jglick | 2009-04-20 18:24:32 -0700 (Mon, 20 Apr 2009) | 2 lines
Defensive cloning and Javadoc corrections.
(Though it seems no one is using the default impls of these methods yet anyway.)
........
r17325 | jglick | 2009-04-20 18:29:06 -0700 (Mon, 20 Apr 2009) | 1 line
Deprecation of delegate method is intentional.
........
r17428 | jglick | 2009-04-23 08:07:14 -0700 (Thu, 23 Apr 2009) | 1 line
Noting ToolLocationTranslator more prominently.
........
r17430 | jglick | 2009-04-23 09:16:40 -0700 (Thu, 23 Apr 2009) | 1 line
Unused imports.
........
r17473 | jglick | 2009-04-23 19:21:11 -0700 (Thu, 23 Apr 2009) | 1 line
Allow Plugin.configure to see the StaplerRequest, needed for some kinds of calls.
........
r17474 | jglick | 2009-04-23 19:25:54 -0700 (Thu, 23 Apr 2009) | 3 lines
Initial sketch of plugin to manage tool installations across slaves.
(Should really be under ../plugins/ but that was not branched, so putting here for the moment.)
........
r17475 | jglick | 2009-04-23 20:29:36 -0700 (Thu, 23 Apr 2009) | 1 line
Typo in Javadoc.
........
r17481 | jglick | 2009-04-23 22:46:26 -0700 (Thu, 23 Apr 2009) | 1 line
Unzip of an unbuffered stream is painfully slow.
........
r17482 | jglick | 2009-04-23 22:48:01 -0700 (Thu, 23 Apr 2009) | 1 line
ZIP-based tool installer now functional.
........
r17555 | jglick | 2009-04-27 17:50:38 -0700 (Mon, 27 Apr 2009) | 1 line
Build against newest trunk.
........
r17556 | jglick | 2009-04-27 18:38:28 -0700 (Mon, 27 Apr 2009) | 1 line
Adding help.
........
r17557 | jglick | 2009-04-27 18:57:46 -0700 (Mon, 27 Apr 2009) | 1 line
Moving toolName & label config GUI into generic files.
........
r17558 | jglick | 2009-04-27 19:37:30 -0700 (Mon, 27 Apr 2009) | 1 line
Typo.
........
r17559 | jglick | 2009-04-27 20:07:47 -0700 (Mon, 27 Apr 2009) | 1 line
Second tool installer type based on a freeform command.
........
r17560 | jglick | 2009-04-27 20:24:36 -0700 (Mon, 27 Apr 2009) | 1 line
installIfNecessaryFrom will now just return false in case the target dir exists but the URL cannot be opened.
........
r17561 | jglick | 2009-04-27 20:25:22 -0700 (Mon, 27 Apr 2009) | 2 lines
chmod only if something was actually installed.
Use a+x, not o+x.
........
r17562 | jglick | 2009-04-27 20:26:46 -0700 (Mon, 27 Apr 2009) | 1 line
Comment only.
........
r17563 | jglick | 2009-04-27 20:41:12 -0700 (Mon, 27 Apr 2009) | 1 line
I18N.
........
r17571 | jglick | 2009-04-28 08:15:31 -0700 (Tue, 28 Apr 2009) | 2 lines
Wiki link.
........
r17593 | jglick | 2009-04-28 15:38:33 -0700 (Tue, 28 Apr 2009) | 1 line
Turn off echo mode, it's just noise.
........
r17594 | jglick | 2009-04-28 15:39:29 -0700 (Tue, 28 Apr 2009) | 2 lines
Synchronizing access to installers for a given node/tool combo.
Sending log messages to Hudson log in real time.
........
r17595 | jglick | 2009-04-28 15:46:29 -0700 (Tue, 28 Apr 2009) | 1 line
Copyrights.
........
r17619 | jglick | 2009-04-29 06:25:23 -0700 (Wed, 29 Apr 2009) | 1 line
Improved Javadoc.
........
r17620 | jglick | 2009-04-29 06:51:11 -0700 (Wed, 29 Apr 2009) | 1 line
Demonstraing how to use DLJ to mechanically install official JDK releases on supported operating systems.
........
r17637 | kohsuke | 2009-04-30 16:15:24 -0700 (Thu, 30 Apr 2009) | 1 line
fixed what appears to be a C&P mistake
........
r17638 | kohsuke | 2009-04-30 16:16:21 -0700 (Thu, 30 Apr 2009) | 1 line
show YUI logger if YUI debugging mode is set.
........
r17639 | kohsuke | 2009-04-30 16:52:28 -0700 (Thu, 30 Apr 2009) | 7 lines
Fixed a UI script problem when <hetero-list> nests inside <repeatable>.
The cause of the problem was that the behavior for inner <hetero-list> kicks in first, altering HTML (by removing "prototypes"), before behavior for outer <repetable> kicks in and removes the master copy from DOM tree.
So <repeatable> ends up computing a master copy after some elements are removed, and hence when we try to reinsert them later by clicking "Add", it'll get incorrect copy, and re-execution of the <hetero-list> behavior bombs out.
I fixed this by skipping those HTML-altering behaviors if they show up in the part of DOM tree that's supposed to be snapshotted and removed.
........
r17640 | kohsuke | 2009-04-30 16:57:58 -0700 (Thu, 30 Apr 2009) | 7 lines
Added ToolProperty to ToolInstallation (which acts like NodeProperty to Node --- basically decorates the base object with additional properties.)
The original motivation is to implement ToolInstaller this way, if Jesse is OK. But decorating tools seem to have some other interesting use, such as a plugin for configuring $M2_HOME/conf/settings.xml, or a plugin to insert unlimited cryptography extension to JDK, or a plugin to add a few more jars into $ANT_HOME/lib.
For this to work, ToolInstallations that want properties needs to be modified to use a new constructor. For a starter, I modified the JDK class to do this.
I also took the opportunity to modernize JDK/config.jelly.
........
r17641 | kohsuke | 2009-04-30 17:02:04 -0700 (Thu, 30 Apr 2009) | 1 line
this appears to be a left-over from early days when we didn't have a means to do form validation
........
r17642 | kohsuke | 2009-04-30 17:02:35 -0700 (Thu, 30 Apr 2009) | 1 line
we don't need no.such.JDK but we need name. rebranching
........
r17643 | kohsuke | 2009-04-30 17:03:22 -0700 (Thu, 30 Apr 2009) | 1 line
rebranched from Hudson's configure.properties
........
r17644 | kohsuke | 2009-04-30 17:05:31 -0700 (Thu, 30 Apr 2009) | 1 line
removed unnecessary translations
........
r17656 | kohsuke | 2009-05-01 11:27:36 -0700 (Fri, 01 May 2009) | 1 line
Less hack for improved type safety. Asking people to write more code is not necessarily bad as long as what they need to do is obvious to them.
........
r17657 | kohsuke | 2009-05-01 12:07:20 -0700 (Fri, 01 May 2009) | 5 lines
The toolautoinst part of the change that corresponds to rev.17640.
ToolInstallers are now hooked under ToolInstallation through InstallSourceProperty as a ToolProperty.
This allows the relevant UIs to be shown in one place. Still pending Jesse's feedback. Making it a single commit to simplify a revert if necessary
........
r17663 | kohsuke | 2009-05-01 13:23:51 -0700 (Fri, 01 May 2009) | 1 line
doc improvement
........
r17664 | kohsuke | 2009-05-01 13:24:10 -0700 (Fri, 01 May 2009) | 1 line
needs this to allow Stapler to databind hetero-list automatically
........
r17665 | jglick | 2009-05-01 13:31:27 -0700 (Fri, 01 May 2009) | 1 line
Warnings.
........
r17667 | kohsuke | 2009-05-01 14:20:53 -0700 (Fri, 01 May 2009) | 1 line
added a method to do chmod
........
r17668 | kohsuke | 2009-05-01 14:30:35 -0700 (Fri, 01 May 2009) | 1 line
prefer JDK6 version to avoid unnecessary JNA loading
........
r17669 | kohsuke | 2009-05-01 14:33:09 -0700 (Fri, 01 May 2009) | 1 line
no, I must have confused this.
........
r17670 | kohsuke | 2009-05-01 15:57:11 -0700 (Fri, 01 May 2009) | 2 lines
- Automated JDK installer and its test.
- Minor update to the signature of ToolInstaller for supplying the expected default location.
........
r17730 | kohsuke | 2009-05-04 11:27:34 -0700 (Mon, 04 May 2009) | 1 line
avoid NPE as reported in HUDSON-3608
........
r17753 | jglick | 2009-05-04 19:34:08 -0700 (Mon, 04 May 2009) | 2 lines
Moved toolautoinst functionality into core.
........
r17755 | jglick | 2009-05-04 20:28:34 -0700 (Mon, 04 May 2009) | 8 lines
Added TaskListener parameter and IOException and InterruptedException to several methods:
Run.getEnvironment
NodeSpecific.forNode
ToolLocationTranslator.getToolHome
ToolLocationNodeProperty.getToolHome
ToolInstallation.translateFor
ProcessCache.Factory.getMavenInstallation
ProcessCache.Factory.getJava
........
r17756 | jglick | 2009-05-04 20:36:56 -0700 (Mon, 04 May 2009) | 1 line
expectedLocation was never strictly necessary, and will soon no longer be used even by JDKInstaller.
........
r17757 | jglick | 2009-05-04 20:40:41 -0700 (Mon, 04 May 2009) | 1 line
Not sure yet what @since should be.
........
r17758 | jglick | 2009-05-04 20:41:51 -0700 (Mon, 04 May 2009) | 1 line
getDefaultInstallers method added. Not yet in use.
........
r17763 | kohsuke | 2009-05-05 10:50:36 -0700 (Tue, 05 May 2009) | 1 line
deprecated redundant getJavaHome method
........
r17764 | kohsuke | 2009-05-05 12:10:45 -0700 (Tue, 05 May 2009) | 1 line
added general-purpose property defaulting mechanism, and added default tool installer for JDK
........
r17765 | jglick | 2009-05-05 12:35:56 -0700 (Tue, 05 May 2009) | 1 line
capitalize("") -> ""
........
r17766 | jglick | 2009-05-05 12:49:52 -0700 (Tue, 05 May 2009) | 1 line
Missing @since.
........
r17767 | jglick | 2009-05-05 13:01:41 -0700 (Tue, 05 May 2009) | 1 line
Unchecked warning.
........
r17768 | jglick | 2009-05-05 13:19:49 -0700 (Tue, 05 May 2009) | 2 lines
Two unsuccessful attempts at form validation.
........
r17770 | jglick | 2009-05-05 13:48:37 -0700 (Tue, 05 May 2009) | 1 line
Better class names.
........
r17771 | kohsuke | 2009-05-05 14:12:21 -0700 (Tue, 05 May 2009) | 5 lines
brought the form validation check back. The trick is to use the 'value' parameter.
In the end we'd expect this check to go away anyway, as we change input field to drop-down list, but in the mean time, this is why it didn't work.
Maybe we probably need more static code checkers? Like FindBugs rules?
........
r17901 | kohsuke | 2009-05-09 19:15:40 -0700 (Sat, 09 May 2009) | 1 line
having two toolHome is odd.
........
r17906 | kohsuke | 2009-05-10 11:09:13 -0700 (Sun, 10 May 2009) | 1 line
adding the generalization of UpdateCenter, but for compatibility reasons, we are leaving UpdateCenter as-is.
........
r17911 | kohsuke | 2009-05-10 17:02:53 -0700 (Sun, 10 May 2009) | 1 line
integrated json-lib with a bit of bug fix
........
r17912 | kohsuke | 2009-05-10 17:13:05 -0700 (Sun, 10 May 2009) | 1 line
JDK list is now fetched from hudson.dev.java.net
........
r17958 | kohsuke | 2009-05-11 13:44:25 -0700 (Mon, 11 May 2009) | 48 lines
Handle AbortException better to avoid error like this:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to delete directory: C:\files\hudson\workspace\hudson\hudson\main\remoting\target. Reason: Unable to delete file C:\files\hudson\workspace\hudson\hudson\main\remoting\target\remoting-1.304-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Sun May 10 18:15:33 PDT 2009
[INFO] Final Memory: 25M/48M
[INFO] ------------------------------------------------------------------------
Recording fingerprints
Archiving artifacts
Recording test results
ERROR: Failed to archive JUnit reports
hudson.util.IOException2: remote file operation failed
at hudson.FilePath.act(FilePath.java:596)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:82)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:372)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:360)
at hudson.model.Build$RunnerImpl.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:345)
at hudson.model.Run.run(Run.java:943)
at hudson.model.Build.run(Build.java:112)
at hudson.model.ResourceController.execute(ResourceController.java:93)
at hudson.model.Executor.run(Executor.java:119)
Caused by: hudson.AbortException: Test reports were found but none of them are new. Did tests run?
For example, \files\hudson\workspace\hudson\hudson\main\core\target\surefire-reports\TEST-hudson.BulkChangeTest.xml is 2 days 23 hr old
at hudson.tasks.junit.TestResult.parse(TestResult.java:134)
at hudson.tasks.junit.TestResult.<init>(TestResult.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:82)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1583)
at hudson.remoting.UserRequest.perform(UserRequest.java:92)
at hudson.remoting.UserRequest.perform(UserRequest.java:46)
at hudson.remoting.Request$2.run(Request.java:236)
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)
........
r17961 | kohsuke | 2009-05-11 15:16:39 -0700 (Mon, 11 May 2009) | 1 line
adding Windows JDK silent installation
........
r17962 | kohsuke | 2009-05-11 16:08:13 -0700 (Mon, 11 May 2009) | 1 line
Fixing JDK offline installatino for Windows
........
r17970 | kohsuke | 2009-05-11 19:37:59 -0700 (Mon, 11 May 2009) | 1 line
Fixing a problem that prevents the usage of this tag in <repeatable> block, which reinserts the same fragment over and over. So statically assigning IDs won't work
........
r17971 | kohsuke | 2009-05-11 22:17:09 -0700 (Mon, 11 May 2009) | 1 line
continuing to remove static ID generation, which breaks the tag when used inside <repetable> tag.
........
r17972 | kohsuke | 2009-05-11 22:19:11 -0700 (Mon, 11 May 2009) | 1 line
I don't know when this started, but even in the hudson-dev:run mode, the versionis no longer '?', so we need a different way to force reload
........
r17973 | kohsuke | 2009-05-11 22:26:34 -0700 (Mon, 11 May 2009) | 1 line
adjusted the text a bit since multiple "add" and "delete"s were rather confusing
........
r17974 | kohsuke | 2009-05-11 22:31:58 -0700 (Mon, 11 May 2009) | 1 line
added help screen
........
r17975 | kohsuke | 2009-05-11 22:41:39 -0700 (Mon, 11 May 2009) | 1 line
form validation now works against the checkbox, too
........
r17976 | kohsuke | 2009-05-11 22:43:00 -0700 (Mon, 11 May 2009) | 1 line
with auto installation, we expect users to specify a directory that doesn't exist yet, so don't report it as an error
........
r17977 | kohsuke | 2009-05-11 22:43:24 -0700 (Mon, 11 May 2009) | 1 line
improving the text
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17985 71c3de6d-444a-0410-be80-ed276b4c234a
2009-05-12 21:59:10 +08:00
|
|
|
/**
|
|
|
|
* Converts "abc" to "Abc".
|
|
|
|
*/
|
|
|
|
public static String capitalize(String s) {
|
|
|
|
if(s==null || s.length()==0) return s;
|
|
|
|
return Character.toUpperCase(s.charAt(0))+s.substring(1);
|
|
|
|
}
|
|
|
|
|
2007-08-05 22:48:26 +08:00
|
|
|
public static String getVersion() {
|
2011-05-29 01:11:48 +08:00
|
|
|
return Jenkins.VERSION;
|
2007-08-05 22:48:26 +08:00
|
|
|
}
|
|
|
|
|
2007-08-06 00:18:19 +08:00
|
|
|
/**
|
|
|
|
* Resoruce path prefix.
|
|
|
|
*/
|
|
|
|
public static String getResourcePath() {
|
2011-05-29 01:11:48 +08:00
|
|
|
return Jenkins.RESOURCE_PATH;
|
2007-08-06 00:18:19 +08:00
|
|
|
}
|
2007-09-01 22:33:10 +08:00
|
|
|
|
2007-12-25 06:47:19 +08:00
|
|
|
public static String getViewResource(Object it, String path) {
|
|
|
|
Class clazz = it.getClass();
|
|
|
|
|
|
|
|
if(it instanceof Class)
|
|
|
|
clazz = (Class)it;
|
|
|
|
if(it instanceof Descriptor)
|
|
|
|
clazz = ((Descriptor)it).clazz;
|
|
|
|
|
2008-04-09 12:35:31 +08:00
|
|
|
StringBuilder buf = new StringBuilder(Stapler.getCurrentRequest().getContextPath());
|
2011-05-29 01:11:48 +08:00
|
|
|
buf.append(Jenkins.VIEW_RESOURCE_PATH).append('/');
|
2007-12-25 06:47:19 +08:00
|
|
|
buf.append(clazz.getName().replace('.','/').replace('$','/'));
|
|
|
|
buf.append('/').append(path);
|
|
|
|
|
|
|
|
return buf.toString();
|
|
|
|
}
|
|
|
|
|
2009-01-11 04:01:56 +08:00
|
|
|
public static boolean hasView(Object it, String path) throws IOException {
|
2008-07-05 05:57:22 +08:00
|
|
|
if(it==null) return false;
|
2009-01-11 04:01:56 +08:00
|
|
|
return Stapler.getCurrentRequest().getView(it,path)!=null;
|
2008-07-05 05:57:22 +08:00
|
|
|
}
|
|
|
|
|
2007-09-01 22:33:10 +08:00
|
|
|
/**
|
|
|
|
* Can be used to check a checkbox by default.
|
|
|
|
* Used from views like {@code h.defaultToTrue(scm.useUpdate)}.
|
|
|
|
* The expression will evaluate to true if scm is null.
|
|
|
|
*/
|
|
|
|
public static boolean defaultToTrue(Boolean b) {
|
|
|
|
if(b==null) return true;
|
|
|
|
return b;
|
|
|
|
}
|
2007-09-23 00:39:31 +08:00
|
|
|
|
2007-10-28 12:11:11 +08:00
|
|
|
/**
|
|
|
|
* If the value exists, return that value. Otherwise return the default value.
|
|
|
|
* <p>
|
2009-03-24 02:26:49 +08:00
|
|
|
* Starting 1.294, JEXL supports the elvis operator "x?:y" that supercedes this.
|
2007-10-28 12:11:11 +08:00
|
|
|
*
|
|
|
|
* @since 1.150
|
|
|
|
*/
|
2008-04-16 13:32:35 +08:00
|
|
|
public static <T> T defaulted(T value, T defaultValue) {
|
2007-10-28 12:11:11 +08:00
|
|
|
return value!=null ? value : defaultValue;
|
|
|
|
}
|
|
|
|
|
2007-09-23 00:39:31 +08:00
|
|
|
public static String printThrowable(Throwable t) {
|
|
|
|
StringWriter sw = new StringWriter();
|
|
|
|
t.printStackTrace(new PrintWriter(sw));
|
|
|
|
return sw.toString();
|
|
|
|
}
|
2007-09-27 12:16:44 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Counts the number of rows needed for textarea to fit the content.
|
|
|
|
* Minimum 5 rows.
|
|
|
|
*/
|
|
|
|
public static int determineRows(String s) {
|
|
|
|
if(s==null) return 5;
|
|
|
|
return Math.max(5,LINE_END.split(s).length);
|
|
|
|
}
|
|
|
|
|
2007-11-13 10:36:15 +08:00
|
|
|
/**
|
|
|
|
* Converts the Hudson build status to CruiseControl build status,
|
|
|
|
* which is either Success, Failure, Exception, or Unknown.
|
|
|
|
*/
|
|
|
|
public static String toCCStatus(Item i) {
|
|
|
|
if (i instanceof Job) {
|
|
|
|
Job j = (Job) i;
|
|
|
|
switch (j.getIconColor().noAnime()) {
|
|
|
|
case ABORTED:
|
|
|
|
case RED:
|
|
|
|
case YELLOW:
|
|
|
|
return "Failure";
|
|
|
|
case BLUE:
|
|
|
|
return "Success";
|
|
|
|
case DISABLED:
|
|
|
|
case GREY:
|
|
|
|
return "Unknown";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return "Unknown";
|
|
|
|
}
|
|
|
|
|
2007-09-27 12:16:44 +08:00
|
|
|
private static final Pattern LINE_END = Pattern.compile("\r?\n");
|
2007-12-17 14:29:41 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if the current user is anonymous.
|
|
|
|
*/
|
|
|
|
public static boolean isAnonymous() {
|
2011-05-29 01:11:48 +08:00
|
|
|
return Jenkins.getAuthentication() instanceof AnonymousAuthenticationToken;
|
2007-12-17 14:29:41 +08:00
|
|
|
}
|
2007-12-25 01:06:32 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* When called from within JEXL expression evaluation,
|
|
|
|
* this method returns the current {@link JellyContext} used
|
|
|
|
* to evaluate the script.
|
|
|
|
*
|
|
|
|
* @since 1.164
|
|
|
|
*/
|
|
|
|
public static JellyContext getCurrentJellyContext() {
|
|
|
|
JellyContext context = ExpressionFactory2.CURRENT_CONTEXT.get();
|
|
|
|
assert context!=null;
|
|
|
|
return context;
|
|
|
|
}
|
2008-03-05 10:08:38 +08:00
|
|
|
|
2008-12-23 03:42:11 +08:00
|
|
|
/**
|
|
|
|
* Evaluate a Jelly script and return output as a String.
|
|
|
|
*
|
|
|
|
* @since 1.267
|
|
|
|
*/
|
|
|
|
public static String runScript(Script script) throws JellyTagException {
|
|
|
|
StringWriter out = new StringWriter();
|
|
|
|
script.run(getCurrentJellyContext(), XMLOutput.createXMLOutput(out));
|
|
|
|
return out.toString();
|
|
|
|
}
|
|
|
|
|
2008-03-05 10:08:38 +08:00
|
|
|
/**
|
|
|
|
* Returns a sub-list if the given list is bigger than the specified 'maxSize'
|
|
|
|
*/
|
|
|
|
public static <T> List<T> subList(List<T> base, int maxSize) {
|
|
|
|
if(maxSize<base.size())
|
|
|
|
return base.subList(0,maxSize);
|
|
|
|
else
|
|
|
|
return base;
|
|
|
|
}
|
2008-03-21 10:00:54 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Computes the hyperlink to actions, to handle the situation when the {@link Action#getUrlName()}
|
|
|
|
* returns absolute URL.
|
|
|
|
*/
|
|
|
|
public static String getActionUrl(String itUrl,Action action) {
|
|
|
|
String urlName = action.getUrlName();
|
2008-10-31 02:13:30 +08:00
|
|
|
if(urlName==null) return null; // to avoid NPE and fail to render the whole page
|
2008-03-21 10:00:54 +08:00
|
|
|
if(SCHEME.matcher(urlName).matches())
|
|
|
|
return urlName; // absolute URL
|
2009-04-10 15:17:30 +08:00
|
|
|
if(urlName.startsWith("/"))
|
2009-11-01 08:00:32 +08:00
|
|
|
return Stapler.getCurrentRequest().getContextPath()+urlName;
|
2008-03-21 10:00:54 +08:00
|
|
|
else
|
|
|
|
// relative URL name
|
2009-11-01 08:00:32 +08:00
|
|
|
return Stapler.getCurrentRequest().getContextPath()+'/'+itUrl+urlName;
|
2008-03-21 10:00:54 +08:00
|
|
|
}
|
|
|
|
|
2008-05-31 07:25:15 +08:00
|
|
|
/**
|
|
|
|
* Escapes the character unsafe for e-mail address.
|
|
|
|
* See http://en.wikipedia.org/wiki/E-mail_address for the details,
|
|
|
|
* but here the vocabulary is even more restricted.
|
|
|
|
*/
|
|
|
|
public static String toEmailSafeString(String projectName) {
|
|
|
|
// TODO: escape non-ASCII characters
|
|
|
|
StringBuilder buf = new StringBuilder(projectName.length());
|
|
|
|
for( int i=0; i<projectName.length(); i++ ) {
|
|
|
|
char ch = projectName.charAt(i);
|
|
|
|
if(('a'<=ch && ch<='z')
|
|
|
|
|| ('z'<=ch && ch<='Z')
|
|
|
|
|| ('0'<=ch && ch<='9')
|
|
|
|
|| "-_.".indexOf(ch)>=0)
|
|
|
|
buf.append(ch);
|
|
|
|
else
|
|
|
|
buf.append('_'); // escape
|
|
|
|
}
|
|
|
|
return projectName;
|
|
|
|
}
|
|
|
|
|
2008-06-07 09:05:52 +08:00
|
|
|
public String getSystemProperty(String key) {
|
|
|
|
return System.getProperty(key);
|
|
|
|
}
|
|
|
|
|
2008-07-02 02:01:38 +08:00
|
|
|
/**
|
|
|
|
* Obtains the host name of the Hudson server that clients can use to talk back to.
|
|
|
|
* <p>
|
|
|
|
* This is primarily used in <tt>slave-agent.jnlp.jelly</tt> to specify the destination
|
|
|
|
* that the slaves talk to.
|
|
|
|
*/
|
|
|
|
public String getServerName() {
|
2008-07-02 02:02:00 +08:00
|
|
|
// Try to infer this from the configured root URL.
|
|
|
|
// This makes it work correctly when Hudson runs behind a reverse proxy.
|
2011-05-29 01:11:48 +08:00
|
|
|
String url = Jenkins.getInstance().getRootUrl();
|
2008-07-02 02:01:38 +08:00
|
|
|
try {
|
|
|
|
if(url!=null) {
|
|
|
|
String host = new URL(url).getHost();
|
|
|
|
if(host!=null)
|
|
|
|
return host;
|
|
|
|
}
|
|
|
|
} catch (MalformedURLException e) {
|
|
|
|
// fall back to HTTP request
|
|
|
|
}
|
|
|
|
return Stapler.getCurrentRequest().getServerName();
|
|
|
|
}
|
|
|
|
|
2008-07-26 07:45:54 +08:00
|
|
|
/**
|
|
|
|
* Determines the form validation check URL. See textbox.jelly
|
|
|
|
*/
|
|
|
|
public String getCheckUrl(String userDefined, Object descriptor, String field) {
|
|
|
|
if(userDefined!=null || field==null) return userDefined;
|
|
|
|
if (descriptor instanceof Descriptor) {
|
|
|
|
Descriptor d = (Descriptor) descriptor;
|
|
|
|
return d.getCheckUrl(field);
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2008-12-23 13:20:42 +08:00
|
|
|
/**
|
|
|
|
* If the given href link is matching the current page, return true.
|
|
|
|
*
|
|
|
|
* Used in <tt>task.jelly</tt> to decide if the page should be highlighted.
|
|
|
|
*/
|
|
|
|
public boolean hyperlinkMatchesCurrentPage(String href) throws UnsupportedEncodingException {
|
|
|
|
String url = Stapler.getCurrentRequest().getRequestURL().toString();
|
2010-06-04 00:26:58 +08:00
|
|
|
if (href == null || href.length() <= 1) return ".".equals(href) && url.endsWith("/");
|
2008-12-23 13:20:42 +08:00
|
|
|
url = URLDecoder.decode(url,"UTF-8");
|
|
|
|
href = URLDecoder.decode(href,"UTF-8");
|
2009-11-01 08:00:32 +08:00
|
|
|
if (url.endsWith("/")) url = url.substring(0, url.length() - 1);
|
|
|
|
if (href.endsWith("/")) href = href.substring(0, href.length() - 1);
|
2008-12-23 13:20:42 +08:00
|
|
|
|
2009-11-01 08:39:10 +08:00
|
|
|
return url.endsWith(href);
|
2008-12-23 13:20:42 +08:00
|
|
|
}
|
|
|
|
|
2009-01-28 10:04:44 +08:00
|
|
|
public <T> List<T> singletonList(T t) {
|
|
|
|
return Collections.singletonList(t);
|
|
|
|
}
|
|
|
|
|
2008-08-05 08:22:58 +08:00
|
|
|
/**
|
|
|
|
* Gets all the {@link PageDecorator}s.
|
|
|
|
*/
|
|
|
|
public static List<PageDecorator> getPageDecorators() {
|
Merged revisions 17324-17325,17428,17430,17473-17475,17481-17482,17555-17563,17571,17593-17595,17619-17620,17637-17644,17656-17657,17663-17665,17667-17670,17730,17753,17755-17758,17763-17768,17770-17771,17901,17906,17911-17912,17958,17961-17962,17970-17977 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/tool-autoinstallation
........
r17324 | jglick | 2009-04-20 18:24:32 -0700 (Mon, 20 Apr 2009) | 2 lines
Defensive cloning and Javadoc corrections.
(Though it seems no one is using the default impls of these methods yet anyway.)
........
r17325 | jglick | 2009-04-20 18:29:06 -0700 (Mon, 20 Apr 2009) | 1 line
Deprecation of delegate method is intentional.
........
r17428 | jglick | 2009-04-23 08:07:14 -0700 (Thu, 23 Apr 2009) | 1 line
Noting ToolLocationTranslator more prominently.
........
r17430 | jglick | 2009-04-23 09:16:40 -0700 (Thu, 23 Apr 2009) | 1 line
Unused imports.
........
r17473 | jglick | 2009-04-23 19:21:11 -0700 (Thu, 23 Apr 2009) | 1 line
Allow Plugin.configure to see the StaplerRequest, needed for some kinds of calls.
........
r17474 | jglick | 2009-04-23 19:25:54 -0700 (Thu, 23 Apr 2009) | 3 lines
Initial sketch of plugin to manage tool installations across slaves.
(Should really be under ../plugins/ but that was not branched, so putting here for the moment.)
........
r17475 | jglick | 2009-04-23 20:29:36 -0700 (Thu, 23 Apr 2009) | 1 line
Typo in Javadoc.
........
r17481 | jglick | 2009-04-23 22:46:26 -0700 (Thu, 23 Apr 2009) | 1 line
Unzip of an unbuffered stream is painfully slow.
........
r17482 | jglick | 2009-04-23 22:48:01 -0700 (Thu, 23 Apr 2009) | 1 line
ZIP-based tool installer now functional.
........
r17555 | jglick | 2009-04-27 17:50:38 -0700 (Mon, 27 Apr 2009) | 1 line
Build against newest trunk.
........
r17556 | jglick | 2009-04-27 18:38:28 -0700 (Mon, 27 Apr 2009) | 1 line
Adding help.
........
r17557 | jglick | 2009-04-27 18:57:46 -0700 (Mon, 27 Apr 2009) | 1 line
Moving toolName & label config GUI into generic files.
........
r17558 | jglick | 2009-04-27 19:37:30 -0700 (Mon, 27 Apr 2009) | 1 line
Typo.
........
r17559 | jglick | 2009-04-27 20:07:47 -0700 (Mon, 27 Apr 2009) | 1 line
Second tool installer type based on a freeform command.
........
r17560 | jglick | 2009-04-27 20:24:36 -0700 (Mon, 27 Apr 2009) | 1 line
installIfNecessaryFrom will now just return false in case the target dir exists but the URL cannot be opened.
........
r17561 | jglick | 2009-04-27 20:25:22 -0700 (Mon, 27 Apr 2009) | 2 lines
chmod only if something was actually installed.
Use a+x, not o+x.
........
r17562 | jglick | 2009-04-27 20:26:46 -0700 (Mon, 27 Apr 2009) | 1 line
Comment only.
........
r17563 | jglick | 2009-04-27 20:41:12 -0700 (Mon, 27 Apr 2009) | 1 line
I18N.
........
r17571 | jglick | 2009-04-28 08:15:31 -0700 (Tue, 28 Apr 2009) | 2 lines
Wiki link.
........
r17593 | jglick | 2009-04-28 15:38:33 -0700 (Tue, 28 Apr 2009) | 1 line
Turn off echo mode, it's just noise.
........
r17594 | jglick | 2009-04-28 15:39:29 -0700 (Tue, 28 Apr 2009) | 2 lines
Synchronizing access to installers for a given node/tool combo.
Sending log messages to Hudson log in real time.
........
r17595 | jglick | 2009-04-28 15:46:29 -0700 (Tue, 28 Apr 2009) | 1 line
Copyrights.
........
r17619 | jglick | 2009-04-29 06:25:23 -0700 (Wed, 29 Apr 2009) | 1 line
Improved Javadoc.
........
r17620 | jglick | 2009-04-29 06:51:11 -0700 (Wed, 29 Apr 2009) | 1 line
Demonstraing how to use DLJ to mechanically install official JDK releases on supported operating systems.
........
r17637 | kohsuke | 2009-04-30 16:15:24 -0700 (Thu, 30 Apr 2009) | 1 line
fixed what appears to be a C&P mistake
........
r17638 | kohsuke | 2009-04-30 16:16:21 -0700 (Thu, 30 Apr 2009) | 1 line
show YUI logger if YUI debugging mode is set.
........
r17639 | kohsuke | 2009-04-30 16:52:28 -0700 (Thu, 30 Apr 2009) | 7 lines
Fixed a UI script problem when <hetero-list> nests inside <repeatable>.
The cause of the problem was that the behavior for inner <hetero-list> kicks in first, altering HTML (by removing "prototypes"), before behavior for outer <repetable> kicks in and removes the master copy from DOM tree.
So <repeatable> ends up computing a master copy after some elements are removed, and hence when we try to reinsert them later by clicking "Add", it'll get incorrect copy, and re-execution of the <hetero-list> behavior bombs out.
I fixed this by skipping those HTML-altering behaviors if they show up in the part of DOM tree that's supposed to be snapshotted and removed.
........
r17640 | kohsuke | 2009-04-30 16:57:58 -0700 (Thu, 30 Apr 2009) | 7 lines
Added ToolProperty to ToolInstallation (which acts like NodeProperty to Node --- basically decorates the base object with additional properties.)
The original motivation is to implement ToolInstaller this way, if Jesse is OK. But decorating tools seem to have some other interesting use, such as a plugin for configuring $M2_HOME/conf/settings.xml, or a plugin to insert unlimited cryptography extension to JDK, or a plugin to add a few more jars into $ANT_HOME/lib.
For this to work, ToolInstallations that want properties needs to be modified to use a new constructor. For a starter, I modified the JDK class to do this.
I also took the opportunity to modernize JDK/config.jelly.
........
r17641 | kohsuke | 2009-04-30 17:02:04 -0700 (Thu, 30 Apr 2009) | 1 line
this appears to be a left-over from early days when we didn't have a means to do form validation
........
r17642 | kohsuke | 2009-04-30 17:02:35 -0700 (Thu, 30 Apr 2009) | 1 line
we don't need no.such.JDK but we need name. rebranching
........
r17643 | kohsuke | 2009-04-30 17:03:22 -0700 (Thu, 30 Apr 2009) | 1 line
rebranched from Hudson's configure.properties
........
r17644 | kohsuke | 2009-04-30 17:05:31 -0700 (Thu, 30 Apr 2009) | 1 line
removed unnecessary translations
........
r17656 | kohsuke | 2009-05-01 11:27:36 -0700 (Fri, 01 May 2009) | 1 line
Less hack for improved type safety. Asking people to write more code is not necessarily bad as long as what they need to do is obvious to them.
........
r17657 | kohsuke | 2009-05-01 12:07:20 -0700 (Fri, 01 May 2009) | 5 lines
The toolautoinst part of the change that corresponds to rev.17640.
ToolInstallers are now hooked under ToolInstallation through InstallSourceProperty as a ToolProperty.
This allows the relevant UIs to be shown in one place. Still pending Jesse's feedback. Making it a single commit to simplify a revert if necessary
........
r17663 | kohsuke | 2009-05-01 13:23:51 -0700 (Fri, 01 May 2009) | 1 line
doc improvement
........
r17664 | kohsuke | 2009-05-01 13:24:10 -0700 (Fri, 01 May 2009) | 1 line
needs this to allow Stapler to databind hetero-list automatically
........
r17665 | jglick | 2009-05-01 13:31:27 -0700 (Fri, 01 May 2009) | 1 line
Warnings.
........
r17667 | kohsuke | 2009-05-01 14:20:53 -0700 (Fri, 01 May 2009) | 1 line
added a method to do chmod
........
r17668 | kohsuke | 2009-05-01 14:30:35 -0700 (Fri, 01 May 2009) | 1 line
prefer JDK6 version to avoid unnecessary JNA loading
........
r17669 | kohsuke | 2009-05-01 14:33:09 -0700 (Fri, 01 May 2009) | 1 line
no, I must have confused this.
........
r17670 | kohsuke | 2009-05-01 15:57:11 -0700 (Fri, 01 May 2009) | 2 lines
- Automated JDK installer and its test.
- Minor update to the signature of ToolInstaller for supplying the expected default location.
........
r17730 | kohsuke | 2009-05-04 11:27:34 -0700 (Mon, 04 May 2009) | 1 line
avoid NPE as reported in HUDSON-3608
........
r17753 | jglick | 2009-05-04 19:34:08 -0700 (Mon, 04 May 2009) | 2 lines
Moved toolautoinst functionality into core.
........
r17755 | jglick | 2009-05-04 20:28:34 -0700 (Mon, 04 May 2009) | 8 lines
Added TaskListener parameter and IOException and InterruptedException to several methods:
Run.getEnvironment
NodeSpecific.forNode
ToolLocationTranslator.getToolHome
ToolLocationNodeProperty.getToolHome
ToolInstallation.translateFor
ProcessCache.Factory.getMavenInstallation
ProcessCache.Factory.getJava
........
r17756 | jglick | 2009-05-04 20:36:56 -0700 (Mon, 04 May 2009) | 1 line
expectedLocation was never strictly necessary, and will soon no longer be used even by JDKInstaller.
........
r17757 | jglick | 2009-05-04 20:40:41 -0700 (Mon, 04 May 2009) | 1 line
Not sure yet what @since should be.
........
r17758 | jglick | 2009-05-04 20:41:51 -0700 (Mon, 04 May 2009) | 1 line
getDefaultInstallers method added. Not yet in use.
........
r17763 | kohsuke | 2009-05-05 10:50:36 -0700 (Tue, 05 May 2009) | 1 line
deprecated redundant getJavaHome method
........
r17764 | kohsuke | 2009-05-05 12:10:45 -0700 (Tue, 05 May 2009) | 1 line
added general-purpose property defaulting mechanism, and added default tool installer for JDK
........
r17765 | jglick | 2009-05-05 12:35:56 -0700 (Tue, 05 May 2009) | 1 line
capitalize("") -> ""
........
r17766 | jglick | 2009-05-05 12:49:52 -0700 (Tue, 05 May 2009) | 1 line
Missing @since.
........
r17767 | jglick | 2009-05-05 13:01:41 -0700 (Tue, 05 May 2009) | 1 line
Unchecked warning.
........
r17768 | jglick | 2009-05-05 13:19:49 -0700 (Tue, 05 May 2009) | 2 lines
Two unsuccessful attempts at form validation.
........
r17770 | jglick | 2009-05-05 13:48:37 -0700 (Tue, 05 May 2009) | 1 line
Better class names.
........
r17771 | kohsuke | 2009-05-05 14:12:21 -0700 (Tue, 05 May 2009) | 5 lines
brought the form validation check back. The trick is to use the 'value' parameter.
In the end we'd expect this check to go away anyway, as we change input field to drop-down list, but in the mean time, this is why it didn't work.
Maybe we probably need more static code checkers? Like FindBugs rules?
........
r17901 | kohsuke | 2009-05-09 19:15:40 -0700 (Sat, 09 May 2009) | 1 line
having two toolHome is odd.
........
r17906 | kohsuke | 2009-05-10 11:09:13 -0700 (Sun, 10 May 2009) | 1 line
adding the generalization of UpdateCenter, but for compatibility reasons, we are leaving UpdateCenter as-is.
........
r17911 | kohsuke | 2009-05-10 17:02:53 -0700 (Sun, 10 May 2009) | 1 line
integrated json-lib with a bit of bug fix
........
r17912 | kohsuke | 2009-05-10 17:13:05 -0700 (Sun, 10 May 2009) | 1 line
JDK list is now fetched from hudson.dev.java.net
........
r17958 | kohsuke | 2009-05-11 13:44:25 -0700 (Mon, 11 May 2009) | 48 lines
Handle AbortException better to avoid error like this:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to delete directory: C:\files\hudson\workspace\hudson\hudson\main\remoting\target. Reason: Unable to delete file C:\files\hudson\workspace\hudson\hudson\main\remoting\target\remoting-1.304-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Sun May 10 18:15:33 PDT 2009
[INFO] Final Memory: 25M/48M
[INFO] ------------------------------------------------------------------------
Recording fingerprints
Archiving artifacts
Recording test results
ERROR: Failed to archive JUnit reports
hudson.util.IOException2: remote file operation failed
at hudson.FilePath.act(FilePath.java:596)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:82)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:372)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:360)
at hudson.model.Build$RunnerImpl.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:345)
at hudson.model.Run.run(Run.java:943)
at hudson.model.Build.run(Build.java:112)
at hudson.model.ResourceController.execute(ResourceController.java:93)
at hudson.model.Executor.run(Executor.java:119)
Caused by: hudson.AbortException: Test reports were found but none of them are new. Did tests run?
For example, \files\hudson\workspace\hudson\hudson\main\core\target\surefire-reports\TEST-hudson.BulkChangeTest.xml is 2 days 23 hr old
at hudson.tasks.junit.TestResult.parse(TestResult.java:134)
at hudson.tasks.junit.TestResult.<init>(TestResult.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:95)
at hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:82)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1583)
at hudson.remoting.UserRequest.perform(UserRequest.java:92)
at hudson.remoting.UserRequest.perform(UserRequest.java:46)
at hudson.remoting.Request$2.run(Request.java:236)
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)
........
r17961 | kohsuke | 2009-05-11 15:16:39 -0700 (Mon, 11 May 2009) | 1 line
adding Windows JDK silent installation
........
r17962 | kohsuke | 2009-05-11 16:08:13 -0700 (Mon, 11 May 2009) | 1 line
Fixing JDK offline installatino for Windows
........
r17970 | kohsuke | 2009-05-11 19:37:59 -0700 (Mon, 11 May 2009) | 1 line
Fixing a problem that prevents the usage of this tag in <repeatable> block, which reinserts the same fragment over and over. So statically assigning IDs won't work
........
r17971 | kohsuke | 2009-05-11 22:17:09 -0700 (Mon, 11 May 2009) | 1 line
continuing to remove static ID generation, which breaks the tag when used inside <repetable> tag.
........
r17972 | kohsuke | 2009-05-11 22:19:11 -0700 (Mon, 11 May 2009) | 1 line
I don't know when this started, but even in the hudson-dev:run mode, the versionis no longer '?', so we need a different way to force reload
........
r17973 | kohsuke | 2009-05-11 22:26:34 -0700 (Mon, 11 May 2009) | 1 line
adjusted the text a bit since multiple "add" and "delete"s were rather confusing
........
r17974 | kohsuke | 2009-05-11 22:31:58 -0700 (Mon, 11 May 2009) | 1 line
added help screen
........
r17975 | kohsuke | 2009-05-11 22:41:39 -0700 (Mon, 11 May 2009) | 1 line
form validation now works against the checkbox, too
........
r17976 | kohsuke | 2009-05-11 22:43:00 -0700 (Mon, 11 May 2009) | 1 line
with auto installation, we expect users to specify a directory that doesn't exist yet, so don't report it as an error
........
r17977 | kohsuke | 2009-05-11 22:43:24 -0700 (Mon, 11 May 2009) | 1 line
improving the text
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17985 71c3de6d-444a-0410-be80-ed276b4c234a
2009-05-12 21:59:10 +08:00
|
|
|
// this method may be called to render start up errors, at which point Hudson doesn't exist yet. see HUDSON-3608
|
2011-05-29 01:11:48 +08:00
|
|
|
if(Jenkins.getInstance()==null) return Collections.emptyList();
|
2009-02-25 04:20:14 +08:00
|
|
|
return PageDecorator.all();
|
2008-08-05 08:22:58 +08:00
|
|
|
}
|
Merged revisions 11754-11755,11763-11766,11770,11773-11777,11791-11797,11828-11829,11831-11839,11841-11843,11850,11854,11994,12774,12778-12793,12820-12822,12831-12841,12854-12855,12860-12882,12896-12905,12914-12920,12938-12941,12950,13045-13046,13048,13063-13064,13066,13072-13076,13111,13122-13147,13150,13153-13158,13487-13488,13851-13852,13854-13856,13859,13866-13867,13869,13872-13876,13878-13879,13883-13885,13887-13890,13896-13919 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/multiple-computer-per-node
................
r11754 | kohsuke | 2008-08-25 17:59:14 -0700 (Mon, 25 Aug 2008) | 3 lines
Adding EphemeralNode for non-persisted dynamically-allocated expandable/shrinkable slave pool.
Tweaked the serialization of Hudson.slaves accordingly.
................
r11755 | kohsuke | 2008-08-25 18:10:42 -0700 (Mon, 25 Aug 2008) | 1 line
making a small improvements
................
r11763 | kohsuke | 2008-08-26 13:57:25 -0700 (Tue, 26 Aug 2008) | 1 line
adding more convenience methods
................
r11764 | kohsuke | 2008-08-26 14:24:20 -0700 (Tue, 26 Aug 2008) | 1 line
ported mask capability from the TFS plugin to the core.
................
r11765 | kohsuke | 2008-08-26 14:26:25 -0700 (Tue, 26 Aug 2008) | 1 line
making it non-final to allow for subclassing
................
r11766 | kohsuke | 2008-08-26 14:35:20 -0700 (Tue, 26 Aug 2008) | 1 line
test case for NodeList
................
r11770 | kohsuke | 2008-08-26 15:15:21 -0700 (Tue, 26 Aug 2008) | 3 lines
Wrote a simple tool that monitors a file system change (in a poor way) and triggers a build.
................
r11773 | kohsuke | 2008-08-26 17:20:30 -0700 (Tue, 26 Aug 2008) | 1 line
made more structured
................
r11774 | kohsuke | 2008-08-26 17:47:41 -0700 (Tue, 26 Aug 2008) | 1 line
indentation fix
................
r11775 | kohsuke | 2008-08-26 17:48:22 -0700 (Tue, 26 Aug 2008) | 1 line
remove the use of a deprecated feature.
................
r11776 | kohsuke | 2008-08-26 17:51:54 -0700 (Tue, 26 Aug 2008) | 1 line
renamed to 'ALL' to be consistent with recent use of DescriptorList
................
r11777 | kohsuke | 2008-08-26 18:04:17 -0700 (Tue, 26 Aug 2008) | 1 line
adding NodeFactory list and its configuration mechanism
................
r11791 | kohsuke | 2008-08-27 09:43:38 -0700 (Wed, 27 Aug 2008) | 1 line
picked up the latest jelly with Iterable support in <j:forEach>
................
r11792 | kohsuke | 2008-08-27 09:44:08 -0700 (Wed, 27 Aug 2008) | 1 line
Iterable support added in commons-jelly 1.1-hudson-20080826
................
r11793 | kohsuke | 2008-08-27 10:15:14 -0700 (Wed, 27 Aug 2008) | 2 lines
- added name to NodeFactory for binding NodeFactory to URL tree.
- NodeFactory should be access controlled
................
r11794 | kohsuke | 2008-08-27 10:41:11 -0700 (Wed, 27 Aug 2008) | 1 line
added a method to add one Node at a time
................
r11795 | kohsuke | 2008-08-27 10:41:37 -0700 (Wed, 27 Aug 2008) | 1 line
added permission constatnt
................
r11796 | kohsuke | 2008-08-27 10:42:13 -0700 (Wed, 27 Aug 2008) | 1 line
allowing the launch method to throw an exception.
................
r11797 | kohsuke | 2008-08-27 10:44:13 -0700 (Wed, 27 Aug 2008) | 1 line
improving the handling
................
r11828 | kohsuke | 2008-08-29 11:07:16 -0700 (Fri, 29 Aug 2008) | 1 line
added executor config to the sidebar.
................
r11829 | kohsuke | 2008-08-29 11:16:11 -0700 (Fri, 29 Aug 2008) | 1 line
"it" should be assigned to NodeFactory
................
r11831 | kohsuke | 2008-08-29 11:44:41 -0700 (Fri, 29 Aug 2008) | 1 line
formatting changes
................
r11832 | kohsuke | 2008-08-29 11:59:21 -0700 (Fri, 29 Aug 2008) | 1 line
added a script to create a flashing image from any picture
................
r11833 | kohsuke | 2008-08-29 12:07:56 -0700 (Fri, 29 Aug 2008) | 1 line
doc improvement.
................
r11834 | kohsuke | 2008-08-29 13:37:59 -0700 (Fri, 29 Aug 2008) | 1 line
added new images to indicate that a slave is launching
................
r11835 | kohsuke | 2008-08-29 13:43:41 -0700 (Fri, 29 Aug 2008) | 1 line
indicate a launching slave accordingly.
................
r11836 | kohsuke | 2008-08-29 14:02:28 -0700 (Fri, 29 Aug 2008) | 1 line
added a method to remove a Node.
................
r11837 | kohsuke | 2008-08-29 14:02:38 -0700 (Fri, 29 Aug 2008) | 1 line
disconnect
................
r11838 | kohsuke | 2008-08-29 14:03:22 -0700 (Fri, 29 Aug 2008) | 1 line
formatting changes
................
r11839 | kohsuke | 2008-08-29 14:14:04 -0700 (Fri, 29 Aug 2008) | 1 line
allowing subclasses.
................
r11841 | kohsuke | 2008-08-29 14:28:29 -0700 (Fri, 29 Aug 2008) | 1 line
constructor should be the first in the definition.
................
r11842 | kohsuke | 2008-08-29 14:31:01 -0700 (Fri, 29 Aug 2008) | 1 line
doc improvement.
................
r11843 | kohsuke | 2008-08-29 14:32:48 -0700 (Fri, 29 Aug 2008) | 1 line
fixed a problem of using partially constructed object during launch(), because the setNode() method is called from the Computer constructor.
................
r11850 | kohsuke | 2008-08-29 14:50:36 -0700 (Fri, 29 Aug 2008) | 1 line
serialize NodeFactory first so that references to them from NodeList will become references in XML.
................
r11854 | kohsuke | 2008-08-29 14:56:56 -0700 (Fri, 29 Aug 2008) | 1 line
cleaning up a bit.
................
r11994 | kohsuke | 2008-09-03 14:42:11 -0700 (Wed, 03 Sep 2008) | 21 lines
Fixed ArrayIndexOutOfBoundsException during replace(), when the title contains a '$' literal.
The typical stack trace looks like:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 32
at hudson.MarkupText$SubText.start(MarkupText.java:95)
at hudson.MarkupText$SubText.group(MarkupText.java:131)
at hudson.MarkupText$SubText.replace(MarkupText.java:154)
at hudson.MarkupText$SubText.surroundWith(MarkupText.java:83)
at
hudson.plugins.jira.JiraChangeLogAnnotator.annotate(JiraChangeLogAnnotator.java:37)
at
hudson.scm.ChangeLogSet$Entry.getMsgAnnotated(ChangeLogSet.java:117)
... 148 more
Vijayan Jayaraman and I found this problem while we were looking at the server log of Hudson for OpenJFX.
Adding a unit test to verify this behavior, too.
................
r12774 | kohsuke | 2008-10-27 15:03:36 -0700 (Mon, 27 Oct 2008) | 3 lines
preparing for heterogenousness in Node, so that different Node can be configured with different UIs, much like how different Jobs can be configured.
Creating a slave works also like creating a new job.
................
r12778 | kohsuke | 2008-10-27 15:06:51 -0700 (Mon, 27 Oct 2008) | 1 line
We need to be able to create an emtpy Slave initially, so we have to do with the check in the form field validation.
................
r12779 | kohsuke | 2008-10-27 15:48:04 -0700 (Mon, 27 Oct 2008) | 1 line
making the new slave page a two-step process
................
r12780 | kohsuke | 2008-10-27 15:48:24 -0700 (Mon, 27 Oct 2008) | 1 line
fixed a compilation problem
................
r12781 | kohsuke | 2008-10-27 15:53:30 -0700 (Mon, 27 Oct 2008) | 1 line
bug fixes
................
r12782 | kohsuke | 2008-10-27 15:58:20 -0700 (Mon, 27 Oct 2008) | 1 line
bug fixes
................
r12783 | kohsuke | 2008-10-27 16:08:56 -0700 (Mon, 27 Oct 2008) | 1 line
making the configuration page work for slaves
................
r12784 | kohsuke | 2008-10-27 16:35:17 -0700 (Mon, 27 Oct 2008) | 1 line
added new-computer.svg
................
r12785 | kohsuke | 2008-10-27 16:37:26 -0700 (Mon, 27 Oct 2008) | 1 line
hooking up the config/create pages to the UI
................
r12786 | kohsuke | 2008-10-27 16:44:40 -0700 (Mon, 27 Oct 2008) | 1 line
fixed a copy method.
................
r12787 | kohsuke | 2008-10-27 16:47:33 -0700 (Mon, 27 Oct 2008) | 1 line
code was broken when a slave was renamed
................
r12788 | kohsuke | 2008-10-27 16:58:04 -0700 (Mon, 27 Oct 2008) | 1 line
moving out the commonality into a new tag
................
r12789 | kohsuke | 2008-10-27 17:01:21 -0700 (Mon, 27 Oct 2008) | 1 line
consistent term usage
................
r12790 | kohsuke | 2008-10-27 17:03:19 -0700 (Mon, 27 Oct 2008) | 1 line
retiring the configureExecutors. Slave configuration is now moved to individual slave page
................
r12791 | kohsuke | 2008-10-27 17:10:32 -0700 (Mon, 27 Oct 2008) | 1 line
retired configureExecutors.jelly and completed moved its contents to somewhere else
................
r12792 | kohsuke | 2008-10-27 17:21:53 -0700 (Mon, 27 Oct 2008) | 1 line
bug fix. request handling of "/descriptor/FQCN/..." was broken.
................
r12793 | kohsuke | 2008-10-27 17:27:08 -0700 (Mon, 27 Oct 2008) | 1 line
NodeFactory -> Cloud to encourage consistent term usage between the code and the UI.
................
r12820 | kohsuke | 2008-10-29 10:58:20 -0700 (Wed, 29 Oct 2008) | 1 line
formatting fix
................
r12821 | kohsuke | 2008-10-29 11:17:49 -0700 (Wed, 29 Oct 2008) | 1 line
added classes for handling a secret and prevent accidental exposure of a secret in the persisted form
................
r12822 | kohsuke | 2008-10-29 11:32:39 -0700 (Wed, 29 Oct 2008) | 1 line
added a base64 validator
................
r12831 | kohsuke | 2008-10-29 15:58:45 -0700 (Wed, 29 Oct 2008) | 1 line
secret key needs to be persisted outside config.xml (and it is, already!)
................
r12832 | kohsuke | 2008-10-29 16:06:28 -0700 (Wed, 29 Oct 2008) | 1 line
started working on Amazon EC2 plugin
................
r12833 | kohsuke | 2008-10-29 16:09:20 -0700 (Wed, 29 Oct 2008) | 1 line
brought the same enhancement as in <textbox />
................
r12834 | kohsuke | 2008-10-29 16:15:05 -0700 (Wed, 29 Oct 2008) | 1 line
copy over the onclick handler from the original button element
................
r12835 | kohsuke | 2008-10-29 17:01:04 -0700 (Wed, 29 Oct 2008) | 1 line
allow OK messages to be sent with some mark up.
................
r12836 | kohsuke | 2008-10-29 17:06:52 -0700 (Wed, 29 Oct 2008) | 1 line
added connection testing. This pattern needs to be generalized since it happens often
................
r12837 | kohsuke | 2008-10-29 17:13:11 -0700 (Wed, 29 Oct 2008) | 1 line
this is little better
................
r12838 | kohsuke | 2008-10-29 17:17:44 -0700 (Wed, 29 Oct 2008) | 1 line
added spinner
................
r12839 | kohsuke | 2008-10-29 17:31:54 -0700 (Wed, 29 Oct 2008) | 1 line
restructuring the validation button support in a form that can be readily moved to the core.
................
r12840 | kohsuke | 2008-10-29 18:01:41 -0700 (Wed, 29 Oct 2008) | 1 line
added <f:validateButton/> for multi-field server-side validation
................
r12841 | kohsuke | 2008-10-29 18:03:12 -0700 (Wed, 29 Oct 2008) | 1 line
logic moved to <f:validateButton/> in the core.
................
r12854 | kohsuke | 2008-10-30 13:32:58 -0700 (Thu, 30 Oct 2008) | 1 line
@QueryParameter.value won't be necessary any more
................
r12855 | kohsuke | 2008-10-30 13:42:58 -0700 (Thu, 30 Oct 2008) | 1 line
need a strongly-typed constructor.
................
r12860 | kohsuke | 2008-10-30 15:24:18 -0700 (Thu, 30 Oct 2008) | 1 line
adding more reflection support, which in turn we use in taglibs to raise the level of abstraction.
................
r12861 | kohsuke | 2008-10-30 15:33:22 -0700 (Thu, 30 Oct 2008) | 1 line
added a tag to create databinding to a<select> element from an enum property
................
r12862 | kohsuke | 2008-10-30 15:37:44 -0700 (Thu, 30 Oct 2008) | 1 line
adding a smarter bi-directional binding through <f:repeatable field="..."/>
................
r12863 | kohsuke | 2008-10-30 15:47:48 -0700 (Thu, 30 Oct 2008) | 1 line
making progress with the EC2 support
................
r12864 | kohsuke | 2008-10-30 16:12:34 -0700 (Thu, 30 Oct 2008) | 1 line
added form field validation for AMI ID
................
r12865 | kohsuke | 2008-10-30 16:15:44 -0700 (Thu, 30 Oct 2008) | 1 line
added simpler version
................
r12866 | kohsuke | 2008-10-30 16:17:15 -0700 (Thu, 30 Oct 2008) | 1 line
doc improvement
................
r12867 | kohsuke | 2008-10-30 16:17:19 -0700 (Thu, 30 Oct 2008) | 1 line
simplified a bit
................
r12868 | kohsuke | 2008-10-30 16:40:25 -0700 (Thu, 30 Oct 2008) | 1 line
doc improvement
................
r12869 | kohsuke | 2008-10-30 17:00:57 -0700 (Thu, 30 Oct 2008) | 1 line
adding the provisioning of the new slave
................
r12870 | kohsuke | 2008-10-30 17:07:27 -0700 (Thu, 30 Oct 2008) | 1 line
/** {@inheritDoc} */ is the default behavior for javadoc, so there's no point in making that explicit.
................
r12871 | kohsuke | 2008-10-30 17:11:04 -0700 (Thu, 30 Oct 2008) | 1 line
doc bug fix
................
r12872 | kohsuke | 2008-10-30 17:17:20 -0700 (Thu, 30 Oct 2008) | 1 line
simplified a bit
................
r12873 | kohsuke | 2008-10-30 17:19:06 -0700 (Thu, 30 Oct 2008) | 1 line
added RetentionStrategy for EC2 instances
................
r12874 | kohsuke | 2008-10-30 17:21:17 -0700 (Thu, 30 Oct 2008) | 1 line
allowing subclasses to override the disconnect behavior.
................
r12875 | kohsuke | 2008-10-30 18:02:35 -0700 (Thu, 30 Oct 2008) | 1 line
added termination
................
r12876 | kohsuke | 2008-10-30 18:05:30 -0700 (Thu, 30 Oct 2008) | 1 line
forgot to rename when NodeFactory was renamed to Cloud
................
r12877 | kohsuke | 2008-10-30 18:06:08 -0700 (Thu, 30 Oct 2008) | 1 line
using the console icon
................
r12878 | kohsuke | 2008-10-30 18:17:20 -0700 (Thu, 30 Oct 2008) | 1 line
adding UI to remove a slave.
................
r12879 | kohsuke | 2008-10-30 18:48:57 -0700 (Thu, 30 Oct 2008) | 1 line
commons-discovery now needed in stapler
................
r12880 | kohsuke | 2008-10-30 18:50:27 -0700 (Thu, 30 Oct 2008) | 1 line
needs to use a newer version of stapler
................
r12881 | kohsuke | 2008-10-30 18:51:02 -0700 (Thu, 30 Oct 2008) | 1 line
Bye bye CVS
................
r12882 | kohsuke | 2008-10-30 18:51:43 -0700 (Thu, 30 Oct 2008) | 1 line
Bye bye CVS
................
r12896 | kohsuke | 2008-10-31 14:52:07 -0700 (Fri, 31 Oct 2008) | 1 line
fixed the ordering between field and the mighty get(String) method.
................
r12897 | kohsuke | 2008-10-31 15:08:41 -0700 (Fri, 31 Oct 2008) | 1 line
fixed test compilation problems
................
r12898 | kohsuke | 2008-10-31 15:11:25 -0700 (Fri, 31 Oct 2008) | 1 line
marking this as a model object since it's always bound to URL.
................
r12899 | kohsuke | 2008-10-31 15:13:42 -0700 (Fri, 31 Oct 2008) | 1 line
adding UI hook up to manually provision a new node
................
r12900 | kohsuke | 2008-10-31 15:14:00 -0700 (Fri, 31 Oct 2008) | 1 line
after merging the trunk the version number is different
................
r12901 | kohsuke | 2008-10-31 15:21:54 -0700 (Fri, 31 Oct 2008) | 1 line
adding UI hook up for provisioning a new slave
................
r12902 | kohsuke | 2008-10-31 15:45:10 -0700 (Fri, 31 Oct 2008) | 1 line
adding a hook to decorate ComputerLauncher.
................
r12903 | kohsuke | 2008-10-31 15:48:21 -0700 (Fri, 31 Oct 2008) | 1 line
added filtering support
................
r12904 | kohsuke | 2008-10-31 15:52:45 -0700 (Fri, 31 Oct 2008) | 1 line
added view
................
r12905 | kohsuke | 2008-10-31 15:53:49 -0700 (Fri, 31 Oct 2008) | 1 line
doc improvement
................
r12914 | kohsuke | 2008-11-01 17:45:57 -0700 (Sat, 01 Nov 2008) | 1 line
adding code for connecting with SSH
................
r12915 | kohsuke | 2008-11-01 17:49:28 -0700 (Sat, 01 Nov 2008) | 1 line
working on launchers
................
r12916 | kohsuke | 2008-11-01 18:33:12 -0700 (Sat, 01 Nov 2008) | 1 line
added a method to fully read a stream
................
r12917 | kohsuke | 2008-11-01 18:33:45 -0700 (Sat, 01 Nov 2008) | 1 line
bumped up stapler
................
r12918 | kohsuke | 2008-11-01 18:39:41 -0700 (Sat, 01 Nov 2008) | 1 line
doc improvement.
................
r12919 | kohsuke | 2008-11-01 18:45:24 -0700 (Sat, 01 Nov 2008) | 1 line
added a launcher
................
r12920 | kohsuke | 2008-11-01 18:55:02 -0700 (Sat, 01 Nov 2008) | 1 line
implementing the actual ComputerLauncher
................
r12938 | kohsuke | 2008-11-02 08:56:05 -0800 (Sun, 02 Nov 2008) | 1 line
support the field notation
................
r12939 | kohsuke | 2008-11-02 09:20:21 -0800 (Sun, 02 Nov 2008) | 1 line
added the mechanism to execute the init script
................
r12940 | kohsuke | 2008-11-02 09:21:38 -0800 (Sun, 02 Nov 2008) | 1 line
simplification
................
r12941 | kohsuke | 2008-11-02 09:36:21 -0800 (Sun, 02 Nov 2008) | 1 line
adding key handling
................
r12950 | kohsuke | 2008-11-03 11:00:58 -0800 (Mon, 03 Nov 2008) | 1 line
formatting changes
................
r13045 | kohsuke | 2008-11-06 15:24:32 -0800 (Thu, 06 Nov 2008) | 1 line
adding time series datatype for retaining load average statistics in memory
................
r13046 | kohsuke | 2008-11-06 15:59:02 -0800 (Thu, 06 Nov 2008) | 1 line
added a convenience method.
................
r13048 | kohsuke | 2008-11-06 16:21:54 -0800 (Thu, 06 Nov 2008) | 2 lines
- started monitoring # of executor statistics.
- exposed label to the remote API
................
r13063 | kohsuke | 2008-11-07 13:05:15 -0800 (Fri, 07 Nov 2008) | 1 line
added a convenience method.
................
r13064 | kohsuke | 2008-11-07 13:11:08 -0800 (Fri, 07 Nov 2008) | 1 line
monitor the length of the queue too
................
r13066 | kohsuke | 2008-11-07 14:15:56 -0800 (Fri, 07 Nov 2008) | 1 line
moved the stats to its own class.
................
r13072 | kohsuke | 2008-11-07 15:40:29 -0800 (Fri, 07 Nov 2008) | 1 line
adding provisioning logic based on load statistics
................
r13073 | kohsuke | 2008-11-07 15:46:00 -0800 (Fri, 07 Nov 2008) | 1 line
for effective testing, we need sub-sec precision
................
r13074 | kohsuke | 2008-11-07 16:24:44 -0800 (Fri, 07 Nov 2008) | 1 line
fixed a lie.
................
r13075 | kohsuke | 2008-11-07 16:25:12 -0800 (Fri, 07 Nov 2008) | 1 line
bug fix
................
r13076 | kohsuke | 2008-11-07 16:30:55 -0800 (Fri, 07 Nov 2008) | 1 line
avoid using deprecated methods
................
r13111 | kohsuke | 2008-11-09 11:54:23 -0800 (Sun, 09 Nov 2008) | 1 line
added the Future<?> return parameter to Computer.launch(). To do this w/o breaking compatibility, renamed launch to connect.
................
r13122 | kohsuke | 2008-11-10 14:38:03 -0800 (Mon, 10 Nov 2008) | 1 line
allow programmatic update of the assigned label
................
r13123 | kohsuke | 2008-11-10 14:38:40 -0800 (Mon, 10 Nov 2008) | 1 line
Iterator not needed because CopyOnWriteArrayList doesn't support removal via iterator.
................
r13124 | kohsuke | 2008-11-10 14:39:24 -0800 (Mon, 10 Nov 2008) | 1 line
added another Builder for tests
................
r13125 | kohsuke | 2008-11-10 14:39:48 -0800 (Mon, 10 Nov 2008) | 1 line
simplified a bit. This TestEnvironment stuff needs some clearer story.
................
r13126 | kohsuke | 2008-11-10 14:46:40 -0800 (Mon, 10 Nov 2008) | 1 line
IDEA complains about this.
................
r13127 | kohsuke | 2008-11-10 14:51:53 -0800 (Mon, 10 Nov 2008) | 1 line
improved the error diagnostics by displaying why a provisioned node failed to launch
................
r13128 | kohsuke | 2008-11-10 14:52:12 -0800 (Mon, 10 Nov 2008) | 1 line
Started a test case for NodeProvisioner
................
r13129 | kohsuke | 2008-11-10 14:52:27 -0800 (Mon, 10 Nov 2008) | 1 line
formatting changes
................
r13130 | kohsuke | 2008-11-10 15:16:02 -0800 (Mon, 10 Nov 2008) | 1 line
report the failure as a failure.
................
r13131 | kohsuke | 2008-11-10 16:34:23 -0800 (Mon, 10 Nov 2008) | 1 line
adding a parameter to the connect method to support joining to the pending launch activity.
................
r13132 | kohsuke | 2008-11-10 16:38:31 -0800 (Mon, 10 Nov 2008) | 1 line
making members public so that it can be accessed from other classes (DummyCloudImpl was the first to do this)
................
r13133 | kohsuke | 2008-11-10 16:38:58 -0800 (Mon, 10 Nov 2008) | 1 line
split the cloud implementation to a separate class to allow reuse.
................
r13134 | kohsuke | 2008-11-10 16:56:27 -0800 (Mon, 10 Nov 2008) | 1 line
assign unique names to support multiple jobs
................
r13135 | kohsuke | 2008-11-10 17:11:31 -0800 (Mon, 10 Nov 2008) | 1 line
avoid unnecessary interruption
................
r13136 | kohsuke | 2008-11-10 17:11:41 -0800 (Mon, 10 Nov 2008) | 1 line
adding another test case
................
r13137 | kohsuke | 2008-11-10 17:16:28 -0800 (Mon, 10 Nov 2008) | 1 line
cleaned up a test case
................
r13138 | kohsuke | 2008-11-10 17:36:52 -0800 (Mon, 10 Nov 2008) | 1 line
since the setNode method is called on every Computer just by adding a new node, don't force a new launch attempt.
................
r13139 | kohsuke | 2008-11-10 17:37:38 -0800 (Mon, 10 Nov 2008) | 1 line
perform orderly shutdown by giving computers enough time to disconnect.
................
r13140 | kohsuke | 2008-11-10 17:38:08 -0800 (Mon, 10 Nov 2008) | 3 lines
return Future for synchronization.
This breaks binary compatibility, but I checked none of the plugins in Hudson SVN uses this, so I hope this is OK.
................
r13141 | kohsuke | 2008-11-10 17:38:46 -0800 (Mon, 10 Nov 2008) | 1 line
improved diagnostics
................
r13142 | kohsuke | 2008-11-10 17:39:55 -0800 (Mon, 10 Nov 2008) | 1 line
removed compiler warning
................
r13143 | kohsuke | 2008-11-10 18:02:56 -0800 (Mon, 10 Nov 2008) | 1 line
hide the rounding related problem from Cloud by passing int instead of float.
................
r13144 | kohsuke | 2008-11-10 18:10:10 -0800 (Mon, 10 Nov 2008) | 1 line
bug fix
................
r13145 | kohsuke | 2008-11-10 18:11:51 -0800 (Mon, 10 Nov 2008) | 1 line
formatting changes
................
r13146 | kohsuke | 2008-11-10 18:15:08 -0800 (Mon, 10 Nov 2008) | 1 line
moved the slave launch code to HudsonTestCase for reuse
................
r13147 | kohsuke | 2008-11-10 18:20:19 -0800 (Mon, 10 Nov 2008) | 1 line
adding another test case
................
r13150 | kohsuke | 2008-11-11 07:28:53 -0800 (Tue, 11 Nov 2008) | 1 line
bug fix
................
r13153 | kohsuke | 2008-11-11 14:04:21 -0800 (Tue, 11 Nov 2008) | 1 line
cutting down the test size to 5 to increase the test speed
................
r13154 | kohsuke | 2008-11-11 14:04:37 -0800 (Tue, 11 Nov 2008) | 1 line
improved debuggability
................
r13155 | kohsuke | 2008-11-11 14:10:04 -0800 (Tue, 11 Nov 2008) | 1 line
added another convenience method
................
r13156 | kohsuke | 2008-11-11 14:10:21 -0800 (Tue, 11 Nov 2008) | 1 line
further reduce the test turn around time
................
r13157 | kohsuke | 2008-11-11 14:22:03 -0800 (Tue, 11 Nov 2008) | 1 line
doc improvement and clean up
................
r13158 | kohsuke | 2008-11-11 14:22:28 -0800 (Tue, 11 Nov 2008) | 1 line
added a new metho
................
r13487 | kohsuke | 2008-12-09 17:17:30 -0800 (Tue, 09 Dec 2008) | 1 line
SlaveTemplate needs to be able to computer # of executors.
................
r13488 | kohsuke | 2008-12-09 17:18:05 -0800 (Tue, 09 Dec 2008) | 1 line
fixed a compilation problem with the latest head of the branch
................
r13851 | kohsuke | 2008-12-24 13:40:43 -0800 (Wed, 24 Dec 2008) | 82 lines
fixed a dead lock reported by Jesse.
Found one Java-level deadlock:
=============================
"Executor #0 for master":
waiting to lock monitor 0x09409bac (object 0x87474ca0, a hudson.util.CopyOnWriteMap$Hash),
which is held by "main"
"main":
waiting to lock monitor 0x09409b48 (object 0x87474d48, a hudson.model.Hudson$MasterComputer),
which is held by "Executor #0 for master"
Java stack information for the threads listed above:
===================================================
"Executor #0 for master":
at hudson.util.CopyOnWriteMap.remove(CopyOnWriteMap.java:78)
- waiting to lock <0x87474ca0> (a hudson.util.CopyOnWriteMap$Hash)
at hudson.model.Hudson.removeComputer(Hudson.java:717)
at hudson.model.Computer.removeExecutor(Computer.java:433)
- locked <0x87474d48> (a hudson.model.Hudson$MasterComputer)
at hudson.model.Executor.run(Executor.java:65)
- locked <0x87474d48> (a hudson.model.Hudson$MasterComputer)
"main":
at hudson.model.Computer.setNumExecutors(Computer.java:338)
- waiting to lock <0x87474d48> (a hudson.model.Hudson$MasterComputer)
at hudson.model.Computer.setNode(Computer.java:327)
at hudson.model.Hudson.updateComputer(Hudson.java:704)
at hudson.model.Hudson.updateComputerList(Hudson.java:685)
- locked <0x87474ca0> (a hudson.util.CopyOnWriteMap$Hash)
at hudson.model.Hudson.setNodes(Hudson.java:1076)
at hudson.model.Hudson.addNode(Hudson.java:1060)
- locked <0x87474cb0> (a hudson.model.Hudson)
at org.jvnet.hudson.test.HudsonTestCase.createSlave(HudsonTestCase.java:247)
at hudson.slaves.NodeProvisionerTest.testBaselineSlaveUsage(NodeProvisionerTest.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at org.jvnet.hudson.test.HudsonTestCase.runTest(HudsonTestCase.java:151)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.run(SurefireBooter.java:241)
at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:537)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Found 1 deadlock.
................
r13852 | kohsuke | 2008-12-24 14:32:29 -0800 (Wed, 24 Dec 2008) | 1 line
bug fix in the test case.
................
r13854 | kohsuke | 2008-12-24 15:20:22 -0800 (Wed, 24 Dec 2008) | 2 lines
Using a new version of Rhino to get a proper exception chaining.
................
r13855 | kohsuke | 2008-12-24 15:22:13 -0800 (Wed, 24 Dec 2008) | 1 line
typo
................
r13856 | kohsuke | 2008-12-24 15:37:56 -0800 (Wed, 24 Dec 2008) | 1 line
CR shouldn't be in the repository
................
r13859 | kohsuke | 2008-12-24 15:50:32 -0800 (Wed, 24 Dec 2008) | 3 lines
Fixed svn:eol-style.
................
r13866 | kohsuke | 2008-12-24 21:26:43 -0800 (Wed, 24 Dec 2008) | 3 lines
Copying rev.13860 to retry a merge that now looks suspicious.
................
r13869 | kohsuke | 2008-12-24 22:03:46 -0800 (Wed, 24 Dec 2008) | 2 lines
The 2nd merge was successful, so adopting the successful merge as the multiple-computer-per-node branch.
................
r13872 | kohsuke | 2008-12-25 07:28:37 -0800 (Thu, 25 Dec 2008) | 1 line
fixed a test failure
................
r13873 | kohsuke | 2008-12-25 08:16:49 -0800 (Thu, 25 Dec 2008) | 1 line
expanded NodeProvisioner to work on per-label basis
................
r13874 | kohsuke | 2008-12-25 08:27:32 -0800 (Thu, 25 Dec 2008) | 1 line
bug fix
................
r13875 | kohsuke | 2008-12-25 08:33:17 -0800 (Thu, 25 Dec 2008) | 1 line
bug fix
................
r13876 | kohsuke | 2008-12-25 08:45:03 -0800 (Thu, 25 Dec 2008) | 3 lines
[HUDSON-2605] Strangely, I discovered that on some File, which is new File("./target/hudson-for-test"), file.exists()==false but file.getAbsoluteFile().exists()==true.
It looks like this happens when $PWD of the process at the OS level is different from System.getProperty("user.dir")
................
r13878 | kohsuke | 2008-12-25 15:52:45 -0800 (Thu, 25 Dec 2008) | 1 line
added a marker file
................
r13879 | kohsuke | 2008-12-25 15:53:13 -0800 (Thu, 25 Dec 2008) | 1 line
use marker file to find the hudson main workspace.
................
r13883 | kohsuke | 2008-12-26 07:50:44 -0800 (Fri, 26 Dec 2008) | 1 line
avoid using a deprecated method.
................
r13884 | kohsuke | 2008-12-26 07:50:59 -0800 (Fri, 26 Dec 2008) | 1 line
adding more probes
................
r13885 | kohsuke | 2008-12-26 08:15:42 -0800 (Fri, 26 Dec 2008) | 1 line
for analyzing test failures, capturing the output is crucial.
................
r13887 | kohsuke | 2008-12-26 11:25:12 -0800 (Fri, 26 Dec 2008) | 1 line
allow sub-types to intercept mutation
................
r13888 | kohsuke | 2008-12-26 11:26:01 -0800 (Fri, 26 Dec 2008) | 1 line
clouds need to be taken into account before marking a label as pointless.
................
r13889 | kohsuke | 2008-12-26 11:26:40 -0800 (Fri, 26 Dec 2008) | 3 lines
fixing bugs in NodeProvisioner.
Conservative estimate on idle executors have to be max, not min.
................
r13890 | kohsuke | 2008-12-26 11:42:53 -0800 (Fri, 26 Dec 2008) | 1 line
turns out the problem was that we were adding multiple slaves under the same name, which confused Hudson to no end.
................
r13896 | kohsuke | 2008-12-27 07:44:20 -0800 (Sat, 27 Dec 2008) | 1 line
formatting changes
................
r13897 | kohsuke | 2008-12-27 07:45:00 -0800 (Sat, 27 Dec 2008) | 1 line
reprot the test name to stdout so that one can easily distinguish different tests in target/surefire-reports/xyz-output.txt
................
r13898 | kohsuke | 2008-12-27 07:54:53 -0800 (Sat, 27 Dec 2008) | 1 line
doc improvement
................
r13899 | kohsuke | 2008-12-27 09:59:07 -0800 (Sat, 27 Dec 2008) | 1 line
split the functionality into two classes
................
r13900 | kohsuke | 2008-12-27 10:00:29 -0800 (Sat, 27 Dec 2008) | 1 line
doc improvement
................
r13901 | kohsuke | 2008-12-27 10:06:24 -0800 (Sat, 27 Dec 2008) | 1 line
added 'tick'
................
r13902 | kohsuke | 2008-12-27 10:08:04 -0800 (Sat, 27 Dec 2008) | 1 line
adding graph rendering of the load statistics
................
r13903 | kohsuke | 2008-12-27 10:19:41 -0800 (Sat, 27 Dec 2008) | 1 line
improved graph layout
................
r13904 | kohsuke | 2008-12-27 10:21:05 -0800 (Sat, 27 Dec 2008) | 1 line
Picker -> TimeScale to better reflect what it is.
................
r13905 | kohsuke | 2008-12-27 10:40:27 -0800 (Sat, 27 Dec 2008) | 1 line
duplicate
................
r13906 | kohsuke | 2008-12-27 14:39:36 -0800 (Sat, 27 Dec 2008) | 1 line
renamed to a shorter name
................
r13907 | kohsuke | 2008-12-27 15:03:25 -0800 (Sat, 27 Dec 2008) | 1 line
added icons
................
r13908 | kohsuke | 2008-12-27 16:20:37 -0800 (Sat, 27 Dec 2008) | 1 line
renamed to make 'loadStatistics' the URL binding.
................
r13909 | kohsuke | 2008-12-27 16:21:01 -0800 (Sat, 27 Dec 2008) | 1 line
exposing loadStatistics for Computer for better URL binding
................
r13910 | kohsuke | 2008-12-27 16:21:16 -0800 (Sat, 27 Dec 2008) | 1 line
adding UI support
................
r13911 | kohsuke | 2008-12-27 19:31:43 -0800 (Sat, 27 Dec 2008) | 1 line
added some basic visualization
................
r13912 | kohsuke | 2008-12-27 19:35:10 -0800 (Sat, 27 Dec 2008) | 1 line
if there's no description, don't even show it.
................
r13913 | kohsuke | 2008-12-27 19:39:26 -0800 (Sat, 27 Dec 2008) | 1 line
added load statistics page for the label as well.
................
r13914 | kohsuke | 2008-12-27 19:48:55 -0800 (Sat, 27 Dec 2008) | 1 line
added one more convenience method.
................
r13915 | kohsuke | 2008-12-27 19:54:29 -0800 (Sat, 27 Dec 2008) | 1 line
refactored so that a different Dataset can be fed.
................
r13916 | kohsuke | 2008-12-27 19:59:20 -0800 (Sat, 27 Dec 2008) | 1 line
added global load statistics lnk to the management screen.
................
r13917 | kohsuke | 2008-12-27 20:31:01 -0800 (Sat, 27 Dec 2008) | 1 line
<dt>s should use the bold font to distinguish them from <dd>s
................
r13918 | kohsuke | 2008-12-27 20:35:10 -0800 (Sat, 27 Dec 2008) | 1 line
added description of what the graph means.
................
r13919 | kohsuke | 2008-12-27 20:35:39 -0800 (Sat, 27 Dec 2008) | 1 line
added description of what the graph means.
................
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14215 71c3de6d-444a-0410-be80-ed276b4c234a
2009-01-07 09:02:56 +08:00
|
|
|
|
2009-02-25 06:01:46 +08:00
|
|
|
public static List<Descriptor<Cloud>> getCloudDescriptors() {
|
2009-02-25 05:37:15 +08:00
|
|
|
return Cloud.all();
|
Merged revisions 11754-11755,11763-11766,11770,11773-11777,11791-11797,11828-11829,11831-11839,11841-11843,11850,11854,11994,12774,12778-12793,12820-12822,12831-12841,12854-12855,12860-12882,12896-12905,12914-12920,12938-12941,12950,13045-13046,13048,13063-13064,13066,13072-13076,13111,13122-13147,13150,13153-13158,13487-13488,13851-13852,13854-13856,13859,13866-13867,13869,13872-13876,13878-13879,13883-13885,13887-13890,13896-13919 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/multiple-computer-per-node
................
r11754 | kohsuke | 2008-08-25 17:59:14 -0700 (Mon, 25 Aug 2008) | 3 lines
Adding EphemeralNode for non-persisted dynamically-allocated expandable/shrinkable slave pool.
Tweaked the serialization of Hudson.slaves accordingly.
................
r11755 | kohsuke | 2008-08-25 18:10:42 -0700 (Mon, 25 Aug 2008) | 1 line
making a small improvements
................
r11763 | kohsuke | 2008-08-26 13:57:25 -0700 (Tue, 26 Aug 2008) | 1 line
adding more convenience methods
................
r11764 | kohsuke | 2008-08-26 14:24:20 -0700 (Tue, 26 Aug 2008) | 1 line
ported mask capability from the TFS plugin to the core.
................
r11765 | kohsuke | 2008-08-26 14:26:25 -0700 (Tue, 26 Aug 2008) | 1 line
making it non-final to allow for subclassing
................
r11766 | kohsuke | 2008-08-26 14:35:20 -0700 (Tue, 26 Aug 2008) | 1 line
test case for NodeList
................
r11770 | kohsuke | 2008-08-26 15:15:21 -0700 (Tue, 26 Aug 2008) | 3 lines
Wrote a simple tool that monitors a file system change (in a poor way) and triggers a build.
................
r11773 | kohsuke | 2008-08-26 17:20:30 -0700 (Tue, 26 Aug 2008) | 1 line
made more structured
................
r11774 | kohsuke | 2008-08-26 17:47:41 -0700 (Tue, 26 Aug 2008) | 1 line
indentation fix
................
r11775 | kohsuke | 2008-08-26 17:48:22 -0700 (Tue, 26 Aug 2008) | 1 line
remove the use of a deprecated feature.
................
r11776 | kohsuke | 2008-08-26 17:51:54 -0700 (Tue, 26 Aug 2008) | 1 line
renamed to 'ALL' to be consistent with recent use of DescriptorList
................
r11777 | kohsuke | 2008-08-26 18:04:17 -0700 (Tue, 26 Aug 2008) | 1 line
adding NodeFactory list and its configuration mechanism
................
r11791 | kohsuke | 2008-08-27 09:43:38 -0700 (Wed, 27 Aug 2008) | 1 line
picked up the latest jelly with Iterable support in <j:forEach>
................
r11792 | kohsuke | 2008-08-27 09:44:08 -0700 (Wed, 27 Aug 2008) | 1 line
Iterable support added in commons-jelly 1.1-hudson-20080826
................
r11793 | kohsuke | 2008-08-27 10:15:14 -0700 (Wed, 27 Aug 2008) | 2 lines
- added name to NodeFactory for binding NodeFactory to URL tree.
- NodeFactory should be access controlled
................
r11794 | kohsuke | 2008-08-27 10:41:11 -0700 (Wed, 27 Aug 2008) | 1 line
added a method to add one Node at a time
................
r11795 | kohsuke | 2008-08-27 10:41:37 -0700 (Wed, 27 Aug 2008) | 1 line
added permission constatnt
................
r11796 | kohsuke | 2008-08-27 10:42:13 -0700 (Wed, 27 Aug 2008) | 1 line
allowing the launch method to throw an exception.
................
r11797 | kohsuke | 2008-08-27 10:44:13 -0700 (Wed, 27 Aug 2008) | 1 line
improving the handling
................
r11828 | kohsuke | 2008-08-29 11:07:16 -0700 (Fri, 29 Aug 2008) | 1 line
added executor config to the sidebar.
................
r11829 | kohsuke | 2008-08-29 11:16:11 -0700 (Fri, 29 Aug 2008) | 1 line
"it" should be assigned to NodeFactory
................
r11831 | kohsuke | 2008-08-29 11:44:41 -0700 (Fri, 29 Aug 2008) | 1 line
formatting changes
................
r11832 | kohsuke | 2008-08-29 11:59:21 -0700 (Fri, 29 Aug 2008) | 1 line
added a script to create a flashing image from any picture
................
r11833 | kohsuke | 2008-08-29 12:07:56 -0700 (Fri, 29 Aug 2008) | 1 line
doc improvement.
................
r11834 | kohsuke | 2008-08-29 13:37:59 -0700 (Fri, 29 Aug 2008) | 1 line
added new images to indicate that a slave is launching
................
r11835 | kohsuke | 2008-08-29 13:43:41 -0700 (Fri, 29 Aug 2008) | 1 line
indicate a launching slave accordingly.
................
r11836 | kohsuke | 2008-08-29 14:02:28 -0700 (Fri, 29 Aug 2008) | 1 line
added a method to remove a Node.
................
r11837 | kohsuke | 2008-08-29 14:02:38 -0700 (Fri, 29 Aug 2008) | 1 line
disconnect
................
r11838 | kohsuke | 2008-08-29 14:03:22 -0700 (Fri, 29 Aug 2008) | 1 line
formatting changes
................
r11839 | kohsuke | 2008-08-29 14:14:04 -0700 (Fri, 29 Aug 2008) | 1 line
allowing subclasses.
................
r11841 | kohsuke | 2008-08-29 14:28:29 -0700 (Fri, 29 Aug 2008) | 1 line
constructor should be the first in the definition.
................
r11842 | kohsuke | 2008-08-29 14:31:01 -0700 (Fri, 29 Aug 2008) | 1 line
doc improvement.
................
r11843 | kohsuke | 2008-08-29 14:32:48 -0700 (Fri, 29 Aug 2008) | 1 line
fixed a problem of using partially constructed object during launch(), because the setNode() method is called from the Computer constructor.
................
r11850 | kohsuke | 2008-08-29 14:50:36 -0700 (Fri, 29 Aug 2008) | 1 line
serialize NodeFactory first so that references to them from NodeList will become references in XML.
................
r11854 | kohsuke | 2008-08-29 14:56:56 -0700 (Fri, 29 Aug 2008) | 1 line
cleaning up a bit.
................
r11994 | kohsuke | 2008-09-03 14:42:11 -0700 (Wed, 03 Sep 2008) | 21 lines
Fixed ArrayIndexOutOfBoundsException during replace(), when the title contains a '$' literal.
The typical stack trace looks like:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 32
at hudson.MarkupText$SubText.start(MarkupText.java:95)
at hudson.MarkupText$SubText.group(MarkupText.java:131)
at hudson.MarkupText$SubText.replace(MarkupText.java:154)
at hudson.MarkupText$SubText.surroundWith(MarkupText.java:83)
at
hudson.plugins.jira.JiraChangeLogAnnotator.annotate(JiraChangeLogAnnotator.java:37)
at
hudson.scm.ChangeLogSet$Entry.getMsgAnnotated(ChangeLogSet.java:117)
... 148 more
Vijayan Jayaraman and I found this problem while we were looking at the server log of Hudson for OpenJFX.
Adding a unit test to verify this behavior, too.
................
r12774 | kohsuke | 2008-10-27 15:03:36 -0700 (Mon, 27 Oct 2008) | 3 lines
preparing for heterogenousness in Node, so that different Node can be configured with different UIs, much like how different Jobs can be configured.
Creating a slave works also like creating a new job.
................
r12778 | kohsuke | 2008-10-27 15:06:51 -0700 (Mon, 27 Oct 2008) | 1 line
We need to be able to create an emtpy Slave initially, so we have to do with the check in the form field validation.
................
r12779 | kohsuke | 2008-10-27 15:48:04 -0700 (Mon, 27 Oct 2008) | 1 line
making the new slave page a two-step process
................
r12780 | kohsuke | 2008-10-27 15:48:24 -0700 (Mon, 27 Oct 2008) | 1 line
fixed a compilation problem
................
r12781 | kohsuke | 2008-10-27 15:53:30 -0700 (Mon, 27 Oct 2008) | 1 line
bug fixes
................
r12782 | kohsuke | 2008-10-27 15:58:20 -0700 (Mon, 27 Oct 2008) | 1 line
bug fixes
................
r12783 | kohsuke | 2008-10-27 16:08:56 -0700 (Mon, 27 Oct 2008) | 1 line
making the configuration page work for slaves
................
r12784 | kohsuke | 2008-10-27 16:35:17 -0700 (Mon, 27 Oct 2008) | 1 line
added new-computer.svg
................
r12785 | kohsuke | 2008-10-27 16:37:26 -0700 (Mon, 27 Oct 2008) | 1 line
hooking up the config/create pages to the UI
................
r12786 | kohsuke | 2008-10-27 16:44:40 -0700 (Mon, 27 Oct 2008) | 1 line
fixed a copy method.
................
r12787 | kohsuke | 2008-10-27 16:47:33 -0700 (Mon, 27 Oct 2008) | 1 line
code was broken when a slave was renamed
................
r12788 | kohsuke | 2008-10-27 16:58:04 -0700 (Mon, 27 Oct 2008) | 1 line
moving out the commonality into a new tag
................
r12789 | kohsuke | 2008-10-27 17:01:21 -0700 (Mon, 27 Oct 2008) | 1 line
consistent term usage
................
r12790 | kohsuke | 2008-10-27 17:03:19 -0700 (Mon, 27 Oct 2008) | 1 line
retiring the configureExecutors. Slave configuration is now moved to individual slave page
................
r12791 | kohsuke | 2008-10-27 17:10:32 -0700 (Mon, 27 Oct 2008) | 1 line
retired configureExecutors.jelly and completed moved its contents to somewhere else
................
r12792 | kohsuke | 2008-10-27 17:21:53 -0700 (Mon, 27 Oct 2008) | 1 line
bug fix. request handling of "/descriptor/FQCN/..." was broken.
................
r12793 | kohsuke | 2008-10-27 17:27:08 -0700 (Mon, 27 Oct 2008) | 1 line
NodeFactory -> Cloud to encourage consistent term usage between the code and the UI.
................
r12820 | kohsuke | 2008-10-29 10:58:20 -0700 (Wed, 29 Oct 2008) | 1 line
formatting fix
................
r12821 | kohsuke | 2008-10-29 11:17:49 -0700 (Wed, 29 Oct 2008) | 1 line
added classes for handling a secret and prevent accidental exposure of a secret in the persisted form
................
r12822 | kohsuke | 2008-10-29 11:32:39 -0700 (Wed, 29 Oct 2008) | 1 line
added a base64 validator
................
r12831 | kohsuke | 2008-10-29 15:58:45 -0700 (Wed, 29 Oct 2008) | 1 line
secret key needs to be persisted outside config.xml (and it is, already!)
................
r12832 | kohsuke | 2008-10-29 16:06:28 -0700 (Wed, 29 Oct 2008) | 1 line
started working on Amazon EC2 plugin
................
r12833 | kohsuke | 2008-10-29 16:09:20 -0700 (Wed, 29 Oct 2008) | 1 line
brought the same enhancement as in <textbox />
................
r12834 | kohsuke | 2008-10-29 16:15:05 -0700 (Wed, 29 Oct 2008) | 1 line
copy over the onclick handler from the original button element
................
r12835 | kohsuke | 2008-10-29 17:01:04 -0700 (Wed, 29 Oct 2008) | 1 line
allow OK messages to be sent with some mark up.
................
r12836 | kohsuke | 2008-10-29 17:06:52 -0700 (Wed, 29 Oct 2008) | 1 line
added connection testing. This pattern needs to be generalized since it happens often
................
r12837 | kohsuke | 2008-10-29 17:13:11 -0700 (Wed, 29 Oct 2008) | 1 line
this is little better
................
r12838 | kohsuke | 2008-10-29 17:17:44 -0700 (Wed, 29 Oct 2008) | 1 line
added spinner
................
r12839 | kohsuke | 2008-10-29 17:31:54 -0700 (Wed, 29 Oct 2008) | 1 line
restructuring the validation button support in a form that can be readily moved to the core.
................
r12840 | kohsuke | 2008-10-29 18:01:41 -0700 (Wed, 29 Oct 2008) | 1 line
added <f:validateButton/> for multi-field server-side validation
................
r12841 | kohsuke | 2008-10-29 18:03:12 -0700 (Wed, 29 Oct 2008) | 1 line
logic moved to <f:validateButton/> in the core.
................
r12854 | kohsuke | 2008-10-30 13:32:58 -0700 (Thu, 30 Oct 2008) | 1 line
@QueryParameter.value won't be necessary any more
................
r12855 | kohsuke | 2008-10-30 13:42:58 -0700 (Thu, 30 Oct 2008) | 1 line
need a strongly-typed constructor.
................
r12860 | kohsuke | 2008-10-30 15:24:18 -0700 (Thu, 30 Oct 2008) | 1 line
adding more reflection support, which in turn we use in taglibs to raise the level of abstraction.
................
r12861 | kohsuke | 2008-10-30 15:33:22 -0700 (Thu, 30 Oct 2008) | 1 line
added a tag to create databinding to a<select> element from an enum property
................
r12862 | kohsuke | 2008-10-30 15:37:44 -0700 (Thu, 30 Oct 2008) | 1 line
adding a smarter bi-directional binding through <f:repeatable field="..."/>
................
r12863 | kohsuke | 2008-10-30 15:47:48 -0700 (Thu, 30 Oct 2008) | 1 line
making progress with the EC2 support
................
r12864 | kohsuke | 2008-10-30 16:12:34 -0700 (Thu, 30 Oct 2008) | 1 line
added form field validation for AMI ID
................
r12865 | kohsuke | 2008-10-30 16:15:44 -0700 (Thu, 30 Oct 2008) | 1 line
added simpler version
................
r12866 | kohsuke | 2008-10-30 16:17:15 -0700 (Thu, 30 Oct 2008) | 1 line
doc improvement
................
r12867 | kohsuke | 2008-10-30 16:17:19 -0700 (Thu, 30 Oct 2008) | 1 line
simplified a bit
................
r12868 | kohsuke | 2008-10-30 16:40:25 -0700 (Thu, 30 Oct 2008) | 1 line
doc improvement
................
r12869 | kohsuke | 2008-10-30 17:00:57 -0700 (Thu, 30 Oct 2008) | 1 line
adding the provisioning of the new slave
................
r12870 | kohsuke | 2008-10-30 17:07:27 -0700 (Thu, 30 Oct 2008) | 1 line
/** {@inheritDoc} */ is the default behavior for javadoc, so there's no point in making that explicit.
................
r12871 | kohsuke | 2008-10-30 17:11:04 -0700 (Thu, 30 Oct 2008) | 1 line
doc bug fix
................
r12872 | kohsuke | 2008-10-30 17:17:20 -0700 (Thu, 30 Oct 2008) | 1 line
simplified a bit
................
r12873 | kohsuke | 2008-10-30 17:19:06 -0700 (Thu, 30 Oct 2008) | 1 line
added RetentionStrategy for EC2 instances
................
r12874 | kohsuke | 2008-10-30 17:21:17 -0700 (Thu, 30 Oct 2008) | 1 line
allowing subclasses to override the disconnect behavior.
................
r12875 | kohsuke | 2008-10-30 18:02:35 -0700 (Thu, 30 Oct 2008) | 1 line
added termination
................
r12876 | kohsuke | 2008-10-30 18:05:30 -0700 (Thu, 30 Oct 2008) | 1 line
forgot to rename when NodeFactory was renamed to Cloud
................
r12877 | kohsuke | 2008-10-30 18:06:08 -0700 (Thu, 30 Oct 2008) | 1 line
using the console icon
................
r12878 | kohsuke | 2008-10-30 18:17:20 -0700 (Thu, 30 Oct 2008) | 1 line
adding UI to remove a slave.
................
r12879 | kohsuke | 2008-10-30 18:48:57 -0700 (Thu, 30 Oct 2008) | 1 line
commons-discovery now needed in stapler
................
r12880 | kohsuke | 2008-10-30 18:50:27 -0700 (Thu, 30 Oct 2008) | 1 line
needs to use a newer version of stapler
................
r12881 | kohsuke | 2008-10-30 18:51:02 -0700 (Thu, 30 Oct 2008) | 1 line
Bye bye CVS
................
r12882 | kohsuke | 2008-10-30 18:51:43 -0700 (Thu, 30 Oct 2008) | 1 line
Bye bye CVS
................
r12896 | kohsuke | 2008-10-31 14:52:07 -0700 (Fri, 31 Oct 2008) | 1 line
fixed the ordering between field and the mighty get(String) method.
................
r12897 | kohsuke | 2008-10-31 15:08:41 -0700 (Fri, 31 Oct 2008) | 1 line
fixed test compilation problems
................
r12898 | kohsuke | 2008-10-31 15:11:25 -0700 (Fri, 31 Oct 2008) | 1 line
marking this as a model object since it's always bound to URL.
................
r12899 | kohsuke | 2008-10-31 15:13:42 -0700 (Fri, 31 Oct 2008) | 1 line
adding UI hook up to manually provision a new node
................
r12900 | kohsuke | 2008-10-31 15:14:00 -0700 (Fri, 31 Oct 2008) | 1 line
after merging the trunk the version number is different
................
r12901 | kohsuke | 2008-10-31 15:21:54 -0700 (Fri, 31 Oct 2008) | 1 line
adding UI hook up for provisioning a new slave
................
r12902 | kohsuke | 2008-10-31 15:45:10 -0700 (Fri, 31 Oct 2008) | 1 line
adding a hook to decorate ComputerLauncher.
................
r12903 | kohsuke | 2008-10-31 15:48:21 -0700 (Fri, 31 Oct 2008) | 1 line
added filtering support
................
r12904 | kohsuke | 2008-10-31 15:52:45 -0700 (Fri, 31 Oct 2008) | 1 line
added view
................
r12905 | kohsuke | 2008-10-31 15:53:49 -0700 (Fri, 31 Oct 2008) | 1 line
doc improvement
................
r12914 | kohsuke | 2008-11-01 17:45:57 -0700 (Sat, 01 Nov 2008) | 1 line
adding code for connecting with SSH
................
r12915 | kohsuke | 2008-11-01 17:49:28 -0700 (Sat, 01 Nov 2008) | 1 line
working on launchers
................
r12916 | kohsuke | 2008-11-01 18:33:12 -0700 (Sat, 01 Nov 2008) | 1 line
added a method to fully read a stream
................
r12917 | kohsuke | 2008-11-01 18:33:45 -0700 (Sat, 01 Nov 2008) | 1 line
bumped up stapler
................
r12918 | kohsuke | 2008-11-01 18:39:41 -0700 (Sat, 01 Nov 2008) | 1 line
doc improvement.
................
r12919 | kohsuke | 2008-11-01 18:45:24 -0700 (Sat, 01 Nov 2008) | 1 line
added a launcher
................
r12920 | kohsuke | 2008-11-01 18:55:02 -0700 (Sat, 01 Nov 2008) | 1 line
implementing the actual ComputerLauncher
................
r12938 | kohsuke | 2008-11-02 08:56:05 -0800 (Sun, 02 Nov 2008) | 1 line
support the field notation
................
r12939 | kohsuke | 2008-11-02 09:20:21 -0800 (Sun, 02 Nov 2008) | 1 line
added the mechanism to execute the init script
................
r12940 | kohsuke | 2008-11-02 09:21:38 -0800 (Sun, 02 Nov 2008) | 1 line
simplification
................
r12941 | kohsuke | 2008-11-02 09:36:21 -0800 (Sun, 02 Nov 2008) | 1 line
adding key handling
................
r12950 | kohsuke | 2008-11-03 11:00:58 -0800 (Mon, 03 Nov 2008) | 1 line
formatting changes
................
r13045 | kohsuke | 2008-11-06 15:24:32 -0800 (Thu, 06 Nov 2008) | 1 line
adding time series datatype for retaining load average statistics in memory
................
r13046 | kohsuke | 2008-11-06 15:59:02 -0800 (Thu, 06 Nov 2008) | 1 line
added a convenience method.
................
r13048 | kohsuke | 2008-11-06 16:21:54 -0800 (Thu, 06 Nov 2008) | 2 lines
- started monitoring # of executor statistics.
- exposed label to the remote API
................
r13063 | kohsuke | 2008-11-07 13:05:15 -0800 (Fri, 07 Nov 2008) | 1 line
added a convenience method.
................
r13064 | kohsuke | 2008-11-07 13:11:08 -0800 (Fri, 07 Nov 2008) | 1 line
monitor the length of the queue too
................
r13066 | kohsuke | 2008-11-07 14:15:56 -0800 (Fri, 07 Nov 2008) | 1 line
moved the stats to its own class.
................
r13072 | kohsuke | 2008-11-07 15:40:29 -0800 (Fri, 07 Nov 2008) | 1 line
adding provisioning logic based on load statistics
................
r13073 | kohsuke | 2008-11-07 15:46:00 -0800 (Fri, 07 Nov 2008) | 1 line
for effective testing, we need sub-sec precision
................
r13074 | kohsuke | 2008-11-07 16:24:44 -0800 (Fri, 07 Nov 2008) | 1 line
fixed a lie.
................
r13075 | kohsuke | 2008-11-07 16:25:12 -0800 (Fri, 07 Nov 2008) | 1 line
bug fix
................
r13076 | kohsuke | 2008-11-07 16:30:55 -0800 (Fri, 07 Nov 2008) | 1 line
avoid using deprecated methods
................
r13111 | kohsuke | 2008-11-09 11:54:23 -0800 (Sun, 09 Nov 2008) | 1 line
added the Future<?> return parameter to Computer.launch(). To do this w/o breaking compatibility, renamed launch to connect.
................
r13122 | kohsuke | 2008-11-10 14:38:03 -0800 (Mon, 10 Nov 2008) | 1 line
allow programmatic update of the assigned label
................
r13123 | kohsuke | 2008-11-10 14:38:40 -0800 (Mon, 10 Nov 2008) | 1 line
Iterator not needed because CopyOnWriteArrayList doesn't support removal via iterator.
................
r13124 | kohsuke | 2008-11-10 14:39:24 -0800 (Mon, 10 Nov 2008) | 1 line
added another Builder for tests
................
r13125 | kohsuke | 2008-11-10 14:39:48 -0800 (Mon, 10 Nov 2008) | 1 line
simplified a bit. This TestEnvironment stuff needs some clearer story.
................
r13126 | kohsuke | 2008-11-10 14:46:40 -0800 (Mon, 10 Nov 2008) | 1 line
IDEA complains about this.
................
r13127 | kohsuke | 2008-11-10 14:51:53 -0800 (Mon, 10 Nov 2008) | 1 line
improved the error diagnostics by displaying why a provisioned node failed to launch
................
r13128 | kohsuke | 2008-11-10 14:52:12 -0800 (Mon, 10 Nov 2008) | 1 line
Started a test case for NodeProvisioner
................
r13129 | kohsuke | 2008-11-10 14:52:27 -0800 (Mon, 10 Nov 2008) | 1 line
formatting changes
................
r13130 | kohsuke | 2008-11-10 15:16:02 -0800 (Mon, 10 Nov 2008) | 1 line
report the failure as a failure.
................
r13131 | kohsuke | 2008-11-10 16:34:23 -0800 (Mon, 10 Nov 2008) | 1 line
adding a parameter to the connect method to support joining to the pending launch activity.
................
r13132 | kohsuke | 2008-11-10 16:38:31 -0800 (Mon, 10 Nov 2008) | 1 line
making members public so that it can be accessed from other classes (DummyCloudImpl was the first to do this)
................
r13133 | kohsuke | 2008-11-10 16:38:58 -0800 (Mon, 10 Nov 2008) | 1 line
split the cloud implementation to a separate class to allow reuse.
................
r13134 | kohsuke | 2008-11-10 16:56:27 -0800 (Mon, 10 Nov 2008) | 1 line
assign unique names to support multiple jobs
................
r13135 | kohsuke | 2008-11-10 17:11:31 -0800 (Mon, 10 Nov 2008) | 1 line
avoid unnecessary interruption
................
r13136 | kohsuke | 2008-11-10 17:11:41 -0800 (Mon, 10 Nov 2008) | 1 line
adding another test case
................
r13137 | kohsuke | 2008-11-10 17:16:28 -0800 (Mon, 10 Nov 2008) | 1 line
cleaned up a test case
................
r13138 | kohsuke | 2008-11-10 17:36:52 -0800 (Mon, 10 Nov 2008) | 1 line
since the setNode method is called on every Computer just by adding a new node, don't force a new launch attempt.
................
r13139 | kohsuke | 2008-11-10 17:37:38 -0800 (Mon, 10 Nov 2008) | 1 line
perform orderly shutdown by giving computers enough time to disconnect.
................
r13140 | kohsuke | 2008-11-10 17:38:08 -0800 (Mon, 10 Nov 2008) | 3 lines
return Future for synchronization.
This breaks binary compatibility, but I checked none of the plugins in Hudson SVN uses this, so I hope this is OK.
................
r13141 | kohsuke | 2008-11-10 17:38:46 -0800 (Mon, 10 Nov 2008) | 1 line
improved diagnostics
................
r13142 | kohsuke | 2008-11-10 17:39:55 -0800 (Mon, 10 Nov 2008) | 1 line
removed compiler warning
................
r13143 | kohsuke | 2008-11-10 18:02:56 -0800 (Mon, 10 Nov 2008) | 1 line
hide the rounding related problem from Cloud by passing int instead of float.
................
r13144 | kohsuke | 2008-11-10 18:10:10 -0800 (Mon, 10 Nov 2008) | 1 line
bug fix
................
r13145 | kohsuke | 2008-11-10 18:11:51 -0800 (Mon, 10 Nov 2008) | 1 line
formatting changes
................
r13146 | kohsuke | 2008-11-10 18:15:08 -0800 (Mon, 10 Nov 2008) | 1 line
moved the slave launch code to HudsonTestCase for reuse
................
r13147 | kohsuke | 2008-11-10 18:20:19 -0800 (Mon, 10 Nov 2008) | 1 line
adding another test case
................
r13150 | kohsuke | 2008-11-11 07:28:53 -0800 (Tue, 11 Nov 2008) | 1 line
bug fix
................
r13153 | kohsuke | 2008-11-11 14:04:21 -0800 (Tue, 11 Nov 2008) | 1 line
cutting down the test size to 5 to increase the test speed
................
r13154 | kohsuke | 2008-11-11 14:04:37 -0800 (Tue, 11 Nov 2008) | 1 line
improved debuggability
................
r13155 | kohsuke | 2008-11-11 14:10:04 -0800 (Tue, 11 Nov 2008) | 1 line
added another convenience method
................
r13156 | kohsuke | 2008-11-11 14:10:21 -0800 (Tue, 11 Nov 2008) | 1 line
further reduce the test turn around time
................
r13157 | kohsuke | 2008-11-11 14:22:03 -0800 (Tue, 11 Nov 2008) | 1 line
doc improvement and clean up
................
r13158 | kohsuke | 2008-11-11 14:22:28 -0800 (Tue, 11 Nov 2008) | 1 line
added a new metho
................
r13487 | kohsuke | 2008-12-09 17:17:30 -0800 (Tue, 09 Dec 2008) | 1 line
SlaveTemplate needs to be able to computer # of executors.
................
r13488 | kohsuke | 2008-12-09 17:18:05 -0800 (Tue, 09 Dec 2008) | 1 line
fixed a compilation problem with the latest head of the branch
................
r13851 | kohsuke | 2008-12-24 13:40:43 -0800 (Wed, 24 Dec 2008) | 82 lines
fixed a dead lock reported by Jesse.
Found one Java-level deadlock:
=============================
"Executor #0 for master":
waiting to lock monitor 0x09409bac (object 0x87474ca0, a hudson.util.CopyOnWriteMap$Hash),
which is held by "main"
"main":
waiting to lock monitor 0x09409b48 (object 0x87474d48, a hudson.model.Hudson$MasterComputer),
which is held by "Executor #0 for master"
Java stack information for the threads listed above:
===================================================
"Executor #0 for master":
at hudson.util.CopyOnWriteMap.remove(CopyOnWriteMap.java:78)
- waiting to lock <0x87474ca0> (a hudson.util.CopyOnWriteMap$Hash)
at hudson.model.Hudson.removeComputer(Hudson.java:717)
at hudson.model.Computer.removeExecutor(Computer.java:433)
- locked <0x87474d48> (a hudson.model.Hudson$MasterComputer)
at hudson.model.Executor.run(Executor.java:65)
- locked <0x87474d48> (a hudson.model.Hudson$MasterComputer)
"main":
at hudson.model.Computer.setNumExecutors(Computer.java:338)
- waiting to lock <0x87474d48> (a hudson.model.Hudson$MasterComputer)
at hudson.model.Computer.setNode(Computer.java:327)
at hudson.model.Hudson.updateComputer(Hudson.java:704)
at hudson.model.Hudson.updateComputerList(Hudson.java:685)
- locked <0x87474ca0> (a hudson.util.CopyOnWriteMap$Hash)
at hudson.model.Hudson.setNodes(Hudson.java:1076)
at hudson.model.Hudson.addNode(Hudson.java:1060)
- locked <0x87474cb0> (a hudson.model.Hudson)
at org.jvnet.hudson.test.HudsonTestCase.createSlave(HudsonTestCase.java:247)
at hudson.slaves.NodeProvisionerTest.testBaselineSlaveUsage(NodeProvisionerTest.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at org.jvnet.hudson.test.HudsonTestCase.runTest(HudsonTestCase.java:151)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.run(SurefireBooter.java:241)
at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:537)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Found 1 deadlock.
................
r13852 | kohsuke | 2008-12-24 14:32:29 -0800 (Wed, 24 Dec 2008) | 1 line
bug fix in the test case.
................
r13854 | kohsuke | 2008-12-24 15:20:22 -0800 (Wed, 24 Dec 2008) | 2 lines
Using a new version of Rhino to get a proper exception chaining.
................
r13855 | kohsuke | 2008-12-24 15:22:13 -0800 (Wed, 24 Dec 2008) | 1 line
typo
................
r13856 | kohsuke | 2008-12-24 15:37:56 -0800 (Wed, 24 Dec 2008) | 1 line
CR shouldn't be in the repository
................
r13859 | kohsuke | 2008-12-24 15:50:32 -0800 (Wed, 24 Dec 2008) | 3 lines
Fixed svn:eol-style.
................
r13866 | kohsuke | 2008-12-24 21:26:43 -0800 (Wed, 24 Dec 2008) | 3 lines
Copying rev.13860 to retry a merge that now looks suspicious.
................
r13869 | kohsuke | 2008-12-24 22:03:46 -0800 (Wed, 24 Dec 2008) | 2 lines
The 2nd merge was successful, so adopting the successful merge as the multiple-computer-per-node branch.
................
r13872 | kohsuke | 2008-12-25 07:28:37 -0800 (Thu, 25 Dec 2008) | 1 line
fixed a test failure
................
r13873 | kohsuke | 2008-12-25 08:16:49 -0800 (Thu, 25 Dec 2008) | 1 line
expanded NodeProvisioner to work on per-label basis
................
r13874 | kohsuke | 2008-12-25 08:27:32 -0800 (Thu, 25 Dec 2008) | 1 line
bug fix
................
r13875 | kohsuke | 2008-12-25 08:33:17 -0800 (Thu, 25 Dec 2008) | 1 line
bug fix
................
r13876 | kohsuke | 2008-12-25 08:45:03 -0800 (Thu, 25 Dec 2008) | 3 lines
[HUDSON-2605] Strangely, I discovered that on some File, which is new File("./target/hudson-for-test"), file.exists()==false but file.getAbsoluteFile().exists()==true.
It looks like this happens when $PWD of the process at the OS level is different from System.getProperty("user.dir")
................
r13878 | kohsuke | 2008-12-25 15:52:45 -0800 (Thu, 25 Dec 2008) | 1 line
added a marker file
................
r13879 | kohsuke | 2008-12-25 15:53:13 -0800 (Thu, 25 Dec 2008) | 1 line
use marker file to find the hudson main workspace.
................
r13883 | kohsuke | 2008-12-26 07:50:44 -0800 (Fri, 26 Dec 2008) | 1 line
avoid using a deprecated method.
................
r13884 | kohsuke | 2008-12-26 07:50:59 -0800 (Fri, 26 Dec 2008) | 1 line
adding more probes
................
r13885 | kohsuke | 2008-12-26 08:15:42 -0800 (Fri, 26 Dec 2008) | 1 line
for analyzing test failures, capturing the output is crucial.
................
r13887 | kohsuke | 2008-12-26 11:25:12 -0800 (Fri, 26 Dec 2008) | 1 line
allow sub-types to intercept mutation
................
r13888 | kohsuke | 2008-12-26 11:26:01 -0800 (Fri, 26 Dec 2008) | 1 line
clouds need to be taken into account before marking a label as pointless.
................
r13889 | kohsuke | 2008-12-26 11:26:40 -0800 (Fri, 26 Dec 2008) | 3 lines
fixing bugs in NodeProvisioner.
Conservative estimate on idle executors have to be max, not min.
................
r13890 | kohsuke | 2008-12-26 11:42:53 -0800 (Fri, 26 Dec 2008) | 1 line
turns out the problem was that we were adding multiple slaves under the same name, which confused Hudson to no end.
................
r13896 | kohsuke | 2008-12-27 07:44:20 -0800 (Sat, 27 Dec 2008) | 1 line
formatting changes
................
r13897 | kohsuke | 2008-12-27 07:45:00 -0800 (Sat, 27 Dec 2008) | 1 line
reprot the test name to stdout so that one can easily distinguish different tests in target/surefire-reports/xyz-output.txt
................
r13898 | kohsuke | 2008-12-27 07:54:53 -0800 (Sat, 27 Dec 2008) | 1 line
doc improvement
................
r13899 | kohsuke | 2008-12-27 09:59:07 -0800 (Sat, 27 Dec 2008) | 1 line
split the functionality into two classes
................
r13900 | kohsuke | 2008-12-27 10:00:29 -0800 (Sat, 27 Dec 2008) | 1 line
doc improvement
................
r13901 | kohsuke | 2008-12-27 10:06:24 -0800 (Sat, 27 Dec 2008) | 1 line
added 'tick'
................
r13902 | kohsuke | 2008-12-27 10:08:04 -0800 (Sat, 27 Dec 2008) | 1 line
adding graph rendering of the load statistics
................
r13903 | kohsuke | 2008-12-27 10:19:41 -0800 (Sat, 27 Dec 2008) | 1 line
improved graph layout
................
r13904 | kohsuke | 2008-12-27 10:21:05 -0800 (Sat, 27 Dec 2008) | 1 line
Picker -> TimeScale to better reflect what it is.
................
r13905 | kohsuke | 2008-12-27 10:40:27 -0800 (Sat, 27 Dec 2008) | 1 line
duplicate
................
r13906 | kohsuke | 2008-12-27 14:39:36 -0800 (Sat, 27 Dec 2008) | 1 line
renamed to a shorter name
................
r13907 | kohsuke | 2008-12-27 15:03:25 -0800 (Sat, 27 Dec 2008) | 1 line
added icons
................
r13908 | kohsuke | 2008-12-27 16:20:37 -0800 (Sat, 27 Dec 2008) | 1 line
renamed to make 'loadStatistics' the URL binding.
................
r13909 | kohsuke | 2008-12-27 16:21:01 -0800 (Sat, 27 Dec 2008) | 1 line
exposing loadStatistics for Computer for better URL binding
................
r13910 | kohsuke | 2008-12-27 16:21:16 -0800 (Sat, 27 Dec 2008) | 1 line
adding UI support
................
r13911 | kohsuke | 2008-12-27 19:31:43 -0800 (Sat, 27 Dec 2008) | 1 line
added some basic visualization
................
r13912 | kohsuke | 2008-12-27 19:35:10 -0800 (Sat, 27 Dec 2008) | 1 line
if there's no description, don't even show it.
................
r13913 | kohsuke | 2008-12-27 19:39:26 -0800 (Sat, 27 Dec 2008) | 1 line
added load statistics page for the label as well.
................
r13914 | kohsuke | 2008-12-27 19:48:55 -0800 (Sat, 27 Dec 2008) | 1 line
added one more convenience method.
................
r13915 | kohsuke | 2008-12-27 19:54:29 -0800 (Sat, 27 Dec 2008) | 1 line
refactored so that a different Dataset can be fed.
................
r13916 | kohsuke | 2008-12-27 19:59:20 -0800 (Sat, 27 Dec 2008) | 1 line
added global load statistics lnk to the management screen.
................
r13917 | kohsuke | 2008-12-27 20:31:01 -0800 (Sat, 27 Dec 2008) | 1 line
<dt>s should use the bold font to distinguish them from <dd>s
................
r13918 | kohsuke | 2008-12-27 20:35:10 -0800 (Sat, 27 Dec 2008) | 1 line
added description of what the graph means.
................
r13919 | kohsuke | 2008-12-27 20:35:39 -0800 (Sat, 27 Dec 2008) | 1 line
added description of what the graph means.
................
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14215 71c3de6d-444a-0410-be80-ed276b4c234a
2009-01-07 09:02:56 +08:00
|
|
|
}
|
2008-08-05 08:22:58 +08:00
|
|
|
|
2009-03-01 11:28:33 +08:00
|
|
|
/**
|
|
|
|
* Prepend a prefix only when there's the specified body.
|
|
|
|
*/
|
|
|
|
public String prepend(String prefix, String body) {
|
|
|
|
if(body!=null && body.length()>0)
|
|
|
|
return prefix+body;
|
|
|
|
return body;
|
|
|
|
}
|
|
|
|
|
2009-06-09 15:09:02 +08:00
|
|
|
public static List<Descriptor<CrumbIssuer>> getCrumbIssuerDescriptors() {
|
|
|
|
return CrumbIssuer.all();
|
|
|
|
}
|
2010-07-21 06:04:01 +08:00
|
|
|
|
2009-06-09 15:09:02 +08:00
|
|
|
public static String getCrumb(StaplerRequest req) {
|
2011-05-29 01:11:48 +08:00
|
|
|
Jenkins h = Jenkins.getInstance();
|
2010-07-21 06:04:01 +08:00
|
|
|
CrumbIssuer issuer = h != null ? h.getCrumbIssuer() : null;
|
|
|
|
return issuer != null ? issuer.getCrumb(req) : "";
|
2009-06-09 15:09:02 +08:00
|
|
|
}
|
2010-07-21 06:04:01 +08:00
|
|
|
|
2009-06-09 15:09:02 +08:00
|
|
|
public static String getCrumbRequestField() {
|
2011-05-29 01:11:48 +08:00
|
|
|
Jenkins h = Jenkins.getInstance();
|
2010-07-21 06:04:01 +08:00
|
|
|
CrumbIssuer issuer = h != null ? h.getCrumbIssuer() : null;
|
|
|
|
return issuer != null ? issuer.getDescriptor().getCrumbRequestField() : "";
|
2009-06-09 15:09:02 +08:00
|
|
|
}
|
2009-09-01 09:19:59 +08:00
|
|
|
|
|
|
|
public static Date getCurrentTime() {
|
|
|
|
return new Date();
|
|
|
|
}
|
[FIXED HUDSON-2137]
Merged revisions 27137,27564,27566-27567,27578,27586,27599,27603,27606-27609,27611,27616,27626-27632,27640,27654-27656,27687,27701,27801,27816,27819,27843-27845,28087,28158-28161 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/HUDSON-2137
........
r27137 | kohsuke | 2010-02-08 08:46:16 -0800 (Mon, 08 Feb 2010) | 1 line
experimenting with abstractions
........
r27564 | kohsuke | 2010-02-16 07:58:26 -0800 (Tue, 16 Feb 2010) | 1 line
bundling makes it easier for caller to handle ConsoleAnnotator
........
r27566 | kohsuke | 2010-02-16 08:49:48 -0800 (Tue, 16 Feb 2010) | 1 line
this should work with Runs, not AbstractBuilds
........
r27567 | kohsuke | 2010-02-16 08:54:06 -0800 (Tue, 16 Feb 2010) | 1 line
simplified
........
r27578 | kohsuke | 2010-02-16 12:26:11 -0800 (Tue, 16 Feb 2010) | 1 line
still a work in progress, but committing once to pull in trunk changes
........
r27586 | kohsuke | 2010-02-16 14:35:37 -0800 (Tue, 16 Feb 2010) | 1 line
making more progress
........
r27599 | kohsuke | 2010-02-16 19:22:01 -0800 (Tue, 16 Feb 2010) | 2 lines
hooking up the side that writes annotations.
still a work in progress.
........
r27603 | kohsuke | 2010-02-16 23:43:35 -0800 (Tue, 16 Feb 2010) | 3 lines
what appears to me as the first cut of hooking up the reader side of the annotations.
I haven't even run it yet --- this just passed the compilation, and I'm calling it a day.
........
r27606 | kohsuke | 2010-02-17 09:15:16 -0800 (Wed, 17 Feb 2010) | 1 line
demo instance hook up
........
r27607 | kohsuke | 2010-02-17 11:27:02 -0800 (Wed, 17 Feb 2010) | 3 lines
one more utility method.
I never understood what the point of letting the skip method skip less.
........
r27608 | kohsuke | 2010-02-17 11:56:23 -0800 (Wed, 17 Feb 2010) | 3 lines
- moved LargeText subtype to its own class
- skipping log output was done incorrectly --- it had to skip N bytes where it was skipping N chars.
- hooked up console annotations for completed builds.
........
r27609 | kohsuke | 2010-02-17 12:01:46 -0800 (Wed, 17 Feb 2010) | 1 line
copyright header
........
r27611 | kohsuke | 2010-02-17 13:18:10 -0800 (Wed, 17 Feb 2010) | 1 line
introduced a mechanism to register extension during an unit test.
........
r27616 | kohsuke | 2010-02-17 13:38:12 -0800 (Wed, 17 Feb 2010) | 1 line
test case for console annotations
........
r27626 | kohsuke | 2010-02-17 15:23:06 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotator as I write tests as tests
........
r27627 | kohsuke | 2010-02-17 16:06:13 -0800 (Wed, 17 Feb 2010) | 1 line
added a multi-phase cooperative locking mechanism useful during the debugging
........
r27628 | kohsuke | 2010-02-17 16:06:41 -0800 (Wed, 17 Feb 2010) | 1 line
testing progressive log annotation
........
r27629 | kohsuke | 2010-02-17 16:20:32 -0800 (Wed, 17 Feb 2010) | 1 line
adding a test for ConsoleAnnotation that's explicitly placed.
........
r27630 | kohsuke | 2010-02-17 16:23:02 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotation as I write tests as tests
........
r27631 | kohsuke | 2010-02-17 16:28:50 -0800 (Wed, 17 Feb 2010) | 1 line
tweaking the abstraction a bit.
........
r27632 | kohsuke | 2010-02-17 16:44:21 -0800 (Wed, 17 Feb 2010) | 1 line
parameterized the context type so that this can be used in places other than the build console output, such as polling logs, slave logs, and so on.
........
r27640 | kohsuke | 2010-02-17 17:27:52 -0800 (Wed, 17 Feb 2010) | 1 line
bug fix
........
r27654 | kohsuke | 2010-02-17 22:53:04 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27655 | kohsuke | 2010-02-17 22:53:59 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27656 | kohsuke | 2010-02-17 23:10:42 -0800 (Wed, 17 Feb 2010) | 1 line
test case for adjacent tags
........
r27687 | kohsuke | 2010-02-19 14:39:21 -0800 (Fri, 19 Feb 2010) | 1 line
introduced a facotry and descriptor. This allows them to define configuration pages, allow users to disable/enable them, plus define custom behaviors.
........
r27701 | kohsuke | 2010-02-19 18:23:52 -0800 (Fri, 19 Feb 2010) | 1 line
defining a mechanism for ConsoleAnnotatorFactory and ConsoleAnnotationDescriptor to define script.js and have them imported into the console output page
........
r27801 | kohsuke | 2010-02-22 11:59:16 -0800 (Mon, 22 Feb 2010) | 1 line
now embedding annotations inside the console output log file.
........
r27816 | kohsuke | 2010-02-22 15:45:04 -0800 (Mon, 22 Feb 2010) | 1 line
introduced a convenience method for unit tests
........
r27819 | kohsuke | 2010-02-22 17:37:05 -0800 (Mon, 22 Feb 2010) | 5 lines
As an example of using embedded console annotations, implementing Ant target invocation outlines.
It might be better to make the concept of outline more generally reusable, so that different kinds of outlines can be placed into the same container element for a single hierarchical representation.
Still a work in progress.
........
r27843 | kohsuke | 2010-02-23 16:12:13 -0800 (Tue, 23 Feb 2010) | 1 line
for now, disable this for production usage, until I work out a better UI.
........
r27844 | kohsuke | 2010-02-23 19:08:00 -0800 (Tue, 23 Feb 2010) | 1 line
started working on annotating exception.
........
r27845 | kohsuke | 2010-02-23 19:08:33 -0800 (Tue, 23 Feb 2010) | 1 line
more TODOs for myself
........
r28087 | kohsuke | 2010-03-01 10:03:55 -0800 (Mon, 01 Mar 2010) | 1 line
formatting changes
........
r28158 | kohsuke | 2010-03-02 17:00:00 -0800 (Tue, 02 Mar 2010) | 1 line
ConsoleAnnotation and ConsoleAnnotator are too confusing.
........
r28159 | kohsuke | 2010-03-02 17:02:02 -0800 (Tue, 02 Mar 2010) | 1 line
doc improvement
........
r28160 | kohsuke | 2010-03-02 17:05:14 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvements.
........
r28161 | kohsuke | 2010-03-02 17:11:59 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvement
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28173 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-03 23:37:55 +08:00
|
|
|
|
2011-03-01 16:15:15 +08:00
|
|
|
public static Locale getCurrentLocale() {
|
|
|
|
Locale locale=null;
|
|
|
|
StaplerRequest req = Stapler.getCurrentRequest();
|
|
|
|
if(req!=null)
|
|
|
|
locale = req.getLocale();
|
|
|
|
if(locale==null)
|
|
|
|
locale = Locale.getDefault();
|
|
|
|
return locale;
|
|
|
|
}
|
|
|
|
|
[FIXED HUDSON-2137]
Merged revisions 27137,27564,27566-27567,27578,27586,27599,27603,27606-27609,27611,27616,27626-27632,27640,27654-27656,27687,27701,27801,27816,27819,27843-27845,28087,28158-28161 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/HUDSON-2137
........
r27137 | kohsuke | 2010-02-08 08:46:16 -0800 (Mon, 08 Feb 2010) | 1 line
experimenting with abstractions
........
r27564 | kohsuke | 2010-02-16 07:58:26 -0800 (Tue, 16 Feb 2010) | 1 line
bundling makes it easier for caller to handle ConsoleAnnotator
........
r27566 | kohsuke | 2010-02-16 08:49:48 -0800 (Tue, 16 Feb 2010) | 1 line
this should work with Runs, not AbstractBuilds
........
r27567 | kohsuke | 2010-02-16 08:54:06 -0800 (Tue, 16 Feb 2010) | 1 line
simplified
........
r27578 | kohsuke | 2010-02-16 12:26:11 -0800 (Tue, 16 Feb 2010) | 1 line
still a work in progress, but committing once to pull in trunk changes
........
r27586 | kohsuke | 2010-02-16 14:35:37 -0800 (Tue, 16 Feb 2010) | 1 line
making more progress
........
r27599 | kohsuke | 2010-02-16 19:22:01 -0800 (Tue, 16 Feb 2010) | 2 lines
hooking up the side that writes annotations.
still a work in progress.
........
r27603 | kohsuke | 2010-02-16 23:43:35 -0800 (Tue, 16 Feb 2010) | 3 lines
what appears to me as the first cut of hooking up the reader side of the annotations.
I haven't even run it yet --- this just passed the compilation, and I'm calling it a day.
........
r27606 | kohsuke | 2010-02-17 09:15:16 -0800 (Wed, 17 Feb 2010) | 1 line
demo instance hook up
........
r27607 | kohsuke | 2010-02-17 11:27:02 -0800 (Wed, 17 Feb 2010) | 3 lines
one more utility method.
I never understood what the point of letting the skip method skip less.
........
r27608 | kohsuke | 2010-02-17 11:56:23 -0800 (Wed, 17 Feb 2010) | 3 lines
- moved LargeText subtype to its own class
- skipping log output was done incorrectly --- it had to skip N bytes where it was skipping N chars.
- hooked up console annotations for completed builds.
........
r27609 | kohsuke | 2010-02-17 12:01:46 -0800 (Wed, 17 Feb 2010) | 1 line
copyright header
........
r27611 | kohsuke | 2010-02-17 13:18:10 -0800 (Wed, 17 Feb 2010) | 1 line
introduced a mechanism to register extension during an unit test.
........
r27616 | kohsuke | 2010-02-17 13:38:12 -0800 (Wed, 17 Feb 2010) | 1 line
test case for console annotations
........
r27626 | kohsuke | 2010-02-17 15:23:06 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotator as I write tests as tests
........
r27627 | kohsuke | 2010-02-17 16:06:13 -0800 (Wed, 17 Feb 2010) | 1 line
added a multi-phase cooperative locking mechanism useful during the debugging
........
r27628 | kohsuke | 2010-02-17 16:06:41 -0800 (Wed, 17 Feb 2010) | 1 line
testing progressive log annotation
........
r27629 | kohsuke | 2010-02-17 16:20:32 -0800 (Wed, 17 Feb 2010) | 1 line
adding a test for ConsoleAnnotation that's explicitly placed.
........
r27630 | kohsuke | 2010-02-17 16:23:02 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotation as I write tests as tests
........
r27631 | kohsuke | 2010-02-17 16:28:50 -0800 (Wed, 17 Feb 2010) | 1 line
tweaking the abstraction a bit.
........
r27632 | kohsuke | 2010-02-17 16:44:21 -0800 (Wed, 17 Feb 2010) | 1 line
parameterized the context type so that this can be used in places other than the build console output, such as polling logs, slave logs, and so on.
........
r27640 | kohsuke | 2010-02-17 17:27:52 -0800 (Wed, 17 Feb 2010) | 1 line
bug fix
........
r27654 | kohsuke | 2010-02-17 22:53:04 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27655 | kohsuke | 2010-02-17 22:53:59 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27656 | kohsuke | 2010-02-17 23:10:42 -0800 (Wed, 17 Feb 2010) | 1 line
test case for adjacent tags
........
r27687 | kohsuke | 2010-02-19 14:39:21 -0800 (Fri, 19 Feb 2010) | 1 line
introduced a facotry and descriptor. This allows them to define configuration pages, allow users to disable/enable them, plus define custom behaviors.
........
r27701 | kohsuke | 2010-02-19 18:23:52 -0800 (Fri, 19 Feb 2010) | 1 line
defining a mechanism for ConsoleAnnotatorFactory and ConsoleAnnotationDescriptor to define script.js and have them imported into the console output page
........
r27801 | kohsuke | 2010-02-22 11:59:16 -0800 (Mon, 22 Feb 2010) | 1 line
now embedding annotations inside the console output log file.
........
r27816 | kohsuke | 2010-02-22 15:45:04 -0800 (Mon, 22 Feb 2010) | 1 line
introduced a convenience method for unit tests
........
r27819 | kohsuke | 2010-02-22 17:37:05 -0800 (Mon, 22 Feb 2010) | 5 lines
As an example of using embedded console annotations, implementing Ant target invocation outlines.
It might be better to make the concept of outline more generally reusable, so that different kinds of outlines can be placed into the same container element for a single hierarchical representation.
Still a work in progress.
........
r27843 | kohsuke | 2010-02-23 16:12:13 -0800 (Tue, 23 Feb 2010) | 1 line
for now, disable this for production usage, until I work out a better UI.
........
r27844 | kohsuke | 2010-02-23 19:08:00 -0800 (Tue, 23 Feb 2010) | 1 line
started working on annotating exception.
........
r27845 | kohsuke | 2010-02-23 19:08:33 -0800 (Tue, 23 Feb 2010) | 1 line
more TODOs for myself
........
r28087 | kohsuke | 2010-03-01 10:03:55 -0800 (Mon, 01 Mar 2010) | 1 line
formatting changes
........
r28158 | kohsuke | 2010-03-02 17:00:00 -0800 (Tue, 02 Mar 2010) | 1 line
ConsoleAnnotation and ConsoleAnnotator are too confusing.
........
r28159 | kohsuke | 2010-03-02 17:02:02 -0800 (Tue, 02 Mar 2010) | 1 line
doc improvement
........
r28160 | kohsuke | 2010-03-02 17:05:14 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvements.
........
r28161 | kohsuke | 2010-03-02 17:11:59 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvement
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28173 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-03 23:37:55 +08:00
|
|
|
/**
|
|
|
|
* Generate a series of <script> tags to include <tt>script.js</tt>
|
|
|
|
* from {@link ConsoleAnnotatorFactory}s and {@link ConsoleAnnotationDescriptor}s.
|
|
|
|
*/
|
2010-08-31 02:35:47 +08:00
|
|
|
public static String generateConsoleAnnotationScriptAndStylesheet() {
|
[FIXED HUDSON-2137]
Merged revisions 27137,27564,27566-27567,27578,27586,27599,27603,27606-27609,27611,27616,27626-27632,27640,27654-27656,27687,27701,27801,27816,27819,27843-27845,28087,28158-28161 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/HUDSON-2137
........
r27137 | kohsuke | 2010-02-08 08:46:16 -0800 (Mon, 08 Feb 2010) | 1 line
experimenting with abstractions
........
r27564 | kohsuke | 2010-02-16 07:58:26 -0800 (Tue, 16 Feb 2010) | 1 line
bundling makes it easier for caller to handle ConsoleAnnotator
........
r27566 | kohsuke | 2010-02-16 08:49:48 -0800 (Tue, 16 Feb 2010) | 1 line
this should work with Runs, not AbstractBuilds
........
r27567 | kohsuke | 2010-02-16 08:54:06 -0800 (Tue, 16 Feb 2010) | 1 line
simplified
........
r27578 | kohsuke | 2010-02-16 12:26:11 -0800 (Tue, 16 Feb 2010) | 1 line
still a work in progress, but committing once to pull in trunk changes
........
r27586 | kohsuke | 2010-02-16 14:35:37 -0800 (Tue, 16 Feb 2010) | 1 line
making more progress
........
r27599 | kohsuke | 2010-02-16 19:22:01 -0800 (Tue, 16 Feb 2010) | 2 lines
hooking up the side that writes annotations.
still a work in progress.
........
r27603 | kohsuke | 2010-02-16 23:43:35 -0800 (Tue, 16 Feb 2010) | 3 lines
what appears to me as the first cut of hooking up the reader side of the annotations.
I haven't even run it yet --- this just passed the compilation, and I'm calling it a day.
........
r27606 | kohsuke | 2010-02-17 09:15:16 -0800 (Wed, 17 Feb 2010) | 1 line
demo instance hook up
........
r27607 | kohsuke | 2010-02-17 11:27:02 -0800 (Wed, 17 Feb 2010) | 3 lines
one more utility method.
I never understood what the point of letting the skip method skip less.
........
r27608 | kohsuke | 2010-02-17 11:56:23 -0800 (Wed, 17 Feb 2010) | 3 lines
- moved LargeText subtype to its own class
- skipping log output was done incorrectly --- it had to skip N bytes where it was skipping N chars.
- hooked up console annotations for completed builds.
........
r27609 | kohsuke | 2010-02-17 12:01:46 -0800 (Wed, 17 Feb 2010) | 1 line
copyright header
........
r27611 | kohsuke | 2010-02-17 13:18:10 -0800 (Wed, 17 Feb 2010) | 1 line
introduced a mechanism to register extension during an unit test.
........
r27616 | kohsuke | 2010-02-17 13:38:12 -0800 (Wed, 17 Feb 2010) | 1 line
test case for console annotations
........
r27626 | kohsuke | 2010-02-17 15:23:06 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotator as I write tests as tests
........
r27627 | kohsuke | 2010-02-17 16:06:13 -0800 (Wed, 17 Feb 2010) | 1 line
added a multi-phase cooperative locking mechanism useful during the debugging
........
r27628 | kohsuke | 2010-02-17 16:06:41 -0800 (Wed, 17 Feb 2010) | 1 line
testing progressive log annotation
........
r27629 | kohsuke | 2010-02-17 16:20:32 -0800 (Wed, 17 Feb 2010) | 1 line
adding a test for ConsoleAnnotation that's explicitly placed.
........
r27630 | kohsuke | 2010-02-17 16:23:02 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotation as I write tests as tests
........
r27631 | kohsuke | 2010-02-17 16:28:50 -0800 (Wed, 17 Feb 2010) | 1 line
tweaking the abstraction a bit.
........
r27632 | kohsuke | 2010-02-17 16:44:21 -0800 (Wed, 17 Feb 2010) | 1 line
parameterized the context type so that this can be used in places other than the build console output, such as polling logs, slave logs, and so on.
........
r27640 | kohsuke | 2010-02-17 17:27:52 -0800 (Wed, 17 Feb 2010) | 1 line
bug fix
........
r27654 | kohsuke | 2010-02-17 22:53:04 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27655 | kohsuke | 2010-02-17 22:53:59 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27656 | kohsuke | 2010-02-17 23:10:42 -0800 (Wed, 17 Feb 2010) | 1 line
test case for adjacent tags
........
r27687 | kohsuke | 2010-02-19 14:39:21 -0800 (Fri, 19 Feb 2010) | 1 line
introduced a facotry and descriptor. This allows them to define configuration pages, allow users to disable/enable them, plus define custom behaviors.
........
r27701 | kohsuke | 2010-02-19 18:23:52 -0800 (Fri, 19 Feb 2010) | 1 line
defining a mechanism for ConsoleAnnotatorFactory and ConsoleAnnotationDescriptor to define script.js and have them imported into the console output page
........
r27801 | kohsuke | 2010-02-22 11:59:16 -0800 (Mon, 22 Feb 2010) | 1 line
now embedding annotations inside the console output log file.
........
r27816 | kohsuke | 2010-02-22 15:45:04 -0800 (Mon, 22 Feb 2010) | 1 line
introduced a convenience method for unit tests
........
r27819 | kohsuke | 2010-02-22 17:37:05 -0800 (Mon, 22 Feb 2010) | 5 lines
As an example of using embedded console annotations, implementing Ant target invocation outlines.
It might be better to make the concept of outline more generally reusable, so that different kinds of outlines can be placed into the same container element for a single hierarchical representation.
Still a work in progress.
........
r27843 | kohsuke | 2010-02-23 16:12:13 -0800 (Tue, 23 Feb 2010) | 1 line
for now, disable this for production usage, until I work out a better UI.
........
r27844 | kohsuke | 2010-02-23 19:08:00 -0800 (Tue, 23 Feb 2010) | 1 line
started working on annotating exception.
........
r27845 | kohsuke | 2010-02-23 19:08:33 -0800 (Tue, 23 Feb 2010) | 1 line
more TODOs for myself
........
r28087 | kohsuke | 2010-03-01 10:03:55 -0800 (Mon, 01 Mar 2010) | 1 line
formatting changes
........
r28158 | kohsuke | 2010-03-02 17:00:00 -0800 (Tue, 02 Mar 2010) | 1 line
ConsoleAnnotation and ConsoleAnnotator are too confusing.
........
r28159 | kohsuke | 2010-03-02 17:02:02 -0800 (Tue, 02 Mar 2010) | 1 line
doc improvement
........
r28160 | kohsuke | 2010-03-02 17:05:14 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvements.
........
r28161 | kohsuke | 2010-03-02 17:11:59 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvement
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28173 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-03 23:37:55 +08:00
|
|
|
String cp = Stapler.getCurrentRequest().getContextPath();
|
|
|
|
StringBuilder buf = new StringBuilder();
|
|
|
|
for (ConsoleAnnotatorFactory f : ConsoleAnnotatorFactory.all()) {
|
2010-08-31 02:35:47 +08:00
|
|
|
String path = cp + "/extensionList/" + ConsoleAnnotatorFactory.class.getName() + "/" + f.getClass().getName();
|
[FIXED HUDSON-2137]
Merged revisions 27137,27564,27566-27567,27578,27586,27599,27603,27606-27609,27611,27616,27626-27632,27640,27654-27656,27687,27701,27801,27816,27819,27843-27845,28087,28158-28161 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/HUDSON-2137
........
r27137 | kohsuke | 2010-02-08 08:46:16 -0800 (Mon, 08 Feb 2010) | 1 line
experimenting with abstractions
........
r27564 | kohsuke | 2010-02-16 07:58:26 -0800 (Tue, 16 Feb 2010) | 1 line
bundling makes it easier for caller to handle ConsoleAnnotator
........
r27566 | kohsuke | 2010-02-16 08:49:48 -0800 (Tue, 16 Feb 2010) | 1 line
this should work with Runs, not AbstractBuilds
........
r27567 | kohsuke | 2010-02-16 08:54:06 -0800 (Tue, 16 Feb 2010) | 1 line
simplified
........
r27578 | kohsuke | 2010-02-16 12:26:11 -0800 (Tue, 16 Feb 2010) | 1 line
still a work in progress, but committing once to pull in trunk changes
........
r27586 | kohsuke | 2010-02-16 14:35:37 -0800 (Tue, 16 Feb 2010) | 1 line
making more progress
........
r27599 | kohsuke | 2010-02-16 19:22:01 -0800 (Tue, 16 Feb 2010) | 2 lines
hooking up the side that writes annotations.
still a work in progress.
........
r27603 | kohsuke | 2010-02-16 23:43:35 -0800 (Tue, 16 Feb 2010) | 3 lines
what appears to me as the first cut of hooking up the reader side of the annotations.
I haven't even run it yet --- this just passed the compilation, and I'm calling it a day.
........
r27606 | kohsuke | 2010-02-17 09:15:16 -0800 (Wed, 17 Feb 2010) | 1 line
demo instance hook up
........
r27607 | kohsuke | 2010-02-17 11:27:02 -0800 (Wed, 17 Feb 2010) | 3 lines
one more utility method.
I never understood what the point of letting the skip method skip less.
........
r27608 | kohsuke | 2010-02-17 11:56:23 -0800 (Wed, 17 Feb 2010) | 3 lines
- moved LargeText subtype to its own class
- skipping log output was done incorrectly --- it had to skip N bytes where it was skipping N chars.
- hooked up console annotations for completed builds.
........
r27609 | kohsuke | 2010-02-17 12:01:46 -0800 (Wed, 17 Feb 2010) | 1 line
copyright header
........
r27611 | kohsuke | 2010-02-17 13:18:10 -0800 (Wed, 17 Feb 2010) | 1 line
introduced a mechanism to register extension during an unit test.
........
r27616 | kohsuke | 2010-02-17 13:38:12 -0800 (Wed, 17 Feb 2010) | 1 line
test case for console annotations
........
r27626 | kohsuke | 2010-02-17 15:23:06 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotator as I write tests as tests
........
r27627 | kohsuke | 2010-02-17 16:06:13 -0800 (Wed, 17 Feb 2010) | 1 line
added a multi-phase cooperative locking mechanism useful during the debugging
........
r27628 | kohsuke | 2010-02-17 16:06:41 -0800 (Wed, 17 Feb 2010) | 1 line
testing progressive log annotation
........
r27629 | kohsuke | 2010-02-17 16:20:32 -0800 (Wed, 17 Feb 2010) | 1 line
adding a test for ConsoleAnnotation that's explicitly placed.
........
r27630 | kohsuke | 2010-02-17 16:23:02 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotation as I write tests as tests
........
r27631 | kohsuke | 2010-02-17 16:28:50 -0800 (Wed, 17 Feb 2010) | 1 line
tweaking the abstraction a bit.
........
r27632 | kohsuke | 2010-02-17 16:44:21 -0800 (Wed, 17 Feb 2010) | 1 line
parameterized the context type so that this can be used in places other than the build console output, such as polling logs, slave logs, and so on.
........
r27640 | kohsuke | 2010-02-17 17:27:52 -0800 (Wed, 17 Feb 2010) | 1 line
bug fix
........
r27654 | kohsuke | 2010-02-17 22:53:04 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27655 | kohsuke | 2010-02-17 22:53:59 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27656 | kohsuke | 2010-02-17 23:10:42 -0800 (Wed, 17 Feb 2010) | 1 line
test case for adjacent tags
........
r27687 | kohsuke | 2010-02-19 14:39:21 -0800 (Fri, 19 Feb 2010) | 1 line
introduced a facotry and descriptor. This allows them to define configuration pages, allow users to disable/enable them, plus define custom behaviors.
........
r27701 | kohsuke | 2010-02-19 18:23:52 -0800 (Fri, 19 Feb 2010) | 1 line
defining a mechanism for ConsoleAnnotatorFactory and ConsoleAnnotationDescriptor to define script.js and have them imported into the console output page
........
r27801 | kohsuke | 2010-02-22 11:59:16 -0800 (Mon, 22 Feb 2010) | 1 line
now embedding annotations inside the console output log file.
........
r27816 | kohsuke | 2010-02-22 15:45:04 -0800 (Mon, 22 Feb 2010) | 1 line
introduced a convenience method for unit tests
........
r27819 | kohsuke | 2010-02-22 17:37:05 -0800 (Mon, 22 Feb 2010) | 5 lines
As an example of using embedded console annotations, implementing Ant target invocation outlines.
It might be better to make the concept of outline more generally reusable, so that different kinds of outlines can be placed into the same container element for a single hierarchical representation.
Still a work in progress.
........
r27843 | kohsuke | 2010-02-23 16:12:13 -0800 (Tue, 23 Feb 2010) | 1 line
for now, disable this for production usage, until I work out a better UI.
........
r27844 | kohsuke | 2010-02-23 19:08:00 -0800 (Tue, 23 Feb 2010) | 1 line
started working on annotating exception.
........
r27845 | kohsuke | 2010-02-23 19:08:33 -0800 (Tue, 23 Feb 2010) | 1 line
more TODOs for myself
........
r28087 | kohsuke | 2010-03-01 10:03:55 -0800 (Mon, 01 Mar 2010) | 1 line
formatting changes
........
r28158 | kohsuke | 2010-03-02 17:00:00 -0800 (Tue, 02 Mar 2010) | 1 line
ConsoleAnnotation and ConsoleAnnotator are too confusing.
........
r28159 | kohsuke | 2010-03-02 17:02:02 -0800 (Tue, 02 Mar 2010) | 1 line
doc improvement
........
r28160 | kohsuke | 2010-03-02 17:05:14 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvements.
........
r28161 | kohsuke | 2010-03-02 17:11:59 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvement
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28173 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-03 23:37:55 +08:00
|
|
|
if (f.hasScript())
|
2010-08-31 02:35:47 +08:00
|
|
|
buf.append("<script src='"+path+"/script.js'></script>");
|
|
|
|
if (f.hasStylesheet())
|
|
|
|
buf.append("<link rel='stylesheet' type='text/css' href='"+path+"/style.css' />");
|
[FIXED HUDSON-2137]
Merged revisions 27137,27564,27566-27567,27578,27586,27599,27603,27606-27609,27611,27616,27626-27632,27640,27654-27656,27687,27701,27801,27816,27819,27843-27845,28087,28158-28161 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/HUDSON-2137
........
r27137 | kohsuke | 2010-02-08 08:46:16 -0800 (Mon, 08 Feb 2010) | 1 line
experimenting with abstractions
........
r27564 | kohsuke | 2010-02-16 07:58:26 -0800 (Tue, 16 Feb 2010) | 1 line
bundling makes it easier for caller to handle ConsoleAnnotator
........
r27566 | kohsuke | 2010-02-16 08:49:48 -0800 (Tue, 16 Feb 2010) | 1 line
this should work with Runs, not AbstractBuilds
........
r27567 | kohsuke | 2010-02-16 08:54:06 -0800 (Tue, 16 Feb 2010) | 1 line
simplified
........
r27578 | kohsuke | 2010-02-16 12:26:11 -0800 (Tue, 16 Feb 2010) | 1 line
still a work in progress, but committing once to pull in trunk changes
........
r27586 | kohsuke | 2010-02-16 14:35:37 -0800 (Tue, 16 Feb 2010) | 1 line
making more progress
........
r27599 | kohsuke | 2010-02-16 19:22:01 -0800 (Tue, 16 Feb 2010) | 2 lines
hooking up the side that writes annotations.
still a work in progress.
........
r27603 | kohsuke | 2010-02-16 23:43:35 -0800 (Tue, 16 Feb 2010) | 3 lines
what appears to me as the first cut of hooking up the reader side of the annotations.
I haven't even run it yet --- this just passed the compilation, and I'm calling it a day.
........
r27606 | kohsuke | 2010-02-17 09:15:16 -0800 (Wed, 17 Feb 2010) | 1 line
demo instance hook up
........
r27607 | kohsuke | 2010-02-17 11:27:02 -0800 (Wed, 17 Feb 2010) | 3 lines
one more utility method.
I never understood what the point of letting the skip method skip less.
........
r27608 | kohsuke | 2010-02-17 11:56:23 -0800 (Wed, 17 Feb 2010) | 3 lines
- moved LargeText subtype to its own class
- skipping log output was done incorrectly --- it had to skip N bytes where it was skipping N chars.
- hooked up console annotations for completed builds.
........
r27609 | kohsuke | 2010-02-17 12:01:46 -0800 (Wed, 17 Feb 2010) | 1 line
copyright header
........
r27611 | kohsuke | 2010-02-17 13:18:10 -0800 (Wed, 17 Feb 2010) | 1 line
introduced a mechanism to register extension during an unit test.
........
r27616 | kohsuke | 2010-02-17 13:38:12 -0800 (Wed, 17 Feb 2010) | 1 line
test case for console annotations
........
r27626 | kohsuke | 2010-02-17 15:23:06 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotator as I write tests as tests
........
r27627 | kohsuke | 2010-02-17 16:06:13 -0800 (Wed, 17 Feb 2010) | 1 line
added a multi-phase cooperative locking mechanism useful during the debugging
........
r27628 | kohsuke | 2010-02-17 16:06:41 -0800 (Wed, 17 Feb 2010) | 1 line
testing progressive log annotation
........
r27629 | kohsuke | 2010-02-17 16:20:32 -0800 (Wed, 17 Feb 2010) | 1 line
adding a test for ConsoleAnnotation that's explicitly placed.
........
r27630 | kohsuke | 2010-02-17 16:23:02 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotation as I write tests as tests
........
r27631 | kohsuke | 2010-02-17 16:28:50 -0800 (Wed, 17 Feb 2010) | 1 line
tweaking the abstraction a bit.
........
r27632 | kohsuke | 2010-02-17 16:44:21 -0800 (Wed, 17 Feb 2010) | 1 line
parameterized the context type so that this can be used in places other than the build console output, such as polling logs, slave logs, and so on.
........
r27640 | kohsuke | 2010-02-17 17:27:52 -0800 (Wed, 17 Feb 2010) | 1 line
bug fix
........
r27654 | kohsuke | 2010-02-17 22:53:04 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27655 | kohsuke | 2010-02-17 22:53:59 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27656 | kohsuke | 2010-02-17 23:10:42 -0800 (Wed, 17 Feb 2010) | 1 line
test case for adjacent tags
........
r27687 | kohsuke | 2010-02-19 14:39:21 -0800 (Fri, 19 Feb 2010) | 1 line
introduced a facotry and descriptor. This allows them to define configuration pages, allow users to disable/enable them, plus define custom behaviors.
........
r27701 | kohsuke | 2010-02-19 18:23:52 -0800 (Fri, 19 Feb 2010) | 1 line
defining a mechanism for ConsoleAnnotatorFactory and ConsoleAnnotationDescriptor to define script.js and have them imported into the console output page
........
r27801 | kohsuke | 2010-02-22 11:59:16 -0800 (Mon, 22 Feb 2010) | 1 line
now embedding annotations inside the console output log file.
........
r27816 | kohsuke | 2010-02-22 15:45:04 -0800 (Mon, 22 Feb 2010) | 1 line
introduced a convenience method for unit tests
........
r27819 | kohsuke | 2010-02-22 17:37:05 -0800 (Mon, 22 Feb 2010) | 5 lines
As an example of using embedded console annotations, implementing Ant target invocation outlines.
It might be better to make the concept of outline more generally reusable, so that different kinds of outlines can be placed into the same container element for a single hierarchical representation.
Still a work in progress.
........
r27843 | kohsuke | 2010-02-23 16:12:13 -0800 (Tue, 23 Feb 2010) | 1 line
for now, disable this for production usage, until I work out a better UI.
........
r27844 | kohsuke | 2010-02-23 19:08:00 -0800 (Tue, 23 Feb 2010) | 1 line
started working on annotating exception.
........
r27845 | kohsuke | 2010-02-23 19:08:33 -0800 (Tue, 23 Feb 2010) | 1 line
more TODOs for myself
........
r28087 | kohsuke | 2010-03-01 10:03:55 -0800 (Mon, 01 Mar 2010) | 1 line
formatting changes
........
r28158 | kohsuke | 2010-03-02 17:00:00 -0800 (Tue, 02 Mar 2010) | 1 line
ConsoleAnnotation and ConsoleAnnotator are too confusing.
........
r28159 | kohsuke | 2010-03-02 17:02:02 -0800 (Tue, 02 Mar 2010) | 1 line
doc improvement
........
r28160 | kohsuke | 2010-03-02 17:05:14 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvements.
........
r28161 | kohsuke | 2010-03-02 17:11:59 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvement
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28173 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-03 23:37:55 +08:00
|
|
|
}
|
|
|
|
for (ConsoleAnnotationDescriptor d : ConsoleAnnotationDescriptor.all()) {
|
2010-08-31 02:35:47 +08:00
|
|
|
String path = cp+"/descriptor/"+d.clazz.getName();
|
[FIXED HUDSON-2137]
Merged revisions 27137,27564,27566-27567,27578,27586,27599,27603,27606-27609,27611,27616,27626-27632,27640,27654-27656,27687,27701,27801,27816,27819,27843-27845,28087,28158-28161 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/HUDSON-2137
........
r27137 | kohsuke | 2010-02-08 08:46:16 -0800 (Mon, 08 Feb 2010) | 1 line
experimenting with abstractions
........
r27564 | kohsuke | 2010-02-16 07:58:26 -0800 (Tue, 16 Feb 2010) | 1 line
bundling makes it easier for caller to handle ConsoleAnnotator
........
r27566 | kohsuke | 2010-02-16 08:49:48 -0800 (Tue, 16 Feb 2010) | 1 line
this should work with Runs, not AbstractBuilds
........
r27567 | kohsuke | 2010-02-16 08:54:06 -0800 (Tue, 16 Feb 2010) | 1 line
simplified
........
r27578 | kohsuke | 2010-02-16 12:26:11 -0800 (Tue, 16 Feb 2010) | 1 line
still a work in progress, but committing once to pull in trunk changes
........
r27586 | kohsuke | 2010-02-16 14:35:37 -0800 (Tue, 16 Feb 2010) | 1 line
making more progress
........
r27599 | kohsuke | 2010-02-16 19:22:01 -0800 (Tue, 16 Feb 2010) | 2 lines
hooking up the side that writes annotations.
still a work in progress.
........
r27603 | kohsuke | 2010-02-16 23:43:35 -0800 (Tue, 16 Feb 2010) | 3 lines
what appears to me as the first cut of hooking up the reader side of the annotations.
I haven't even run it yet --- this just passed the compilation, and I'm calling it a day.
........
r27606 | kohsuke | 2010-02-17 09:15:16 -0800 (Wed, 17 Feb 2010) | 1 line
demo instance hook up
........
r27607 | kohsuke | 2010-02-17 11:27:02 -0800 (Wed, 17 Feb 2010) | 3 lines
one more utility method.
I never understood what the point of letting the skip method skip less.
........
r27608 | kohsuke | 2010-02-17 11:56:23 -0800 (Wed, 17 Feb 2010) | 3 lines
- moved LargeText subtype to its own class
- skipping log output was done incorrectly --- it had to skip N bytes where it was skipping N chars.
- hooked up console annotations for completed builds.
........
r27609 | kohsuke | 2010-02-17 12:01:46 -0800 (Wed, 17 Feb 2010) | 1 line
copyright header
........
r27611 | kohsuke | 2010-02-17 13:18:10 -0800 (Wed, 17 Feb 2010) | 1 line
introduced a mechanism to register extension during an unit test.
........
r27616 | kohsuke | 2010-02-17 13:38:12 -0800 (Wed, 17 Feb 2010) | 1 line
test case for console annotations
........
r27626 | kohsuke | 2010-02-17 15:23:06 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotator as I write tests as tests
........
r27627 | kohsuke | 2010-02-17 16:06:13 -0800 (Wed, 17 Feb 2010) | 1 line
added a multi-phase cooperative locking mechanism useful during the debugging
........
r27628 | kohsuke | 2010-02-17 16:06:41 -0800 (Wed, 17 Feb 2010) | 1 line
testing progressive log annotation
........
r27629 | kohsuke | 2010-02-17 16:20:32 -0800 (Wed, 17 Feb 2010) | 1 line
adding a test for ConsoleAnnotation that's explicitly placed.
........
r27630 | kohsuke | 2010-02-17 16:23:02 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotation as I write tests as tests
........
r27631 | kohsuke | 2010-02-17 16:28:50 -0800 (Wed, 17 Feb 2010) | 1 line
tweaking the abstraction a bit.
........
r27632 | kohsuke | 2010-02-17 16:44:21 -0800 (Wed, 17 Feb 2010) | 1 line
parameterized the context type so that this can be used in places other than the build console output, such as polling logs, slave logs, and so on.
........
r27640 | kohsuke | 2010-02-17 17:27:52 -0800 (Wed, 17 Feb 2010) | 1 line
bug fix
........
r27654 | kohsuke | 2010-02-17 22:53:04 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27655 | kohsuke | 2010-02-17 22:53:59 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27656 | kohsuke | 2010-02-17 23:10:42 -0800 (Wed, 17 Feb 2010) | 1 line
test case for adjacent tags
........
r27687 | kohsuke | 2010-02-19 14:39:21 -0800 (Fri, 19 Feb 2010) | 1 line
introduced a facotry and descriptor. This allows them to define configuration pages, allow users to disable/enable them, plus define custom behaviors.
........
r27701 | kohsuke | 2010-02-19 18:23:52 -0800 (Fri, 19 Feb 2010) | 1 line
defining a mechanism for ConsoleAnnotatorFactory and ConsoleAnnotationDescriptor to define script.js and have them imported into the console output page
........
r27801 | kohsuke | 2010-02-22 11:59:16 -0800 (Mon, 22 Feb 2010) | 1 line
now embedding annotations inside the console output log file.
........
r27816 | kohsuke | 2010-02-22 15:45:04 -0800 (Mon, 22 Feb 2010) | 1 line
introduced a convenience method for unit tests
........
r27819 | kohsuke | 2010-02-22 17:37:05 -0800 (Mon, 22 Feb 2010) | 5 lines
As an example of using embedded console annotations, implementing Ant target invocation outlines.
It might be better to make the concept of outline more generally reusable, so that different kinds of outlines can be placed into the same container element for a single hierarchical representation.
Still a work in progress.
........
r27843 | kohsuke | 2010-02-23 16:12:13 -0800 (Tue, 23 Feb 2010) | 1 line
for now, disable this for production usage, until I work out a better UI.
........
r27844 | kohsuke | 2010-02-23 19:08:00 -0800 (Tue, 23 Feb 2010) | 1 line
started working on annotating exception.
........
r27845 | kohsuke | 2010-02-23 19:08:33 -0800 (Tue, 23 Feb 2010) | 1 line
more TODOs for myself
........
r28087 | kohsuke | 2010-03-01 10:03:55 -0800 (Mon, 01 Mar 2010) | 1 line
formatting changes
........
r28158 | kohsuke | 2010-03-02 17:00:00 -0800 (Tue, 02 Mar 2010) | 1 line
ConsoleAnnotation and ConsoleAnnotator are too confusing.
........
r28159 | kohsuke | 2010-03-02 17:02:02 -0800 (Tue, 02 Mar 2010) | 1 line
doc improvement
........
r28160 | kohsuke | 2010-03-02 17:05:14 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvements.
........
r28161 | kohsuke | 2010-03-02 17:11:59 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvement
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28173 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-03 23:37:55 +08:00
|
|
|
if (d.hasScript())
|
2010-08-31 02:35:47 +08:00
|
|
|
buf.append("<script src='"+path+"/script.js'></script>");
|
|
|
|
if (d.hasStylesheet())
|
|
|
|
buf.append("<link rel='stylesheet' type='text/css' href='"+path+"/style.css' />");
|
[FIXED HUDSON-2137]
Merged revisions 27137,27564,27566-27567,27578,27586,27599,27603,27606-27609,27611,27616,27626-27632,27640,27654-27656,27687,27701,27801,27816,27819,27843-27845,28087,28158-28161 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/HUDSON-2137
........
r27137 | kohsuke | 2010-02-08 08:46:16 -0800 (Mon, 08 Feb 2010) | 1 line
experimenting with abstractions
........
r27564 | kohsuke | 2010-02-16 07:58:26 -0800 (Tue, 16 Feb 2010) | 1 line
bundling makes it easier for caller to handle ConsoleAnnotator
........
r27566 | kohsuke | 2010-02-16 08:49:48 -0800 (Tue, 16 Feb 2010) | 1 line
this should work with Runs, not AbstractBuilds
........
r27567 | kohsuke | 2010-02-16 08:54:06 -0800 (Tue, 16 Feb 2010) | 1 line
simplified
........
r27578 | kohsuke | 2010-02-16 12:26:11 -0800 (Tue, 16 Feb 2010) | 1 line
still a work in progress, but committing once to pull in trunk changes
........
r27586 | kohsuke | 2010-02-16 14:35:37 -0800 (Tue, 16 Feb 2010) | 1 line
making more progress
........
r27599 | kohsuke | 2010-02-16 19:22:01 -0800 (Tue, 16 Feb 2010) | 2 lines
hooking up the side that writes annotations.
still a work in progress.
........
r27603 | kohsuke | 2010-02-16 23:43:35 -0800 (Tue, 16 Feb 2010) | 3 lines
what appears to me as the first cut of hooking up the reader side of the annotations.
I haven't even run it yet --- this just passed the compilation, and I'm calling it a day.
........
r27606 | kohsuke | 2010-02-17 09:15:16 -0800 (Wed, 17 Feb 2010) | 1 line
demo instance hook up
........
r27607 | kohsuke | 2010-02-17 11:27:02 -0800 (Wed, 17 Feb 2010) | 3 lines
one more utility method.
I never understood what the point of letting the skip method skip less.
........
r27608 | kohsuke | 2010-02-17 11:56:23 -0800 (Wed, 17 Feb 2010) | 3 lines
- moved LargeText subtype to its own class
- skipping log output was done incorrectly --- it had to skip N bytes where it was skipping N chars.
- hooked up console annotations for completed builds.
........
r27609 | kohsuke | 2010-02-17 12:01:46 -0800 (Wed, 17 Feb 2010) | 1 line
copyright header
........
r27611 | kohsuke | 2010-02-17 13:18:10 -0800 (Wed, 17 Feb 2010) | 1 line
introduced a mechanism to register extension during an unit test.
........
r27616 | kohsuke | 2010-02-17 13:38:12 -0800 (Wed, 17 Feb 2010) | 1 line
test case for console annotations
........
r27626 | kohsuke | 2010-02-17 15:23:06 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotator as I write tests as tests
........
r27627 | kohsuke | 2010-02-17 16:06:13 -0800 (Wed, 17 Feb 2010) | 1 line
added a multi-phase cooperative locking mechanism useful during the debugging
........
r27628 | kohsuke | 2010-02-17 16:06:41 -0800 (Wed, 17 Feb 2010) | 1 line
testing progressive log annotation
........
r27629 | kohsuke | 2010-02-17 16:20:32 -0800 (Wed, 17 Feb 2010) | 1 line
adding a test for ConsoleAnnotation that's explicitly placed.
........
r27630 | kohsuke | 2010-02-17 16:23:02 -0800 (Wed, 17 Feb 2010) | 1 line
removing test ConsoleAnnotation as I write tests as tests
........
r27631 | kohsuke | 2010-02-17 16:28:50 -0800 (Wed, 17 Feb 2010) | 1 line
tweaking the abstraction a bit.
........
r27632 | kohsuke | 2010-02-17 16:44:21 -0800 (Wed, 17 Feb 2010) | 1 line
parameterized the context type so that this can be used in places other than the build console output, such as polling logs, slave logs, and so on.
........
r27640 | kohsuke | 2010-02-17 17:27:52 -0800 (Wed, 17 Feb 2010) | 1 line
bug fix
........
r27654 | kohsuke | 2010-02-17 22:53:04 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27655 | kohsuke | 2010-02-17 22:53:59 -0800 (Wed, 17 Feb 2010) | 1 line
doc improvement
........
r27656 | kohsuke | 2010-02-17 23:10:42 -0800 (Wed, 17 Feb 2010) | 1 line
test case for adjacent tags
........
r27687 | kohsuke | 2010-02-19 14:39:21 -0800 (Fri, 19 Feb 2010) | 1 line
introduced a facotry and descriptor. This allows them to define configuration pages, allow users to disable/enable them, plus define custom behaviors.
........
r27701 | kohsuke | 2010-02-19 18:23:52 -0800 (Fri, 19 Feb 2010) | 1 line
defining a mechanism for ConsoleAnnotatorFactory and ConsoleAnnotationDescriptor to define script.js and have them imported into the console output page
........
r27801 | kohsuke | 2010-02-22 11:59:16 -0800 (Mon, 22 Feb 2010) | 1 line
now embedding annotations inside the console output log file.
........
r27816 | kohsuke | 2010-02-22 15:45:04 -0800 (Mon, 22 Feb 2010) | 1 line
introduced a convenience method for unit tests
........
r27819 | kohsuke | 2010-02-22 17:37:05 -0800 (Mon, 22 Feb 2010) | 5 lines
As an example of using embedded console annotations, implementing Ant target invocation outlines.
It might be better to make the concept of outline more generally reusable, so that different kinds of outlines can be placed into the same container element for a single hierarchical representation.
Still a work in progress.
........
r27843 | kohsuke | 2010-02-23 16:12:13 -0800 (Tue, 23 Feb 2010) | 1 line
for now, disable this for production usage, until I work out a better UI.
........
r27844 | kohsuke | 2010-02-23 19:08:00 -0800 (Tue, 23 Feb 2010) | 1 line
started working on annotating exception.
........
r27845 | kohsuke | 2010-02-23 19:08:33 -0800 (Tue, 23 Feb 2010) | 1 line
more TODOs for myself
........
r28087 | kohsuke | 2010-03-01 10:03:55 -0800 (Mon, 01 Mar 2010) | 1 line
formatting changes
........
r28158 | kohsuke | 2010-03-02 17:00:00 -0800 (Tue, 02 Mar 2010) | 1 line
ConsoleAnnotation and ConsoleAnnotator are too confusing.
........
r28159 | kohsuke | 2010-03-02 17:02:02 -0800 (Tue, 02 Mar 2010) | 1 line
doc improvement
........
r28160 | kohsuke | 2010-03-02 17:05:14 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvements.
........
r28161 | kohsuke | 2010-03-02 17:11:59 -0800 (Tue, 02 Mar 2010) | 1 line
more doc improvement
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28173 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-03 23:37:55 +08:00
|
|
|
}
|
|
|
|
return buf.toString();
|
|
|
|
}
|
Merged revisions 29309-29311,29421,29449,29451,29459 via svnmerge from
https://svn.dev.java.net/svn/hudson/branches/rc
........
r29309 | kohsuke | 2010-03-26 14:44:45 -0700 (Fri, 26 Mar 2010) | 1 line
Work around for http://n4.nabble.com/hudson-logging-LogRecorderManagerTest-failing-tp1589811p1589811.html
........
r29310 | kohsuke | 2010-03-26 14:45:29 -0700 (Fri, 26 Mar 2010) | 1 line
unnecessary boxing
........
r29311 | kohsuke | 2010-03-26 16:00:41 -0700 (Fri, 26 Mar 2010) | 1 line
fixed a stability in the test.
........
r29421 | kohsuke | 2010-03-29 11:40:37 -0700 (Mon, 29 Mar 2010) | 1 line
improving the test stability
........
r29449 | kohsuke | 2010-03-29 18:08:26 -0700 (Mon, 29 Mar 2010) | 1 line
[maven-release-plugin] prepare release hudson-1_353
........
r29451 | kohsuke | 2010-03-29 18:08:46 -0700 (Mon, 29 Mar 2010) | 1 line
[maven-release-plugin] prepare for next development iteration
........
r29459 | kohsuke | 2010-03-29 19:20:42 -0700 (Mon, 29 Mar 2010) | 1 line
updated changelog as a part of the release
........
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29490 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-30 17:47:41 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Work around for bug 6935026.
|
|
|
|
*/
|
|
|
|
public List<String> getLoggerNames() {
|
|
|
|
while (true) {
|
|
|
|
try {
|
|
|
|
List<String> r = new ArrayList<String>();
|
|
|
|
Enumeration<String> e = LogManager.getLogManager().getLoggerNames();
|
|
|
|
while (e.hasMoreElements())
|
|
|
|
r.add(e.nextElement());
|
|
|
|
return r;
|
|
|
|
} catch (ConcurrentModificationException e) {
|
|
|
|
// retry
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-07-14 08:52:58 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used by <f:password/> so that we send an encrypted value to the client.
|
|
|
|
*/
|
|
|
|
public String getPasswordValue(Object o) {
|
|
|
|
if (o==null) return null;
|
|
|
|
if (o instanceof Secret) return ((Secret)o).getEncryptedValue();
|
|
|
|
return o.toString();
|
|
|
|
}
|
2010-12-30 16:06:40 +08:00
|
|
|
|
|
|
|
public List filterDescriptors(Object context, Iterable descriptors) {
|
|
|
|
return DescriptorVisibilityFilter.apply(context,descriptors);
|
|
|
|
}
|
2009-06-09 15:09:02 +08:00
|
|
|
|
2008-03-21 10:00:54 +08:00
|
|
|
private static final Pattern SCHEME = Pattern.compile("[a-z]+://.+");
|
2008-12-13 09:31:23 +08:00
|
|
|
|
|
|
|
/**
|
2009-09-05 12:49:03 +08:00
|
|
|
* Returns true if we are running unit tests.
|
2008-12-13 09:31:23 +08:00
|
|
|
*/
|
2009-09-05 12:49:03 +08:00
|
|
|
public static boolean getIsUnitTest() {
|
|
|
|
return Main.isUnitTest;
|
|
|
|
}
|
2010-08-27 21:36:27 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns {@code true} if the {@link Run#ARTIFACTS} permission is enabled,
|
|
|
|
* {@code false} otherwise.
|
|
|
|
*
|
|
|
|
* <p>When the {@link Run#ARTIFACTS} permission is not turned on using the
|
|
|
|
* {@code hudson.security.ArtifactsPermission}, this permission must not be
|
|
|
|
* considered to be set to {@code false} for every user. It must rather be
|
|
|
|
* like if the permission doesn't exist at all (which means that every user
|
|
|
|
* has to have an access to the artifacts but the permission can't be
|
|
|
|
* configured in the security screen). Got it?</p>
|
|
|
|
*/
|
|
|
|
public static boolean isArtifactsPermissionEnabled() {
|
|
|
|
return Boolean.getBoolean("hudson.security.ArtifactsPermission");
|
|
|
|
}
|
|
|
|
|
2011-03-11 08:42:49 +08:00
|
|
|
public static String createRenderOnDemandProxy(JellyContext context, String attributesToCapture) {
|
|
|
|
return Stapler.getCurrentRequest().createJavaScriptProxy(new RenderOnDemandClosure(context,attributesToCapture));
|
2011-03-11 07:35:48 +08:00
|
|
|
}
|
2011-03-20 06:11:16 +08:00
|
|
|
|
|
|
|
public static String getCurrentDescriptorByNameUrl() {
|
|
|
|
return Descriptor.getCurrentDescriptorByNameUrl();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static String setCurrentDescriptorByNameUrl(String value) {
|
|
|
|
String o = getCurrentDescriptorByNameUrl();
|
|
|
|
Stapler.getCurrentRequest().setAttribute("currentDescriptorByNameUrl", value);
|
|
|
|
|
|
|
|
return o;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void restoreCurrentDescriptorByNameUrl(String old) {
|
|
|
|
Stapler.getCurrentRequest().setAttribute("currentDescriptorByNameUrl", old);
|
|
|
|
}
|
2011-03-27 12:25:32 +08:00
|
|
|
|
|
|
|
public static List<String> getRequestHeaders(String name) {
|
|
|
|
List<String> r = new ArrayList<String>();
|
|
|
|
Enumeration e = Stapler.getCurrentRequest().getHeaders(name);
|
|
|
|
while (e.hasMoreElements()) {
|
|
|
|
r.add(e.nextElement().toString());
|
|
|
|
}
|
|
|
|
return r;
|
|
|
|
}
|
2011-04-12 15:15:30 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for arguments to internationalized expressions to avoid escape
|
|
|
|
*/
|
|
|
|
public static Object rawHtml(Object o) {
|
|
|
|
return o==null ? null : new RawHtmlArgument(o);
|
|
|
|
}
|
2011-05-28 23:44:48 +08:00
|
|
|
|
|
|
|
public static ArrayList<CLICommand> getCLICommands() {
|
|
|
|
ArrayList<CLICommand> all = new ArrayList<CLICommand>(CLICommand.all());
|
|
|
|
Collections.sort(all, new Comparator<CLICommand>() {
|
|
|
|
public int compare(CLICommand cliCommand, CLICommand cliCommand1) {
|
|
|
|
return cliCommand.getName().compareTo(cliCommand1.getName());
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return all;
|
|
|
|
}
|
|
|
|
|
2006-11-06 05:16:01 +08:00
|
|
|
}
|