Commit Graph
729 Commits
Author SHA1 Message Date
Daniel Beck a34479c418 [JENKINS-43228] Add test 2017-03-30 18:11:52 +02:00
Akbashev Alexander e8efc96f3d [JENKINS-42319] - Fix broken compareTo method of Run (#2762)
* JENKINS-42319: Fix broken compareTo method of Run

Previous implementation relied on fact that users always compare run
objects with same parent. But this is not always the case.
So, it was not safe to put runs from different parents to TreeSet, i.e.

* Make comparasion more performance friendly
2017-03-19 00:10:37 +01:00
Daniel Beck 62adfa8817 Merge pull request #2683 from szpak/feature/JENKINS-40718-searchByBuildParams
[JENKINS-40718] Search by build params in build history widget
2017-03-08 12:02:51 +01:00
Alex Earl e02f13592a Fix missing semi-colon 2017-03-03 15:06:50 -07:00
Alex Earl 77d6979634 Ignore deletedFolder test on Windows
Windows doesn't allow deleting directories that have a file open inside of them, so this test is invalid on windows.
2017-03-03 15:00:33 -07:00
Daniel Beck 335fb4bc78 Merge pull request #2763 from slide/windows-ci
Fix tests on Windows
2017-02-26 21:25:25 +01:00
Brendan Nolan 01fe717f35 [JENKINS-18734] - Call perform(AbstractBuild build, Launcher launcher, BuildListener listener) if implemented in BuildStep 2017-02-14 20:52:45 +00:00
Alex Earl 3c4186fc01 More ignores 2017-02-12 18:41:37 -07:00
Marcin Zajączkowski 5a6103c31d [JENKINS-40718] Integration tests for case insensitive search 2017-02-12 23:01:54 +01:00
Josh Soref 496703d0fe Spelling fixes in changelogs, Javadoc, logs and UI (#2718)
* spelling: abstract

* spelling: about

* spelling: absolute

* spelling: across

* spelling: activity

* spelling: actually

* spelling: addition

* spelling: allocating

* spelling: ambiguous

* spelling: analyzes

* spelling: analysis

* spelling: another

* spelling: appear

* spelling: arbitrary

* spelling: artifact

* spelling: assignment

* spelling: associated

* spelling: augment

* spelling: authentication

* spelling: automatically

* spelling: available

* spelling: availability

* spelling: because

* spelling: background

* spelling: beginning

* spelling: boolean

* spelling: browsers

* spelling: building

* spelling: calculation

* spelling: channel

* spelling: column

* spelling: concatenation

* spelling: connect

* spelling: contribute

* spelling: convert

* spelling: copied

* spelling: couldn't

* spelling: scrambled

* spelling: creates-a

* spelling: curr-entry

* spelling: customize

* spelling: diagnostic

* spelling: contain

* spelling: default

* spelling: delimiter

* spelling: descriptor

* spelling: disambiguates

* spelling: different

* spelling: diligently

* spelling: disabled

* spelling: discovered

* spelling: display

* spelling: doesn't

* spelling: dollar

* spelling: downstream

* spelling: dynamically

* spelling: preemptively

* spelling: encrypt

* spelling: erroneous

* spelling: examine

* spelling: existence

* spelling: value

* spelling: february

* spelling: handling

* spelling: hostname

* spelling: convenient

* spelling: identify

* spelling: implementation

* spelling: incorrect

* spelling: individual

* spelling: initialization

* spelling: initialized

* spelling: inputstream

* spelling: instantiated

* spelling: instantiation

* spelling: intended

* spelling: interpreted

* spelling: interrupted

* spelling: invocations

* spelling: kern

* spelling: localization

* spelling: logger

* spelling: malfunctioning

* spelling: methods

* spelling: monitor

* spelling: mutator

* spelling: multiple

* spelling: object

* spelling: configured

* spelling: optionally

* spelling: option

* spelling: overridden

* spelling: parameterized

* spelling: parent

* spelling: permissions

* spelling: plugin

* spelling: potentially

* spelling: preferable

* spelling: problems like

* spelling: programmatically

* spelling: property

* spelling: reallocate

* spelling: recommended

* spelling: redirected

* spelling: registered

* spelling: reliable

* spelling: remember

* spelling: recurrence

* spelling: repeatable

* spelling: repeated

* spelling: resource

* spelling: retrieve

* spelling: returned

* spelling: revision

* spelling: sandwich

* spelling: separator

* spelling: serialization

* spelling: settings

* spelling: shadow

* spelling: should

* spelling: someone

* spelling: source

* spelling: specified

* spelling: style

* spelling: subversion

* spelling: sufficient

* spelling: supplementary

* spelling: suppressing

* spelling: synchronization

* spelling: synchronized

* spelling: this

* spelling: transitioning

* spelling: termination

* spelling: trying

* spelling: truncatable

* spelling: unknown

* spelling: undeployed

* spelling: unnecessary

* spelling: unparseable

* spelling: update

* spelling: upper

* spelling: verify

* spelling: visible

* spelling: warning

* spelling: we're

* spelling: whitespace

* spelling: wide

* spelling: with

* spelling: workspace

* spelling: yielding

* spelling: to

* spelling: by

* spelling: the

* spelling: hours
2017-02-12 13:38:30 +03:00
Jesse Glick afe17a4bda [FIXED JENKINS-16634] Do not fail to write a log file just because something deleted the parent directory. 2017-02-06 17:23:31 -05:00
Marcin Zajączkowski 065a042910 [JENKINS-40718] Reduce duplication in tests 2017-02-01 17:28:16 +01:00
Marcin Zajączkowski 0a221d0b47 [JENKINS-40718] Consider insensitiveSearch user configuration 2017-02-01 16:53:01 +01:00
Marcin Zajączkowski 785a8cf18d [JENKINS-40718] Filter out sensitive parameters on search 2017-02-01 16:24:35 +01:00
Marcin Zajączkowski 67e7004677 [JENKINS-40718] Support for Pipeline jobs 2017-02-01 16:24:35 +01:00
Marcin Zajączkowski 649464f1b8 [JENKINS-40718] Make search in Build history really case insensitive 2017-02-01 16:24:24 +01:00
Marcin Zajączkowski 488d11ab2d [JENKINS-40718] Search by build param values in Build history widget 2017-02-01 16:24:20 +01:00
Daniel Beck a1cad0b839 Merge pull request #1485 from jglick/printStackTrace-JDK-6507809
Print stack trace in logical order
2017-01-28 23:14:36 +01:00
Baptiste Mathus fceabf0f0f Fix test failing on Windows because of line feed assumption
The line separator length was assumed to be 1 byte wide, although it
could be 2 on some platforms (aka Windows).
2017-01-01 14:43:07 +01:00
andrealaura f042bf2215 [FIX JENKINS-40053]: Use english as default-locale ResourceBundleUtilTest#test_unknown_locale (#2650)
* [FIX JENKINS-40053]: Use english as default-locale, so the ResourceBundleUtilTest runs also on systems with other default os locales.

* [FIX JENKINS-40053]: Cleanup Locale after test to avoid impact on other tests.

*  [FIX JENKINS-40053]: Use english as default-locale only in the required test method.

* [FIX JENKINS-40053]: Cleanup unused imports.
2016-12-15 08:25:23 +01:00
Oleg Nenashev 1868c8486b Merge pull request #2645 from alvarolobato/JENKINS-28245
[FIX JENKINS-28245] - Allow defining agent ping interval and ping timeout in seconds
2016-12-14 10:38:53 +01:00
Jesse Glick 7f4ce02e42 Handle circular references. 2016-12-12 16:14:48 -05:00
Jesse Glick 187731fd88 Check for printStackTrace overrides. 2016-12-12 16:06:57 -05:00
Jesse Glick da54171682 Handle suppressed exceptions. 2016-12-12 16:00:30 -05:00
Jesse Glick 106bd3e018 More test coverage. 2016-12-12 15:35:06 -05:00
Jesse Glick b55ef51ab6 More robust & flexible test framework for printThrowable. 2016-12-12 15:05:03 -05:00
Jesse Glick 2abddbdfcc Merge branch 'master' into printStackTrace-JDK-6507809 2016-12-12 14:25:12 -05:00
Stephen Connolly e18b34caaf Merge pull request #2603 from stephenc/jenkins-39300
[JENKINS-39300] View.getDisplayName() is ignored when rendering tabs
2016-12-12 15:13:46 +00:00
andrealaura ba2900b27d [FIX JENKINS-36044]: Added default locale to XMLUtilsTest so that it … (#2649)
* [FIX JENKINS-36044]: Added default locale to XMLUtilsTest so that it runs independent from the host OS locale.

* [FIX JENKINS-36044]: Cleanup default-locale after test, to avoid impact to other tests.

*  [FIX JENKINS-36044]: Make test language indepedent.

* [FIX JENKINS-36044]: Cleanup unused imports.
2016-12-09 11:23:58 +01:00
Alvaro Lobato 6dea3c3f70 [JENKINS-28245] - Finish deadmoose's work to allow defining agent ping interval and ping timeout in seconds 2016-11-29 11:15:16 +01:00
David Hoover d563062747 [FIXED JENKINS-28245] Allow finer-grained tuning of ChannelPinger.
* Allows customization in seconds, not minutes
 * Allows customization of the ping timeout (before, you could set a
   custom interval, but the timeout would always be PingThread's 4
   minute default)

This also drops the serialVersionUID from ChannelPinger.SetUpRemotePing;
without one provided, the JVM will generate one on demand which is
sufficient for the purposes here since these are never persisted and
master & slave run the same compiled code. (And it demonstrably works
since countless other MasterToSlaveCallables fail to specify their own
custom IDs)
2016-11-29 10:28:01 +01:00
Oliver Gondža a077b6ec9c Report dependency version we failed to load, not the one we require 2016-11-25 15:22:25 +01:00
Sam Van Oort a63b50f4df [FIXED JENKINS-39555] Don't do the actions initialization by helper method (#2624)
* Coarse fix for JENKINS-39555 - don't do the actions initialization by helper method

* Small cleanup of docs, import

* Testcase

* Review changes
2016-11-08 00:06:53 +01:00
Akbashev Alexander 2e8c3bec8e [FIXED JENKINS-39535] - Optimize get log method (#2607)
* Add some tests to  current behaviour of getLog method

* getLog(maxLines) reads only last maxLines lines now

It should speed up and reduce memory consumption for some plugins (i.e.
Email-ext Plugin).
Also now this method could be used to get last lines of build output in efficient manner.

* Fix issues from code review
2016-11-06 11:25:58 +01:00
Stephen Connolly 183fac8a63 [JENKINS-39404] Introduce an addOrReplaceAction method with dirty return type
- We cannot modify `replaceAction` to return the dirty flag, in fact most callers probably don't care... but if you do care, we now provide `addOrReplaceAction`
- Clarify the javadocs to reflect that these methods are not going to affect actions added by transient action factories
2016-11-02 09:16:42 +00:00
Stephen Connolly 65de34f7b9 [JENKINS-39404] Minimize non-changes affecting write to disk requirement 2016-11-01 15:36:33 +00:00
Stephen Connolly f03e6fd1ca [JENKINS-39404] Allow a more generic replaceActions 2016-11-01 13:29:56 +00:00
Stephen Connolly 1990e3d09a [FIXED JENKINS-39404] Restore symmetry by adding removeAction and removeActions methods to Actionable 2016-11-01 13:17:25 +00:00
Stephen Connolly f3d13af44d [JENKINS-39300 Follow-up] Default columns should respect DescriptorVisiblilityFilters 2016-10-27 12:34:22 +01:00
Stephen Connolly 71cbe0cc7c [JENKINS-36871, JENKINS-37565] JNLP4-connect implementation and Remoting 3 (#2492)
* [JENKINS-36871] Switch to the new JnlpProtocolHandler based implementation

Todo

- [ ] Restore the cookie behaviour (but done right this time)
- [ ] Perhaps investigate issuing clients with TLS certificates (but would require a UI for managing them)

* [JENKINS-36871] License headers and javadocs

* [JENKINS-36871] Restore cookie handling

* [JENKINS-36871] Integrating Agent discovery components

* [JENKINS-36871] Pick up remoting 3.0-SNAPSHOT

* [JENKINS-36871] Pick up newer snapshot

* [JENKINS-36871] Oleg wants to log an exception that cannot happen
2016-10-20 13:01:30 +02:00
Oleg Nenashev 7d886ce9fb [FIXED JENKINS-35967] - Make User#isIdOrFullnameAllowed() more robust against restricted usernames (#2413)
This change hardens username verification in user creation commands. See the issue to get rexamples.

https://issues.jenkins-ci.org/browse/JENKINS-35967
2016-10-15 16:57:02 -07:00
Oliver Gondža 7f6f495f86 Avoid deprecated findbugs annotations (#2144)
* Avoid deprecated findbugs annotations

* One more forgotten annotation
2016-10-15 12:53:56 -07:00
Nicolas De Loof 7b39424495 rely on try-with-resources 2016-10-03 15:12:48 +02:00
Oliver Gondža 11af7d0bc1 [FIXED JENKINS-37616] Make Cloud.PROVISION independent from Jenkins.ADMINISTER (#2521) 2016-08-27 22:23:08 +02:00
dbroady1 f4edf91782 [JENKINS-29956] Test Windows junctions before Java 7 symlink (#1787)
* Test Windows junctions before Java 7 symlink

Apparently Java 7 (and later) do not count Windows junctions as
symlinks.  When you drill down into the BasicFileAttributes structure,
reparse points are only counted under isOther.  So, since we already
have code that properly detects Windows Junctions, let's use that first
and then fallback to the Java 7 code.

* Add comment for change & link bug.

* Add test case

* Switch to Functions.isWindows().

* Use non-deprecated APIs for tmp file/dir mgmt

* Add better debugging.

* Allow spaces in junction name & dir name.

To do that, it was easier to use ProcessBuilder vs building up the correct
string in code to send to cmd.exe.

Also, I'll note that according to http://ss64.com/nt/syntax-internal.html,
mklink is in internal cmd.exe command.  So, it must be invoked through
"cmd.exe /c" for it to work.

* Remove comment mentioning bug number.

* Remove debugging output, per Baptiste's request

* Add newline at end of file.

* Make sure that the junction was removed.

* Use assertEquals to show retcode of Process.waitFor.

* Fix compilation errors by importing functions
2016-08-22 15:21:33 +02:00
Oleg Nenashev 96c97860b0 [FIXED JENKINS-37332] - Prevent File descriptor leaks when reading manifests from JARs (#2516)
* [JENKINS-37332] - Improve diagnostics of non-closed streams during reading of the manifests in PluginManager

* [JENKINS-37332] - Leakless processing of JarUrlConnection during Manifest parsing

* [JENKINS-37332] - Also implement leak-safe method for retrieving file modification date

* [JENKINS-37332] - Add spotcheck methods for manifest file access + Javadoc

* [JENKINS-37332] - Also test multi-line and empty attributes in the test
2016-08-21 00:00:41 +02:00
Stephen Connolly 136aeb86a4 [JENKINS-37189] Refactor to make more testable
- A pure unit tests will suffice
2016-08-09 11:07:53 +01:00
DJ Lee 55203ebeed [FIXED JENKINS-31791] Optimize BuildHistoryWidget (#2456)
* [FIXED JENKINS-31791] Optimize BuildHistoryWidget

Refactor HistoryPageFilter to lazily evaluate an iterable of previous
runs, instead of instantiating a super long list of builds.
Instantiating the whole list can be problematic with lots of
historical builds especially if disk IO is slow.
2016-08-02 20:38:58 +02:00
Jesse Glick b6dfdf4c8e Merge branch 'master' into LoggerRule 2016-07-11 11:05:00 -04:00
Jesse Glick 12fd3e47e3 [FIXED JENKINS-27530] Jenkins.reload must also reload the Queue to ensure that every Queue.Item.task corresponds to a live Job, lest nextBuildNumber be bogus. 2016-07-07 20:50:54 -04:00