Commit Graph
32590 Commits
Author SHA1 Message Date
Jesse Glick 001a33c747 [JENKINS-48638] Deprecate Jenkins.getInstance in favor of (usually) get (#3195)
* Deprecate Jenkins.getInstance in favor of (usually) getActiveInstance.

* Introduced get() as a concise non-null accessor.

* May as well suggest rewrites of getActiveInstance too.
2017-12-22 17:29:49 +01:00
Oleg Nenashev b5f24e7172 Merge pull request #3199 from suren-jenkins/suren-zh
Add Chinese translation
2017-12-22 17:28:19 +01:00
Wadeck Follonier 02035017b6 Ensure all Jelly view have escape-by-default. (#3180)
* Ensure all Jelly view have escape-by-default.
- all those views escape the content theirself, so no vulnerability corrected here (for TextParameterDefinition, it's done by textarea.jelly)

* - just a line break at end

* - just a line break at end (part 2)

* - change from st:out to j:out because their content is expected to be html tags

* - st => j for all finally
2017-12-22 17:27:13 +01:00
Gentle Yang 19b26ac7b2 Create messages_zh_CN.properties to translate into Chinese (simplified) (#3174)
* Create messages_zh_CN.properties

* Update messages_zh_CN.properties

* Rename messages_zh_CN.properties to message_zh_CN.properties

* Update message_zh_CN.properties
2017-12-22 14:38:54 +01:00
Jan Zuchhold 006c51256e [JENKINS-48593] - Add getSystemProperty(key) to fix hudson.consoleTailKB system property (#3200)
* Add getSystemProperty(key) to fix hudson.consoleTailKB system property

* Add Javadoc, @Restricted and delegate to SystemProperties

These changes were requested by @daniel-beck.

* PR was not merged in time for 2.96

* Changes as requested by @oleg-nenashev
2017-12-22 14:36:34 +01:00
Jesse Glick e575f75819 Snapshot bump, to work around apparent maven-compiler-plugin (or Maven core) bug. 2017-12-21 12:59:18 -05:00
Jesse Glick 353e6adedd https://github.com/jenkinsci/workflow-support-plugin/pull/50 2017-12-21 12:35:22 -05:00
Jesse Glick c8a98cb6e1 https://github.com/jenkinsci/git-client-plugin/pull/290 2017-12-21 12:32:14 -05:00
Jesse Glick d23ae596ad https://github.com/jenkinsci/job-dsl-plugin/pull/1092 2017-12-21 12:26:10 -05:00
Jesse Glick b8d236c658 Merge branch 'master' into whitelist-JENKINS-47736 2017-12-21 12:08:58 -05:00
Jesse Glick dfda4e18df https://github.com/jenkinsci/lib-jenkins-maven-embedder/pull/15 2017-12-20 16:11:23 -05:00
Jesse Glick 837d0c90ac Allow whitelists to contain blank lines and comments. 2017-12-19 15:05:11 -05:00
Kohsuke Kawaguchi 90f778d281 [maven-release-plugin] prepare for next development iteration 2017-12-19 11:48:27 -08:00
Kohsuke Kawaguchi 5f2a40ba96 [maven-release-plugin] prepare release jenkins-2.97 jenkins-2.97 2017-12-19 11:48:27 -08:00
Jesse Glick 14ff05fdb6 Bump. 2017-12-19 14:42:23 -05:00
Jesse Glick dfc1940eee Merge branch 'master' into whitelist-JENKINS-47736 2017-12-19 14:34:57 -05:00
Daniel Beck 1dc2c6d5ff Merge pull request #3201 from dwnusbaum/JENKINS-48604
[JENKINS-48604] Do not downgrade plugins that are dependencies of detached plugins when upgrading Jenkins
2017-12-19 19:53:38 +01:00
Josh Soref db7a19810d MessageFormat treats ' as a special character
https://docs.oracle.com/javase/8/docs/api/java/text/MessageFormat.html

Test case is jenkins/computer/node/configure
 Help for "Launch method"

Without this fix, you will see:
Launch agent via Java Web Start
... By default, the JNLP agent will launch a GUI, but its also possible to run a JNLP agent without a GUI, e.g. as a Window service.

You should see:
... By default, the JNLP agent will launch a GUI, but it's also possible to run a JNLP agent without a GUI, e.g. as a Window service.
2017-12-18 21:19:06 -05:00
Devin Nusbaum 6632aef948 Revert "Upgrade installed optional dependencies if necessary"
This reverts commit eb77e5f20d.
2017-12-18 16:35:23 -05:00
Devin Nusbaum b98ba8c8ff Update local data for tests 2017-12-18 16:12:29 -05:00
Devin Nusbaum 94b1ba9782 Add test asserting that outdated dependencies of detached plugins are updated 2017-12-18 14:21:30 -05:00
Devin Nusbaum eb77e5f20d Upgrade installed optional dependencies if necessary 2017-12-18 13:16:20 -05:00
Devin Nusbaum 01f70d4290 Don't copy the bundled dependency if the current version is already installed 2017-12-18 13:14:24 -05:00
Devin Nusbaum 7fc4815e11 Do not downgrade installed plugins when loading detached plugins 2017-12-18 12:40:20 -05:00
Devin Nusbaum 6f03e6b6b9 Remove unneeded type specifier in lambda 2017-12-18 12:02:13 -05:00
Devin Nusbaum 5098524513 Add failing test that reproduces JENKINS-48604 2017-12-18 10:59:47 -05:00
Kohsuke Kawaguchi c32b6d807a [maven-release-plugin] prepare for next development iteration 2017-12-17 16:39:29 -08:00
Kohsuke Kawaguchi eac29da4f1 [maven-release-plugin] prepare release jenkins-2.96 jenkins-2.96 2017-12-17 16:39:29 -08:00
Hubert Woszczyk 26262f8732 French localization: Changed é to \u00E9 (#3159) 2017-12-17 14:28:18 +01:00
Oleg Nenashev 968b6adf00 Merge pull request #3193 from dwnusbaum/JENKINS-48365
[JENKINS-48365] Install detached plugins when upgrading Jenkins past the version the plugins were detached
2017-12-17 14:26:51 +01:00
Daniel Beck 76c9f8beac Merge pull request #3187 from daniel-beck/JENKINS-34254-v2
[JENKINS-34254] Fix RequirePOST form
2017-12-16 22:16:37 +01:00
Daniel Beck 2476d1417e [JENKINS-48365] Restrict InstallUtil#NEW_INSTALL_VERSION 2017-12-16 13:31:28 +01:00
surenpi 24442d8d24 Add Chinese translation for parameter build 2017-12-16 17:54:20 +08:00
Wadeck Follonier 814d202716 [JENKINS-22474] API Token does not require CSRF token (#3129)
* [JENKINS-22474] API Token does not require CSRF token
- in order to ease the use of the api, we are not requiring the request to have a crumb
- in terms of security it's not a problem normally since the CSRF attacks use the cookies and in case of API Token, it's session-less / cookie-less

* - adjust the license header

* - add test for basic authentication
- add test for login process

* - add test for form submission using ui (htmlunit), not just login form

* - modification requested by Jesse

* - pom.xml update to use the last version of jenkins-test-harness (with the token helper methods)
- beginning of the simplification of tests

* - using the try-with-resource approach to ease readability

* - using closure method now

* - add missing login transformation

* - add unit test

* - use withToken
- remove useless crumb for GET method
- add fail (otherwise the assert in catch is not as useful as it could be)

* another bunch of test cases

* - for HudsonTestCase, some additional modifications are required: changing the view / different type of management for the variable inside the views

* - small other tests

* - last batch for the login method

* - crumb is not more required since we are using API Token

* - converting auth to ApiToken to avoid crumb method

* - converting auth to ApiToken to avoid crumb method (second)

* - remove usage of closure aware methods

* - update the pom using the snapshot as adviced by Jesse
- modifications on other class to adapt to the last modifications in JTH

* - modifications requested during code review

* - also put back my changes to the conflicted file

* - correction of the merge :)
2017-12-16 09:25:30 +01:00
Devin Nusbaum 1270ba3b40 [JENKINS-48405] Use NIO in tryOnceDeleteFile and makeWritable (#3169)
* Use NIO in tryOnceDeleteFile and makeWritable

* Don't try to set PosixFileAttributes on Windows

* Do not create arbitrary exceptions in makeWritable to fix test failures on Windows

* Remove unhelpful layer of exception wrapping

* Add test exercising Util#makeWritable in Util#tryOnceDeleteFile

* Add test for deleting a non-existant file

* Return early if changing permissions with NIO succeeds
2017-12-16 09:23:41 +01:00
Oleg Nenashev 3a529636cf Merge pull request #3198 from johnou/contention-JENKINS-48505
[JENKINS-48505] - Invoke optimistic get before computeIfAbsent to avoid contention.
2017-12-16 09:17:25 +01:00
Daniel Beck f0efdbab08 [JENKINS-34254] Add test 2017-12-15 23:43:01 +01:00
Daniel Beck 3c695a3ed6 [JENKINS-34254] Use released Stapler 1.254 2017-12-15 23:11:30 +01:00
Johno Crawford dce450e1b4 Invoke optimistic before computeIfAbsent to avoid contention. 2017-12-15 15:04:55 +01:00
surenpi eb7582a53d Add Chinese translation for slave agent configure 2017-12-15 21:07:16 +08:00
Krishan Bhasin 09bcc5d653 [JENKINS-47324] - Reduce usage of File.mkdirs() in FilePath and IOUtils (#3173)
* Move an instance of renameTo() to Files.move()

* Replace an instance of File.toURI() with an instance of Path.toUri()

* Replace mkdirs() with Files.createDirectories()
Replace mkdir() with Files.createTempDirectory()

* Undo addition of createTempDirectory() as per review comments

* Return to use of FilePath#mkdirs(File) and instead modify it to use the new API.

* Undo addition of toPath() in a URI conversion as it brings no benefits.

* Replace new uses of toPath() with Util.fileToPath() to pre-handle runtime exceptions

* Remove * import.
move mkdirs() to using FilePath method instead of File method.

* Make IOUtils.mkdirs(File) use Java7 API calls

* Add back accidentally removed imports.

* Fixed use of wildcard import

* Use utility method fileToPath() to handle potential exception thrown
2017-12-14 20:52:56 +01:00
Oleg Nenashev b4ff724c0c Merge pull request #3194 from Jochen-A-Fuerbacher/fixScriptConsoleTranslation
Fixed typo in German translation.
2017-12-14 20:45:59 +01:00
Oleg Nenashev 14605fea83 Introduce the new UserIdCause constructor, which accepts userId as an argument. (#3162)
* Introduce UserIdCause constructor, which accepts userId as an argument.

* [JENKINS-48467] - UserIdCuase: Add issue link in the TODO comment
2017-12-14 20:45:24 +01:00
Wadeck Follonier b7f42b2e59 [JENKINS-27027] Notify the SecurityListener on authentication (#3074)
* [JENKINS-27026] Notify the SecurityListener in case of Token based authentication success
- due the current version of the method, the UserDetails required for the event was not accessible. In order to stay with the same API in SecurityListener, two "protected" methods were created to split the job and let the UserDetails accessible

* - add test to ensure the SecurityListener is called for REST Token but also for regular basic auth

* - remove the comment about the split, will be put in GitHub comment instead

* - add check for anonymous call instead of just putting a comment
- remove the constructor in the dummy
- add link to PR from Daniel to simplify a call

* - separate the before/after to save one clear and be more explicit
- put more meaning in the assertLastEventIs method by explicitly say we will remove the last event

* - add comment about why we do not fire the "failedToAuthenticated" in the case of an invalid token (tips: it's because it could be a valid password)

* - also add the authenticated trigger on legacy filter as pointed by Ivan

* - add support of event on CLI remoting authentication
- adjust tests by moving the helper class used to spy on events

* - as mentioned Yvan, the code had some problems with null checking, so the approach is changed in order to encapsulate all that internal mechanism

* - add javadoc
- open the getUserDetailsForImpersonation from the User (will let the SSHD module to retrieve UserDetails from that)

* - remove single quote in log messages

* - basic corrections requested by Jesse

* - just another typo

* - adjust the javadoc for SecurityListener events

* - add the link to Jenkins#Anonymous

* - add link (not using see)

* - update comment on the isAnonymous as we (me + Oleg) do not find a best place at the moment

* - put the new method isAnonymous in ACL instead of Functions

* - little typo
- add requirement about the SecurityContext authentication
2017-12-14 20:44:54 +01:00
Jesse Glick ddb9ad68b4 Making nullOut behavior opt-in, so limiting to AbstractItem and View (and in particular not Jenkins). 2017-12-14 13:16:42 -05:00
Jesse Glick 3aa523969d Merge branch 'master' into unmarshal-JENKINS-21017 2017-12-14 10:56:58 -05:00
Jesse Glick a82a47a8f2 Merge pull request #3191 from jglick/ServiceLoader
Deprecating Service in favor of ServiceLoader
2017-12-14 10:14:16 -05:00
Jesse Glick 0aea8ab3af Merge branch 'security-stable-2.89' into security-master 2017-12-14 09:58:49 -05:00
Jesse Glick 69448007c8 Merge branch 'stable-2.89' 2017-12-14 09:57:45 -05:00
Jesse Glick 8a889de6c8 Merge commit '4c75250ad4b0d99496950ae83f4ba6aa2255c1c6' of git://github.com/jenkinsci/jenkins 2017-12-14 09:57:16 -05:00