Commit Graph
8609 Commits
Author SHA1 Message Date
Kohsuke Kawaguchi e219d19613 Added a method to read a file from the middle 2014-10-13 17:31:08 -07:00
Kohsuke Kawaguchi fad538f9ce read access to log file useful for plugins like support-core 2014-10-13 17:31:08 -07:00
Oleg Nenashev 55f15519ce Noting #1374
Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2014-10-11 14:31:09 +04:00
Oleg Nenashev a7cc2a1b3a Merge pull request #1374 from synopsys-arc-oss/JENKINS-24340
[FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false
2014-10-11 14:20:59 +04:00
Jesse Glick ef6c042447 Merge branch 'JENKINS-24763' of github.com:recampbell/jenkins 2014-10-10 15:28:58 -04:00
Oleg Nenashev d045618e0a Merge pull request #1421 from daniel-beck/JENKINS-24914
[FIXED JENKINS-24914] Don't block indefinitely every other month
2014-10-10 19:24:55 +04:00
Oleg Nenashev d158334f3b Merge pull request #1420 from daniel-beck/JENKINS-16184
[JENKINS-16184] Also escape greater-than character
2014-10-10 09:04:36 +04:00
Jesse Glick aac8c23972 [FIXED JENKINS-25081] Memory leak in BoundObjectTable when ProgressiveRendering is used. 2014-10-09 17:58:39 -04:00
Oleg Nenashev a78f1d3246 [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false
This changes prevents the improper usage of method without the preliminary supportsMakeDisabled() check.
As an example, Subversion plugin behaves in such way (JENKINS-24341)

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2014-10-09 17:01:58 +04:00
Daniel Beck adf8305f8b [FIXED JENKINS-24914] Don't block indefinitely every other month 2014-10-09 00:46:11 +02:00
Daniel Beck daacb02057 [JENKINS-16184] Also escape greater-than character 2014-10-09 00:38:22 +02:00
Jesse Glick c8b6f12784 Merge pull request #1414 from mattmoor/master
Convert AbstractProject to better utilize structure form submission.
2014-10-08 00:32:57 -04:00
Jesse Glick bbb60e51ed Adding Option.toString; should make ListBoxModel.toString more useful for tests or debugging. 2014-10-07 14:06:49 -04:00
Jesse Glick f8146742ed Better robustness when action loading fails.
For example, the following should not cause Run.onLoad itself to fail:
java.lang.NullPointerException
	at org.jenkinsci.plugins.workflow.steps.input.InputAction.onLoad(InputAction.java:29)
	at hudson.model.Run.onLoad(Run.java:342)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.onLoad(WorkflowRun.java:332)
2014-10-06 12:54:24 -04:00
Jesse Glick 6825121f06 [JENKINS-21224] Defend against exceptions in listeners, for now just for ItemListener.
java.lang.RuntimeException: Unable to copy /…/jobs/…/config.xml
	at hudson.plugins.jobConfigHistory.FileHistoryDao.createNewHistoryEntryAndCopyConfig(FileHistoryDao.java:252)
	at hudson.plugins.jobConfigHistory.FileHistoryDao.createNewItem(FileHistoryDao.java:238)
	at hudson.plugins.jobConfigHistory.JobConfigHistoryJobListener.onCreated(JobConfigHistoryJobListener.java:31)
	at hudson.model.listeners.ItemListener.fireOnCreated(ItemListener.java:161)
	at jenkins.model.Jenkins.putItem(Jenkins.java:2483)
	at …
Caused by: java.io.FileNotFoundException: /…/jobs/…/config.xml (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:120)
	at hudson.plugins.jobConfigHistory.FileHistoryDao.copyConfigFile(FileHistoryDao.java:178)
	at hudson.plugins.jobConfigHistory.FileHistoryDao.createNewHistoryEntryAndCopyConfig(FileHistoryDao.java:250)
	... 108 more
2014-10-06 10:18:16 -04:00
Daniel Beck fda84f456f Merge pull request #1306 from bkmeneguello/post-cancel-shutdown
[FIXED JENKINS-23020 JENKINS-23942] Convert the queue's cancel shutdown to POST
2014-10-03 22:02:30 +02:00
Jesse Glick c3d7e940d6 NPE during shutdown.
java.lang.NullPointerException
	at hudson.model.User.idStrategy(User.java:140)
	at hudson.model.User.getOrCreate(User.java:373)
	at hudson.model.User.get(User.java:366)
	at hudson.model.User.get(User.java:331)
	at hudson.model.User.get(User.java:441)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.getAuthentication(CpsFlowExecution.java:614)
	at org.jenkinsci.plugins.workflow.cps.CpsVmThread.run(CpsVmThread.java:20)
2014-10-02 16:47:44 -07:00
Kohsuke Kawaguchi 926e5f10bc merged back the RC branch 2014-10-01 12:54:13 -07:00
Kohsuke Kawaguchi a0fe61a098 Merge remote-tracking branch 'security/security' into rc
Conflicts:
	.idea/encodings.xml
	core/pom.xml
	pom.xml
	test/src/test/java/hudson/tasks/junit/CaseResultTest.java
2014-10-01 10:09:42 -07:00
Kohsuke Kawaguchi be195b0e19 [FIXED SECURITY-150]
Integrated the change
2014-10-01 08:21:06 -07:00
Matt Moore eec43983a3 This change converts several optionalBlock's wrapping a single field to inline="true".
By converting several optionalBlock entries to use inline="true", we convert the submitted JSON from:
   "hasPropertyFoo": {
     "propertyFoo": "value"
   },

which is a somewhat unnatural naming scheme, to:
   "hasPropertyFoo": true,
   "propertyFoo": "value",

This enables us to use the pattern:
   if(json.optBoolean("hasPropertyFoo", json.has("propertyFoo"))) {
     ...
   }

To permit either of the following as JSON blobs, for specifying a value for "propertyFoo":
1) "hasPropertyFoo": true,            # What comes through from jelly
   "propertyFoo": "value",

2) "propertyFoo": "value",

It also allows any of the following as JSON blobs, for NOT specifying a value for "propertyFoo":
3) "hasPropertyFoo": false,           # What comes through from jelly
   "propertyFoo": "value",

4) "hasPropertyFoo": false,

5) (nothing specified)

NOTE: The main interest in flexibility in what JSON comes through is in support of: https://wiki.jenkins-ci.org/display/JENKINS/YAML+Project+Plugin, this is also the purpose of the couple renames that are mixed in with this.
2014-09-29 09:36:19 -07:00
Matt Moore 86c911e8b9 Switch to using inline optionalBlock for several AbstractProject checkboxes so that we are passed a boolean, instead of either null or {}.
NOTE: The discrepancy between inline-optionalBlock and f:entry/f:checkbox is the text alignment, which optionalBlock keeps consistent with other elements (and what is done for these today).
2014-09-28 21:10:40 -07:00
Matt Moore 873de8cd22 Switch the source of a number of AbstractProject config options from StaplerRequest to JSONObject.
This change shifts the way a number of form elements are accessed when handling AbstractProject's doConfigSubmit from using "req.getParameter(...)" style access to using JSON-style (structured form submission) access through "reg.getSubmittedForm()".
2014-09-28 19:33:47 -07:00
Craig Rodrigues 1c1a4b7544 Add getFieldOrder() methods.
Add getFieldOrder() methods to classes which extend com.sun.jna.Structure,
for compatibility with newer versions of JNA.  [JENKINS-24521]
2014-09-27 17:22:54 -07:00
Kohsuke Kawaguchi 28d997704f [FIXED SECURITY-159]
Bumping up dependencies to 1.3.1, with extra precaution to make
DiskFileItem non-serializable
2014-09-27 15:51:47 -07:00
Jesse Glick c1e8b150b3 Simplifying JSONException handling in doConfigSubmit to use standard (?) error reporting.
Also sending the exception to the log, which is where plugin developers expect to see it.
(This is also necessary for the exception to be visible say from configRoundtrip in a functional test.
Otherwise you just see a FailingHttpStatusCodeException due to the 400 error code, with no details.)
Might actually suffice to just throw a ServletException wrapping the exception up the chain,
letting Stapler or the container handle it, but this change is more conservative.
2014-09-25 14:10:44 -04:00
Jesse Glick 2751bf4ac5 sendError(Exception…) should set the exception attribute on the response, since error.jelly handles this nicely. 2014-09-25 14:06:51 -04:00
Nicolas De Loof d54bc061b1 Merge branch 'JENKINS-24825' 2014-09-24 23:21:04 +02:00
Jesse Glick b2bb58895f Trying to improve a useless log warning when starting Docker slaves.
… hudson.tasks.Shell$DescriptorImpl getShellOrDefault
WARNING: Remote call on …@docker failed
2014-09-24 13:58:12 -04:00
Jesse Glick 511af1cea0 Noting that CloudSlaveRetentionStrategy appears to be a poor reimplementation of CloudRetentionStrategy. 2014-09-24 12:59:45 -04:00
Jesse Glick c04cdcd9f7 [FIXED JENKINS-22769] ItemListener callbacks should run as SYSTEM since they sometimes do ACL-checked calls. 2014-09-24 11:06:00 -04:00
Jesse Glick 253943e13e [JENKINS-5756] Removing workarounds for HotSpot bug.
https://bugs.openjdk.java.net/browse/JDK-6933067 claims to be fixed as of Java 6, our baseline.
2014-09-24 09:32:50 -04:00
Nicolas De Loof bd3abf6beb javadoc 2014-09-24 15:30:54 +02:00
Jesse Glick 28dfd90d2d Better to use an IllegalStateException rather than assertion in setResult.
Assertions are only for cases where you believe the failure of the condition is impossible.
For cases where external code might mistakenly make an incorrect call, throw an exception.
2014-09-24 08:49:21 -04:00
Nicolas De Loof 9b3f48853d [FIXED JENKINS-24825] define hudson.model.AbstractItem#movedTo 2014-09-24 14:03:41 +02:00
Stephen Connolly bfa9c503d6 Expose the remote cause details 2014-09-23 10:31:39 +01:00
Jesse Glick be76d09384 If during hudson-dev:run we have updated a bundled plugin, honor that pin at next start. 2014-09-22 13:03:31 -04:00
Jesse Glick 53958b8a33 Merge branch 'rc' into security-rc 2014-09-22 11:56:08 -04:00
Ryan Campbell 8bece68d33 Incorporate feedback from @jglick 2014-09-20 16:11:19 -05:00
Ryan Campbell 423b51a43a [JENKINS-24763] Prevent thread starvation in OldDataMonitor by reducing scope of synchronization 2014-09-20 12:13:59 -05:00
Jesse Glick 30f37b2c3a Merge branch 'security' into security-rc 2014-09-19 14:43:05 -04:00
Jesse Glick 38563d3470 @DataBoundConstructor makes no sense on an abstract class.
(cherry picked from commit 71600d8b37)
2014-09-19 14:40:52 -04:00
Jesse Glick 8aafca039d Merge branch 'security' into security-rc
Conflicts:
	core/src/main/java/hudson/model/AbstractItem.java
	core/src/main/java/hudson/security/ACL.java
	test/src/test/groovy/hudson/model/AbstractProjectTest.groovy
2014-09-18 10:32:00 -04:00
Jesse Glick 747238d898 Merge branch 'rc' into security-rc 2014-09-18 10:29:09 -04:00
Jesse Glick 16cbab5e48 Better toString. 2014-09-17 14:26:38 -04:00
CloudBees DEV@Cloud 8b2d70f60b Merge REMERGE_HEAD into HEAD 2014-09-17 14:42:17 +00:00
Daniel Beck 3d25f57aa1 Merge pull request #1370 from DavidRuhmann/JENKINS-7478
[FIXED JENKINS-7478] Correct Line Endings for Batch Files
2014-09-17 16:22:40 +02:00
Daniel Beck 8bb88be27e Merge pull request #1392 from dominiquebrice/javadoc_update
Updating javadoc of Plugin, LabelAtomProperty, GlobalConfiguration with ...
2014-09-17 16:20:21 +02:00
Daniel Beck f715fc7598 Merge pull request #620 from laurence-h/master
[FIXED JENKINS-15576] Label's Load Statistics queue length based on label assigned to job rather than to item in build queue.
2014-09-17 16:18:14 +02:00
Jesse Glick 71600d8b37 @DataBoundConstructor makes no sense on an abstract class. 2014-09-17 10:01:13 -04:00