Commit Graph
86 Commits
Author SHA1 Message Date
Daniel Beck 6f8540c347 [FIX JENKINS-34094] Add access control
Also adds some API restrictions for JENKINS-33803.
2016-04-17 16:48:33 +02:00
Daniel Beck 70ee2012e9 Revert "[FIXED JENKINS-21486] Merged #2172: enforce plugin dependencies."
This reverts commit fa39668b81, reversing
changes made to be9bc0dba5.
2016-04-07 00:07:38 +02:00
Daniel Beck 4d0143b8d2 Revert "Merge pull request #2228 from Vlatombe/JENKINS-21486-follow-up"
This reverts commit 0846358bf6, reversing
changes made to 2c9adc9965.
2016-04-07 00:06:43 +02:00
Daniel Beck d182cdf223 Merge branch 'master' of github.com:jenkinsci/jenkins into 2.0 2016-04-06 19:18:44 +02:00
Vincent Latombe 754fcf9906 Display the required version back. 2016-04-06 14:18:29 +02:00
Vincent Latombe 5ebf6b8bde [JENKINS-21486] Follow-up
Display of shortName of disabled plugin is enough. Fix copy-paste error
in the message for disabled dependencies
2016-04-06 14:12:33 +02:00
Daniel Beck 425b727eac Merge branch 'master' of github.com:jenkinsci/jenkins into 2.0
Conflicts:
	cli/pom.xml
	core/pom.xml
	pom.xml
	test/pom.xml
	test/src/test/java/hudson/PluginManagerTest.java
	war/pom.xml
2016-04-04 23:00:39 +02:00
Jesse Glick fa39668b81 [FIXED JENKINS-21486] Merged #2172: enforce plugin dependencies. 2016-04-04 11:06:43 -04:00
Vincent Latombe f4e9cb4af4 [JENKINS-21486] Reduce visibility of flag to private 2016-04-01 16:06:38 +02:00
Vincent Latombe 91e8400ea1 [JENKINS-21486] Check Jenkins version if the flag is set
And don't fail if no version can be found.
2016-04-01 15:48:18 +02:00
Vincent Latombe 57e73a3575 [JENKINS-21486] Verify core version 2016-04-01 09:31:26 +02:00
Vincent Latombe d57db1b1f2 [JENKINS-21486] Fix plugin dependencies resolution
* Check that dependencies are enabled. A disabled optional dependency
  will not prevent a plugin from loading.
* Check versions of dependencies declared by a plugin before loading it.
  If any dependency (even optional) is older than what is required,
  then the plugin isn't loaded.

This should prevent use cases where a plugin is loaded but one of its
dependencies is too old so that :
* its @Extension annotated classes cannot be loaded, causing the full
  Jenkins to blow up with crapload of exceptions which are tedious to
  investigate to understand the root cause.
* NoSuchMethodError and the likes at runtime even though boot has
  completed.

Version check (for setups where version list is manually crafted but yet
works) can be disabled by starting Jenkins with

-Dhudson.PluginWrapper.dependenciesVersionCheck.enabled=true

Minor fixes done while implementing this change :
* Fix version parsing in PluginWrapper.Dependency
* Dynamic plugin load didn't check for disabled flag
2016-03-30 10:40:12 +02:00
tfennelly 036a8e94ed [FIX JENKINS-9598] Add plugin selection wizard on first launch
Also ... unbundling of plugins from Jenkins core.
2016-01-20 10:54:32 +00:00
tfennelly a8e83c3c2d Tweaks based on review comments 2015-10-06 09:44:11 +01:00
tfennelly 3b5424e507 Only allow disable or uninstall when all dependants or dependencies are disabled/enabled 2015-10-01 16:35:05 +01:00
Veres Lajos d58903558e typofix - https://github.com/vlajos/misspell_fixer 2015-08-11 16:34:13 +01:00
Jesse Glick c94c1716f3 Merge branch 'SECURITY-144' into SECURITY-144-rc
Conflicts:
	core/src/main/java/hudson/FilePath.java
	core/src/main/java/hudson/PluginManager.java
	core/src/main/java/hudson/PluginWrapper.java
2014-10-17 10:59:32 -04:00
Kohsuke Kawaguchi 19f9b63d74 [FIXED JENKINS-24046]
Warn users if the pinning is preventing Jenkins from overwriting older versions with bundled versions.
2014-10-16 18:18:25 -07:00
Jesse Glick 7f856b5608 [FIXED JENKINS-12753] Added PluginStrategy.getShortName to avoid actually trying to unpack a plugin before throwing RestartRequiredException. 2014-05-20 12:57:47 -04:00
Jesse Glick 3c2f5046c0 Revert "Warn user when plugin dependencies don't match"
This reverts commit 2d40b7e7e9.
2014-02-11 19:12:58 -05:00
Jesse Glick 58ff576f0a Revert "Use dedicated exceptions to track incompatible/missing plugin"
This reverts commit b32d0e4f74.
2014-02-11 19:12:57 -05:00
Nicolas De Loof b32d0e4f74 Use dedicated exceptions to track incompatible/missing plugin
to be used by other component to log/resolve configuration issue.
2014-02-11 13:31:38 +01:00
Nicolas De Loof 2d40b7e7e9 Warn user when plugin dependencies don't match
required minimal version
2014-02-11 13:31:38 +01:00
Ulli Hafner 48cb1304c5 Removed "Jenkins" prefix from plugin display names.
Since sorting of plugins in the update manager is based on displayName
this name should not have a common prefix otherwise it's hard to find
a given plugin name.
2014-02-04 15:25:31 +01:00
Jesse Glick 2a9197d36d Better diagnostics than “Failed to get backup version”: indicate what file was broken. 2014-01-27 09:45:10 -08:00
Jesse Glick 6586d779b1 Better null safety.
Defense against an exception consistently thrown when running functional tests against 1.532.1 (but not 1.540, for whatever reason):
… hudson.PluginWrapper stop
WARNING: Failed to shut down …
java.lang.NullPointerException
	at jenkins.model.Jenkins.lookup(Jenkins.java:3898)
	at hudson.PluginWrapper.getPlugin(PluginWrapper.java:287)
	at hudson.PluginWrapper.stop(PluginWrapper.java:377)
	at hudson.PluginManager.stop(PluginManager.java:650)
	at org.jvnet.hudson.test.TestPluginManager.reallyStop(TestPluginManager.java:129)
	at org.jvnet.hudson.test.TestPluginManager.access$000(TestPluginManager.java:55)
	at org.jvnet.hudson.test.TestPluginManager$1.run(TestPluginManager.java:140)
2013-11-20 09:51:19 -05:00
Jesse Glick 7ff65c5674 Reducing message from stop() to FINE.
Normally this is only printed during functional tests or during in-process restart.
In neither case do we really want to see a log message (i.e. two lines of text) for each plugin in the system being stopped.
2013-11-11 13:17:59 -05:00
evernat b32b38cdc9 Close JarFile resources in PluginWrapper and UpdateCenter 2013-08-24 17:43:01 +02:00
Mark Waite 253f928209 Fix many of the javadoc unresolved @link warnings 2013-07-20 13:28:54 -06:00
Kohsuke Kawaguchi 29f6a5dd01 [FIXED JENKINS-3070]
Added uninstaller that removes *.jpi.
2012-10-09 16:08:21 -07:00
Kohsuke Kawaguchi 76832379d8 exposed data about installed plugins, installable plugins, update center jobs, etc., to the REST API 2012-05-21 16:59:24 -07:00
imod aad6e4c66c only deactivate plugins with cycle dependencies instead of failing to launch Jenkins 2012-02-19 18:29:53 +01:00
imod 386618dca4 support new JenkinsPlugin type (jpi) 2012-01-03 11:47:37 -08:00
Kohsuke Kawaguchi c6d81ef2e2 hooking up the dynamic loading logic into the UI 2011-11-15 23:09:47 -08:00
Kohsuke Kawaguchi 7850d422af this is a meta variable 2011-08-09 11:14:48 -07:00
Nigel Magnay 5679d019ec Move hudson.model.Jenkins to be jenkins.model.Jenkins - part II
Just import changes, from hudson.model.Jenkins -> jenkins.model.Jenkins,
and Javadoc comments.

Signed-off-by: Nigel Magnay <nigel.magnay@gmail.com>
2011-05-29 11:06:28 +01:00
Nigel Magnay 70c1065814 Stage 1 : Create hudson.model.Jenkins, make Hudson derive from Jenkins.
Signed-off-by: Nigel Magnay <nigel.magnay@gmail.com>
2011-05-29 11:00:58 +01:00
Kohsuke Kawaguchi 0ae70779be Generate 3rd party dependency license report and make it visible from
the UI.

Also, for the core build, require that all the dependency licenses are
available.
2011-04-15 14:55:43 -07:00
Dave Brosius 5571e430d1 remove wasteful duplicate method calls 2011-02-05 19:16:24 -05:00
alanharder b3c661d59b some hudson.war/jenkins.war changes 2011-02-03 09:41:00 -08:00
kohsuke 8ec3054c30 Added downgrade support for the core and plugins.
--------
Merged revisions 32975,33588,33697,34342 via svnmerge from 
https://www.dev.java.net/svn/hudson/branches/downgrade

........
  r32975 | kohsuke | 2010-07-16 21:27:59 +0200 (Fri, 16 Jul 2010) | 1 line
  
  committed my partially modified version
........
  r33588 | dienomight | 2010-08-05 09:42:36 +0200 (Thu, 05 Aug 2010) | 13 lines
  
  Added getBackupVersion (UpdateCenter)
  downgrade button now shows version of backup war file
  
  Added HudsonDowngradeJob (UpdateCenter)
  downgrading process is works now as HudsonUpgradeJob
  
  Changed rewriteHudsonWar (Lifecycle) 
  backup file is deleted when downgrading
  
  hudson/model/Hudson/downgrade_success.jelly is no longer necessary
  
  Changed rewriteHudsonWar(WindowsServiceLifecycle)
  hudson run as windows service creates backup during upgrading
........
  r33697 | dienomight | 2010-08-11 17:09:48 +0200 (Wed, 11 Aug 2010) | 8 lines
  
  committed changes:
  "plugins downgrade functionality"
  added: 
  * PluginDowngradeJob in UpdateCenter
  * getCanDowngrade & getBackupPath & getBackupVersion in PluginWrapper
  * additional "previous version" column in installed.jelly (PluginManager) with downgrade button (when it's possible to downgrade)
  * doDowngrade in PluginManager
  * deployBackup in UpdateSite
........
  r34342 | dienomight | 2010-09-03 09:52:13 +0200 (Fri, 03 Sep 2010) | 12 lines
  
  Code improvements: 
  jelly files:
  *I put text inside ${%} so it would be available for translation.
  UpdateCenter: 
  *changed getCanDowngrade to isDowngradable
  *getBackupVersion use JarFile class to get version of .war backup
  PluginWrapper:
  *changed getBackupPath to getBackupFile
  *getBackupVersion use JarFile class to get version of plugin backup
  PluginManager:
  *changed condition in doDowngrade method
........


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@34543 71c3de6d-444a-0410-be80-ed276b4c234a
2010-09-08 05:36:29 +00:00
kohsuke db05699410 expose unpinning to the web UI.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@34045 71c3de6d-444a-0410-be80-ed276b4c234a
2010-08-23 19:05:09 +00:00
mindless de0cd39fa6 [FIXED HUDSON-6966] in getIndexPage(), check that result has this plugin's artifactId
in it, in case plugin has dependencies but is missing its own index.jelly.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@33311 71c3de6d-444a-0410-be80-ed276b4c234a
2010-07-28 21:44:30 +00:00
kohsuke 89c437c877 allowing PluginStrategy to create subtypes.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@32980 71c3de6d-444a-0410-be80-ed276b4c234a
2010-07-16 23:17:09 +00:00
mindless 81b3603c13 [FIXED HUDSON-6966] Plugins with dependencies show wrong description on
installed plugins page.  DependencyClassLoader checks dependencies before
this plugin, so wrong index.jelly is found for plugins with dependencies.
Added implementation of findResources in DependencyClassLoader, and use
getResources to find the right index.jelly in PluginWrapper.getIndexPage().


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@32876 71c3de6d-444a-0410-be80-ed276b4c234a
2010-07-14 16:32:26 +00:00
mindless fd0e34a13f small PluginManager UI updates
- click category heading on Available tab to show/hide plugins in that category
- add initial sort for plugins on Installed tab
- no mouseover bgcolor for Advanced tab


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@31819 71c3de6d-444a-0410-be80-ed276b4c234a
2010-06-07 01:11:31 +00:00
kohsuke 6253fb1b24 Test performance improvement by allowing multiple Hudsons to reuse classloaders.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@30070 71c3de6d-444a-0410-be80-ed276b4c234a
2010-04-14 22:55:18 +00:00
kohsuke 26f290b5b7 fixed a compilation problem. I think this reads better than a two-arg "isNewerThan"
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@24466 71c3de6d-444a-0410-be80-ed276b4c234a
2009-12-08 00:09:45 +00:00
kohsuke fd13eee6d5 Merged revisions 23666-23667,23670,23711,23782-23785,23788,23809-23810,23817,23859,23870,23879,23899-23904,23906-23907,23909,23913 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/managed-startup

........
  r23666 | kohsuke | 2009-11-11 15:56:46 -0800 (Wed, 11 Nov 2009) | 1 line
  
  Reworked the initialization logic
........
  r23667 | kohsuke | 2009-11-11 16:01:56 -0800 (Wed, 11 Nov 2009) | 1 line
  
  fixed a failing test
........
  r23670 | kohsuke | 2009-11-11 16:42:32 -0800 (Wed, 11 Nov 2009) | 1 line
  
  use a non-snapshot
........
  r23711 | kohsuke | 2009-11-13 14:27:28 -0800 (Fri, 13 Nov 2009) | 1 line
  
  Session -> Reactor
........
  r23782 | kohsuke | 2009-11-17 10:35:14 -0800 (Tue, 17 Nov 2009) | 1 line
  
  Poorman's clone of JDK6 ServiceLoader.
........
  r23783 | kohsuke | 2009-11-17 10:56:25 -0800 (Tue, 17 Nov 2009) | 1 line
  
  Integrated the fatal support so that all errors are sent to the listener.
........
  r23784 | kohsuke | 2009-11-17 10:58:07 -0800 (Tue, 17 Nov 2009) | 1 line
  
  with the new reactor initialization, things are getting too verbose
........
  r23785 | kohsuke | 2009-11-17 11:18:45 -0800 (Tue, 17 Nov 2009) | 1 line
  
  failing to load jobs are non-fatal, too
........
  r23788 | kohsuke | 2009-11-17 13:18:59 -0800 (Tue, 17 Nov 2009) | 1 line
  
  logging the exception properly
........
  r23809 | kohsuke | 2009-11-17 18:45:47 -0800 (Tue, 17 Nov 2009) | 1 line
  
  releasing 1.1 as milestone
........
  r23810 | kohsuke | 2009-11-17 18:47:37 -0800 (Tue, 17 Nov 2009) | 2 lines
  
  - use a better idiom for building a sequence
  - use null display name to signify internal book-keeping tasks that's not worth displaying
........
  r23817 | kohsuke | 2009-11-18 07:54:17 -0800 (Wed, 18 Nov 2009) | 1 line
  
  removed accidental JDK6 dependency.
........
  r23859 | kohsuke | 2009-11-19 11:03:28 -0800 (Thu, 19 Nov 2009) | 1 line
  
  introducing the strategy pattern to hook into key decision making points during the start up
........
  r23870 | kohsuke | 2009-11-19 14:33:07 -0800 (Thu, 19 Nov 2009) | 1 line
  
  bug fix. These steps add additional tasks to the reactor, so they need to also prevent future milestones from getting attained.
........
  r23879 | kohsuke | 2009-11-19 16:54:59 -0800 (Thu, 19 Nov 2009) | 1 line
  
  moved the logic to the strategy.
........
  r23899 | kohsuke | 2009-11-20 09:32:13 -0800 (Fri, 20 Nov 2009) | 1 line
  
  handle duplicate plugins better
........
  r23900 | kohsuke | 2009-11-20 10:06:42 -0800 (Fri, 20 Nov 2009) | 1 line
  
  support pre-exploded plugin
........
  r23901 | kohsuke | 2009-11-20 10:49:04 -0800 (Fri, 20 Nov 2009) | 1 line
  
  making it a subtype
........
  r23902 | kohsuke | 2009-11-20 10:54:42 -0800 (Fri, 20 Nov 2009) | 1 line
  
  allow InitStrategy to skip some tasks
........
  r23903 | kohsuke | 2009-11-20 11:03:38 -0800 (Fri, 20 Nov 2009) | 1 line
  
  doc improvement.
........
  r23904 | kohsuke | 2009-11-20 11:03:49 -0800 (Fri, 20 Nov 2009) | 1 line
  
  no need to throw exceptions
........
  r23906 | kohsuke | 2009-11-20 11:17:34 -0800 (Fri, 20 Nov 2009) | 1 line
  
  debug switch to disable the automatic launch of slaves
........
  r23907 | kohsuke | 2009-11-20 11:25:15 -0800 (Fri, 20 Nov 2009) | 1 line
  
  added a magic object for cancelling all saves
........
  r23909 | kohsuke | 2009-11-20 11:29:53 -0800 (Fri, 20 Nov 2009) | 1 line
  
  moving initialization up
........
  r23913 | kohsuke | 2009-11-20 13:32:08 -0800 (Fri, 20 Nov 2009) | 1 line
  
  seeing heap space problem during tests
........


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23992 71c3de6d-444a-0410-be80-ed276b4c234a
2009-11-23 19:33:33 +00:00
kohsuke 720be7d7a1 Merged revisions 23183,23185,23245,23256,23266,23279-23284,23286 via svnmerge from
https://www.dev.java.net/svn/hudson/branches/multiple-update-sources

........
  r23183 | abayer | 2009-10-25 11:53:17 -0700 (Sun, 25 Oct 2009) | 1 line
  
  First chunk of work towards supporting multiple update centers - infrastructure in place for it, and default update center treated as only one of multiple - have to use slightly modified update-center.json though
........
  r23185 | abayer | 2009-10-25 12:25:49 -0700 (Sun, 25 Oct 2009) | 1 line
  
  a number of tweaks - among other things, now works properly with additional update centers defined in hudson.model.UpdateCenter.xml - try using http://andrewbayer.com/images/hello-world/helloWorld-update-center.json as second update center
........
  r23245 | abayer | 2009-10-27 13:45:25 -0700 (Tue, 27 Oct 2009) | 1 line
  
  Modified to support existing default update-center.json
........
  r23256 | kohsuke | 2009-10-27 18:30:15 -0700 (Tue, 27 Oct 2009) | 7 lines
  
  - moved data binding of update-center.json to UpdateSource.
  - moved some of the UpdateSource property into JSON, to improve the user experience when adding an update source.
    the user should just type in one URL, and everything else should happen automatically.
  - it doesn't make sense for UpdateSource to rely on UpdateCenterConfiguration, since behaviors cannot be
    modified per UpdateSource basis. Instead, leaving it in UpdateCenter allows us to maintain backward compatible
    behaviors with the existing custom UpdateCenterConfiguration implementation.
........
  r23266 | kohsuke | 2009-10-27 19:29:24 -0700 (Tue, 27 Oct 2009) | 1 line
  
  serve id inside JSON.
........
  r23279 | kohsuke | 2009-10-28 10:44:00 -0700 (Wed, 28 Oct 2009) | 1 line
  
  Do not special-case "default" ID. Receive hudson.war updates from wherever that provides one.
........
  r23280 | kohsuke | 2009-10-28 10:50:57 -0700 (Wed, 28 Oct 2009) | 1 line
  
  formatting change.
........
  r23281 | kohsuke | 2009-10-28 11:30:40 -0700 (Wed, 28 Oct 2009) | 1 line
  
  typo
........
  r23282 | kohsuke | 2009-10-28 11:45:06 -0700 (Wed, 28 Oct 2009) | 2 lines
  
  - added the UI to remove sites.
  - persistence of UpdateSource happens more automatically now.
........
  r23283 | kohsuke | 2009-10-28 11:50:04 -0700 (Wed, 28 Oct 2009) | 1 line
  
  UpdateSource -> UpdateSite to align terminology with Eclipse.
........
  r23284 | kohsuke | 2009-10-28 11:55:03 -0700 (Wed, 28 Oct 2009) | 5 lines
  
  Actually, for now, just having a programmatic modification to UpdateSite would satisfy the primary use case.
  
  And I'd like to upgrade YUI to a more recent version so that we can use its DataTable for UI. Plus the single update center model encourages the community to bring the code into the Hudson project, which is something we'd like to keep.
  
  So all in all, I'm postponing the UI work.
........
  r23286 | kohsuke | 2009-10-28 13:07:19 -0700 (Wed, 28 Oct 2009) | 1 line
  
  Renaming and bug fixes.
........


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23326 71c3de6d-444a-0410-be80-ed276b4c234a
2009-10-29 21:27:46 +00:00