* Allow disabling process killing on interuption
Plugins may want to do custom action when the execution of a remote process is interrupted. Currently it is not possible, because
the process started on a slave is killed on interruption.
My actual use case: https://groups.google.com/forum/#!msg/jenkinsci-dev/s6IkynOzdqE/2eFNKN9lAAAJ
My solution is to have a flag called killWhenInterrupted, set by default to true, which prevents process killing on the slave when unset.
* Invert killWhenInterrupted flag
* Add javadoc
* Don't forget estimated duration of asynchronous jobs.
When jobs are executed, the estimated duration is calculated, memorized
and reseted when the job is finished.
But when the job is executed asynchronously (e.g. as for pipeline
scripts), the execution is just triggered. Therefore the estimated
duration should remain - and not be reseted after triggering.
JENKINS-48821: Time remaining for all pipeline jobs is N/A
JENKINS-49616: Estimated time remaining NA
* Reset cached estimated duration also when asynchronous job ends.
* Fix a race condition in Util.loadFile()
If the file is deleted in between when its existence is checked and the
file is opened for reading, then the method will fail to return an empty
string.
* Switch to using FileUtils.readFileToString()
* [JENKINS-45387] Improve setup wizard account creation in security realm
This commit adds an additional account creation method to the
security realm, that allows to create a new user account (as the system)
and is intended to be used by the setup wizard.
The main difference to the existing method is that the new method does
not force the Stapler to send a response, but instead throws an
exception if invalid data is submitted. This allows to call this from
the setup wizard, and send the response there. (This is necessary
because the setup wizard method has a response return type and
there is no way to access the response already send in the realm)
Further, it splits the private createAccount() method for
clarity as well as to allow code reuse from the new method.
* [JENKINS-45387] Fix SetupWizard sending responses twice on create admin
This commit fixes an issue where the SetupWizard class would send
two responses (indirectly) when invalid form data was provided for
creating the first admin account.
* [Fix JENKINS-45387] Setup wizard not displaying first account errors
This commit fixes the setup wizard not displaying HTML error
responses upon first account creation.
Previously, it just froze (buttons were not re-enabled) and didn't
display responses. (Probably caused by XSS policies on the iframe)
* [JENKINS-45387] Add some @Restricted annotations
As per
https://github.com/jenkinsci/jenkins/pull/3116#discussion_r172031063https://github.com/jenkinsci/jenkins/pull/3116#discussion_r172051979
* Refactor TextFile.lines()
Introduces a LinesStream utility class that is responsible for closing
the underlying file handle.
Switches to calling Files.newBufferedReader() instead of wrapping the
InputStream returned by Files.newInputStream() in a BufferedReader of
an InputStreamReader.
Creates the file reader at the time that lines() is invoked, instead of
at the time that iterator() of the returned Iterable is invoked. This
can help prevent confusion as to the cause of an exception, whether it's
because of a problem opening the file or reading from it.
* Delete a duplicate import and a now-unused import
* Introduce load2()
* Add a @Deprecated annotation