Commit Graph
32590 Commits
Author SHA1 Message Date
Baptiste Mathus ece2e39c12 Wraps InvalidPathException in IOException if thrown
To keep backward compatibility and avoid potentially killing
threads that would be using this code.
2017-11-21 12:04:24 +01:00
Baptiste Mathus af63365149 Fix wrong log parameter index 2017-11-21 11:50:04 +01:00
Oleg Nenashev 60085a0f10 [JENKINS-48116] - Restrore AbstractTaskListener binary compatibility in the core.
Since we have the confirmed regression due to the binary compatibility change, I think we need to restore the compatibility.
OTOH, I restricted the class, so all users will be forced to stop using it when they updgrade the core.
2017-11-21 10:45:40 +01:00
Baptiste Mathus 5c767c324a Delete the temp file even if close() throws an exception 2017-11-21 00:44:19 +01:00
Baptiste Mathus 3e7d4ea978 Merge remote-tracking branch 'upstream/master' into JENKINS-34855
# Conflicts:
#	core/src/main/java/hudson/util/AtomicFileWriter.java
2017-11-21 00:41:37 +01:00
Josh Soref 32ed86db8a grammar: does-not-make 2017-11-20 18:13:01 -05:00
Josh Soref e7494091ce grammar: timed-out/X attempts 2017-11-20 18:12:50 -05:00
Baptiste Mathus ced3dc4159 catch IOException and do a best effort to fall back
And if things go wrong, we try to spit logs to help diagnostics.
2017-11-21 00:11:16 +01:00
Baptiste Mathus 7458cb617c Do not allow null charset on the new constructor 2017-11-20 22:47:33 +01:00
Jesse Glick 88b922f183 Merge pull request #3151 from jglick/stage-naming
Simplifying naming of publish stages
2017-11-20 16:44:35 -05:00
Baptiste Mathus d5e68b6c5d Rename tmpFile and destFile to *Path now they are Path 2017-11-20 22:40:47 +01:00
Baptiste Mathus a3b4419461 Jenkins being now Java 8+: no need to warn about 7+ 2017-11-20 22:39:07 +01:00
Baptiste Mathus 1013eea1a2 Fix excessive indentation 2017-11-20 17:59:52 +01:00
Baptiste Mathus 54b7dee295 Also annotate with @Deprecated 2017-11-20 17:58:30 +01:00
Baptiste Mathus dcd800f256 Force line break 2017-11-20 15:55:44 +01:00
Baptiste Mathus 65a2375e6e Wrap if block with brackets
Because brackets should always be there :-)
2017-11-20 15:39:11 +01:00
Baptiste Mathus d454de2bc8 Remove unnecessary if 2017-11-20 15:38:34 +01:00
Baptiste Mathus aebcbb6f6c Add @since TODO on new method 2017-11-20 15:24:37 +01:00
Kohsuke Kawaguchi d4419b5125 [maven-release-plugin] prepare for next development iteration 2017-11-19 23:03:18 -08:00
Kohsuke Kawaguchi ec541fe582 [maven-release-plugin] prepare release jenkins-2.91 jenkins-2.91 2017-11-19 23:03:18 -08:00
Oleg Nenashev 01fc1eb71b Merge branch 'master' into refactoring/JENKINS-47896-serializableOnlyOverRemoting 2017-11-19 13:27:11 +01:00
Oleg Nenashev 5b9ad6475d Merge pull request #3122 from jglick/TaskListener
Implement default methods in TaskListener and BuildListener
2017-11-19 13:26:02 +01:00
Oleg Nenashev 8cb3351319 [JENKINS-47718] - Deprecate User#getUser(String) (#3114)
* [JENKINS-47718] - Deprecate User#getUser(String)

`User#getUser(String)` method causes lots of confusion for plugin developers. It implicitly creates a user if it cannot be found, and in many cases this is actually a not-expected behavior. This change deprecates the method and to creates a new `User#getOrCreate()` which is more explicit

* [JENKINS-47718] - Address comments from @jglick
2017-11-19 13:25:15 +01:00
Jesse Glick 9e8c772c43 Simplifying naming of publish stages. 2017-11-16 22:49:13 -05:00
Jesse Glick 3853b38139 [JENKINS-47429] User.getLegacyConfigFilesFor no longer seems to be necessary. 2017-11-16 22:10:57 -05:00
Jesse Glick 7dee930f33 Introducing AccessController.hasPermission(Authentication, Permission). 2017-11-16 20:43:07 -05:00
t-hall d688c15490 [JENKINS-34138] Fix maven installs from stepping on each other (#3042)
* [JENKINS-34138] Adding equals/hashCode methods so that installs don't step on each other

* [JENKINS-34138] Added issue reference to unit tests

* [JENKINS-34138] - changed the order of equals / hashcode
2017-11-16 17:18:43 +01:00
Devin Nusbaum 52fa4d90b9 [JENKINS-39179] [JENKINS-36088] Always use NIO to create and detect symbolic links and Windows junctions (#3133)
* Always use NIO to detect symlinks

* Make assertion failure message consistent

* Catch NoSuchFileException to keep tests passing

* Make method name more specific and simlify assumption

* Remove obsolete comment and reword the main comment in isSymlink

* Deprecate Kernel32Util#isJunctionOrSymlink

* Use assumptions for junction creation and add messages to assumptions

* Replace deprecated code with recommended alternative

* Add comment explaining call to DosFileAttributes#isOther

* Do not fall back to native code when creating symlinks

* Log FileSystemExceptions when creating symbolic links

* Catch InvalidPathException and rethrow as IOException

* Deprecate Kernel32Utils#createSymbolicLink and #getWin32FileAttributes

* Preserve original logging behavior on Windows and remove useless call to Util#displayIOException
2017-11-16 17:08:10 +01:00
Oleg Nenashev bfeb24f7da [JENKINS-47896] - Introduce SerializableOnlyOverRemoting in classes.
Due to the implementation specifics, some classes in the core are serializable only over Remoting.
This change just marks these classes and utilizes the convenience method in the interface for serialization/deserialization operations.
2017-11-16 10:53:18 +01:00
Alexander Akbashev d7b120fea3 Cache estimated duration for execution
In case of having 1000s of ongoing builds opening main pages can take
some time if list of executors are opened. It happens because for every
queury that comes from jelly we re-calculate the value from scratch. And
calculation needs to load some builds from disk. The worst thing is that it
happens for every user separately.
2017-11-16 09:43:59 +01:00
Oleg Nenashev c624f66dc4 [JENKINS-47015] - Update Windows Slave Installer module to 1.9.2
It picks new release with one bugfix / performance improvement. Changelog: https://github.com/jenkinsci/windows-slave-installer-module/blob/master/CHANGELOG.md#192

(cherry picked from commit 3f43b4c3ad)
2017-11-14 12:29:50 +01:00
Oleg Nenashev 80b9ee6f4b Add missing @since to CanonicalIdResolver#resolve() 2017-11-14 12:03:46 +01:00
Oleg Nenashev d41a69c49b Document and refactor the CanonicalIdResolver extension point.
The extension point has been introduced in https://github.com/jenkinsci/jenkins/commit/af42534defea4503347dfc0ec442fadf51cf3336
It does not follow common extension point practices (e.g. “all()” methods) and has no Javadoc.

So I decided to polish it a bit. The core also adds some TODOs for review
2017-11-14 11:55:50 +01:00
benru 3a0a575ecf JENKINS-25286: Export assigned labels for slaves and the label expression for jobs in JSON and XML APIs
Adds @Export attribute to assignedLabels for Computer and AbstractProject
Also adjusts visibility on Label "name" parameter so it appears by default
2017-11-13 21:08:43 +00:00
Jesse Glick d8a5d61721 Merge branch 'master' into whitelist-JENKINS-47736 2017-11-13 10:03:06 -05:00
Kohsuke Kawaguchi 7d29d4df37 [maven-release-plugin] prepare for next development iteration 2017-11-13 06:51:52 -08:00
Kohsuke Kawaguchi 6fb6e6ff46 [maven-release-plugin] prepare release jenkins-2.90 jenkins-2.90 2017-11-13 06:51:52 -08:00
Daniel Beck 7c06a9ba94 Merge pull request #3134 from jglick/IdStrategy-NFE-JENKINS-47909
[JENKINS-47909] Handle false hex escapes
2017-11-12 16:02:15 +01:00
Oleg Nenashev 4c11a0ffad Merge pull request #3124 from jenkinsci/stephenc-patch-1
[JENKINS-12251 follow up] Switch to the non-deprecated variable
2017-11-12 15:50:28 +01:00
Kseniia Nenasheva 95db56e850 [JENKINS-47115] - Add trim option to String Parameter (#3106)
* [JENKINS-47115] - Add trim option to String Parameter

* Add help information

* Address comments

* Address comments

* Address comments

* Address comments
2017-11-12 15:49:11 +01:00
Wadeck Follonier 9735043b61 [JENKINS-47768] - Avoid having "authenticated" twice in the group membership of a user (LastGrantedAuthorities) (#3123)
* Avoid having "authenticated" twice in the group membership of a user
- this occur when the SecurityRealm potentially already grants that role (like in github-oauth-plugin)

* - changed as requested by Oleg
- the list has a maximum of roles.length and in reality it's either roles.length or (roles.length-1), so the maximum is ok

* - fix problem of missing the "authenticated" authority

* - convert the Groovy script to a Java version
- the Groovy test was not run by default (IIUC Groovy scripts are not compiled if placed in java src folder)
2017-11-12 15:48:18 +01:00
Oleg Nenashev a2fcfa01aa Merge pull request #3139 from mustafau/patch-1
Fix "Manage Jenkins" icon on Global Tool Configuration
2017-11-12 15:47:24 +01:00
Oleg Nenashev c44497868a Merge pull request #3138 from oleg-nenashev/remoting/3.14
Update Remoting from 3.13. to 3.14
2017-11-12 15:46:49 +01:00
Devin Nusbaum 5c1fd7d603 [JENKINS-47448] Make JDKInstaller work for old login site as well (#3136)
* Fix JDKInstaller to work with old and new Oracle login flow

* Update Javadoc to explain that both login flows are supported
2017-11-12 15:45:02 +01:00
Mustafa Ulu 46a37ad757 Fix "Manage Jenkins" icon on Global Tool Configuration
All "Manage Jenkins" links from different pages use gear icon except this one.
2017-11-11 13:12:39 +02:00
Oleg Nenashev 1734bf75ff Merge pull request #3132 from Wadeck/ADD_SINCE_FOR_USER_GETBYID
Add @since for User.getById
2017-11-10 19:45:45 +01:00
Oleg Nenashev a5d2c7b99c Merge pull request #3137 from alecharp/JENKINS-47940
[JENKINS-47940] Specified nodes count can be invalid
2017-11-10 19:41:20 +01:00
Oleg Nenashev bcd0b2c72b Update Remoting from 3.13. to 3.14
Fixes JENKINS-45294, JENKINS-47425, JENKINS-47901, JENKINS-47942 + about 50 reported FindBugs issues (JENKINS-37566). There are 13 FindBugs issues left, work in progress.
2017-11-10 19:06:16 +01:00
Daniel Beck 294f24bb20 Merge pull request #3127 from suren-jenkins/suren-zh
Add Chinese translation
2017-11-10 18:56:01 +01:00
Wadeck Follonier 80d17f5a68 [JENKINS-43852] add caching options for captcha (#3126)
* JENKINS-42852 add caching options for captcha

* - remove whitespace

* - correct unit tests

* - copy/paste is bad

* - second edit...
2017-11-10 17:42:39 +01:00