Commit Graph
2297 Commits
Author SHA1 Message Date
Jesse Glick a4cabd511f [FIXED JENKINS-32525] Merged #2087. 2016-03-17 09:58:50 -04:00
Oliver Gondža 04c18430ad Merge pull request #1942 from pjanouse/JENKINS-31847
[JENKINS-31847] CLI command clear-queue extracted from core to CLI
2016-03-16 13:04:18 +01:00
Ing. Pavel Janousek 776f8f353c [JENKINS-32684] Improved test coverage of CLI command 'console' 2016-03-14 10:46:56 +01:00
Jesse Glick 6ae54add5d [FIXED JENKINS-33467] Do not store redundant copies of Cause in CauseAction. 2016-03-10 16:30:45 -05:00
Stephen Connolly 373bd8390c Merge remote-tracking branch 'jenkins/master' into alt-pr-2090 2016-03-09 12:31:28 +00:00
Stephen Connolly 58cd6f0ab1 [JENKINS-33414] Add a test case that verifies for real 2016-03-08 23:31:38 +00:00
Stephen Connolly 96150d3a46 Jenkins.getInstance() will be @Nonnull in Jenkins 2.0+
- Code that is running from a plugin and on the master's JVM is guaranteed to never get null from this method (any cases where you do get null are bugs in core)
- Code that is running from a plugin and on a remote JVM should never be allowed to load the Jenkins class in their classloader, so should never use Jenkins.getInstance()... we are annotating the method with @Nullable so that such code can have some evolution time
- Code that is running in core and on one of two special paths should use the Jenkins.getInstanceOrNull() method so that the UI can be presented to users before the singleton has been instantiated / after the singleton has been destroyed
- The remaining 95% of uses in core (and 100% of uses in plugins) can safely assume that the instance is never null
2016-03-08 21:15:43 +00:00
Stephen Connolly d1dfbd2baf Revert "Jenkins.getInstance() should be non-null"
This reverts commit bb7c8fcedb.

Closes #2090, I'll redo this as a PR... though if that PR is subject to multiple rounds of review before being merged then I will take that of evidence of the exact problem that committing directly was supposed to resolve... namely exponentially multiplying the effort required to make actual improvements to the code base.
2016-03-08 21:09:28 +00:00
Stephen Connolly bb7c8fcedb Jenkins.getInstance() should be non-null
- It is never too late to do the right thing.
- The vast majority of usages of `Jenkins.getInstance()` in core currently assume that its return value is non-null
- This commit changes those that are written to correctly check for non-null values will call `Jenkins.getInstanceOrNull()`
- We deprecate the `Jenkins.getActiveInstance()` madness
- I checked with @kohsuke who said not to bother with a PR and just commit this strongly opinionated change direct to master as a PR will just degrade into a bikeshedding.
2016-03-07 22:08:36 +00:00
Ing. Pavel Janousek c2d8b31001 [JENKINS-31847] CLI command clear-queue extracted from core to CLI
clear-queue covered by test-cases
2016-03-07 13:39:44 +01:00
Allan Burdajewicz 10699e2a50 [JENKINS-32525] - Handle null @AncestorInPath when selecting Downstream Jobs. 2016-03-07 18:07:32 +10:00
Kohsuke Kawaguchi 920f20fd06 Fixing a test
Previously, when the 2nd `e.click()` is called, the page has already transitioned to another page, so the anchor objects have become invalid.

HtmlUnit somehow still manages to follow a link, except when there's some JavaScript attached to the onclick() handler it's going to execute in a strange environment. Some management link requires a POST, and that was done via JavaScript. So that broke the test.
2016-03-04 13:11:53 -08:00
Jesse Glick f187d706e5 [JENKINS-27152] Merging #2066. 2016-03-03 21:26:20 -05:00
Kohsuke Kawaguchi de8b391cc9 Jetty 9.2 changes in test harness 2016-02-26 13:33:08 -08:00
Jesse Glick 307bfc1738 [JENKINS-27152] Introduce common API WorkspaceList.tempDir. 2016-02-26 15:52:58 -05:00
Jesse Glick 9f475452eb Reverting merge of #1301 as well as mistaken follow-up 1e804fdf27.
The root problem was missing <scope>test</scope> in domain-discovery.
2016-02-25 11:44:08 -05:00
Kohsuke Kawaguchi 1e804fdf27 Looks like an interesting form of a merge conflict. 2016-02-24 13:33:58 -08:00
Kohsuke Kawaguchi d1b1b82a28 Merge remote-tracking branch 'security/security-master' 2016-02-24 09:23:02 -08:00
Oliver Gondža fe41dc89ab Merge pull request #1997 from pjanouse/JENKINS-32273
[JENKINS-32273] Unified an issue handling in CLI
2016-02-19 15:53:15 +01:00
Ing. Pavel Janousek d5725e6d18 [JENKINS-32273] Unified an issue handling in CLI
Re-factored all existed CLI code to follow the new proposed scheme for
raising an exception if issue occurs, handling and reporting it.
Unified CLIRegisterer as well.
Fixed unit tests to follow the new scheme.
2016-02-12 16:25:20 +01:00
Jesse Glick 2711f2bc16 Merge branch 'master' into security-master 2016-02-11 11:31:53 -05:00
Oliver Gondža 731c86ea3c Better defect localization 2016-02-11 11:37:15 +01:00
Jesse Glick 67e4b9fb60 Merge branch 'security-stable-1.642' into security-master 2016-02-10 19:15:45 -05:00
Jesse Glick f4c22155d2 Merge branch 'security-stable-1.625' into security-stable-1.642 2016-02-10 19:13:21 -05:00
Jesse Glick 1211ff9276 Merge branch 'security-stable-1.609' into security-stable-1.625 2016-02-10 19:08:09 -05:00
Jesse Glick 0a1e46570d Merge pull request #61 from jenkinsci-cert/SECURITY-232
[SECURITY-232] Integrating Remoting build with blacklist
2016-02-10 18:05:11 -06:00
Stephen Connolly 95043db718 Merge pull request #1991 from andresrc/JENKINS-32517
[JENKINS-32517] Deprecate Queue#getApproximateItemsQuickly
2016-02-04 15:08:52 +00:00
Daniel Beck aa8b855af3 [SECURITY-247] Added doCreateItem test, improved loading test 2016-02-04 00:33:13 +01:00
Jesse Glick 1ec232ca1c [FIXED SECURITY-232] Integrating Remoting build with blacklist. 2016-02-03 17:40:36 -05:00
Daniel Beck 18cc8e0eb7 [FIX SECURITY-247] Prevent loading of MethodClosure from XML 2016-02-03 23:25:29 +01:00
Jesse Glick ef8ea8c669 [FIXED JENKINS-24696] Cannot assume that Jenkins.getInstance() != null when we are running a boot failure script.
(cherry picked from commit 42de07bba6)
2016-02-03 19:21:57 +01:00
Jesse Glick 501d7fbbb1 Converting BootFailureTest from Groovy to Java.
(cherry picked from commit 09722a982f)
2016-02-03 19:21:57 +01:00
Christopher Simons df2b7d97ad [FIXED JENKINS-31321] protect against node-rename corruption
This change adds code to check that the user isn't attempting to rename
an existing node with the name of another existing node.  Previous to
this change, such rename operations would succeed and would corrupt node
configuration data.

(cherry picked from commit 16d6429c58)
2016-02-03 06:27:08 +01:00
Andres Rodriguez 638ceb2316 [JENKINS-32517] Deprecate Queue#getApproximateItemsQuickly
Now that the item list is obtained lock-free the cache is no longer needed.
Besides, the cache could be returning invalid results for requests with different authorization to the one that cached the result (in any case this invalid result is transient).
2016-01-29 15:38:52 +01:00
valentina 7d7e8d9811 Merge pull request #1972 from varmenise/JENKINS-32328
[FIXED JENKINS-32328] process multiple update-centers for ToolInstallers
2016-01-25 13:24:16 +01:00
Valentina Armenise e7f88146ba [JENKINS-32328] handling tool Installers which do not have the default schema 2016-01-22 18:16:35 +01:00
Valentina Armenise 80a6a9e7cb [JENKINS-32328] process multiple update-centers for ToolInstallers 2016-01-22 15:17:57 +01:00
Jesse Glick 658f7d40b0 Random-looking failure in downstreamProjectShouldObserveCompletedParent. 2016-01-19 12:30:59 -05:00
Jesse Glick 749346896a Split of test harness into separate artifact. 2016-01-13 18:14:37 -05:00
Jesse Glick 8cfa1e890f Merge pull request #1950 from jglick/WebAppMain.contextDestroyed-logging
[JENKINS-24696] WebAppMain.contextDestroyed produces weird errors
2016-01-11 10:37:26 -05:00
Daniel Beck 6306952779 Merge pull request #1887 from daspilker/with-plugin
allow @WithPlugin to install multiple plugins
2016-01-08 15:02:07 +01:00
Daniel Beck ad5b2d12a6 Merge pull request #1949 from csimons/prohibit-rename-node-to-existing
[FIXED JENKINS-31321] protect against node-rename corruption
2016-01-08 14:57:21 +01:00
Jesse Glick 6603409891 Use Logger rather than stderr. 2016-01-04 17:00:59 -05:00
Jesse Glick 28bef5f366 [JENKINS-30395] Work around ClosedByInterruptException by checking Thread.interrupted. 2016-01-04 10:23:31 -05:00
Christopher Simons 16d6429c58 [FIXED JENKINS-31321] protect against node-rename corruption
This change adds code to check that the user isn't attempting to rename
an existing node with the name of another existing node.  Previous to
this change, such rename operations would succeed and would corrupt node
configuration data.
2015-12-22 13:20:38 -05:00
Jesse Glick 60a23e5bca [FIXED JENKINS-31954] Stack overflow reconfiguring some settings where Descriptor.newInstance is gratuitously overridden. 2015-12-11 16:08:06 -05:00
Jesse Glick 42de07bba6 [FIXED JENKINS-24696] Cannot assume that Jenkins.getInstance() != null when we are running a boot failure script. 2015-12-09 14:53:24 -05:00
Jesse Glick 09722a982f Converting BootFailureTest from Groovy to Java. 2015-12-09 14:23:03 -05:00
Jesse Glick 6c2b16cf4a Merge pull request #1939 from jglick/StartupTest
Ensure that no warnings appear during startup
2015-12-09 10:19:24 -08:00
Kohsuke Kawaguchi dd2ac731da Merge branch 'master' of github.com:jenkinsci/jenkins 2015-12-09 10:07:55 -08:00