Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-32821] Introduced a new option "How to apply the regul…
…ar expression to matrix" which replaces "Test regular expression for the matrix parent"
- Loading branch information
Showing
7 changed files
with
497 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/main/java/com/chikli/hudson/plugin/naginator/RegexpForMatrixStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright (c) 2016 IKEDA Yasuyuki | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
package com.chikli.hudson.plugin.naginator; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.jvnet.localizer.Localizable; | ||
|
||
/** | ||
* How to apply regexp to matrix builds. | ||
*/ | ||
public enum RegexpForMatrixStrategy { | ||
TestChildrenRetriggerAll(Messages._RegexpForMatrixStrategy_TestChildrenRetriggerAll()), | ||
TestChildrenRetriggerMatched(Messages._RegexpForMatrixStrategy_TestChildrenRetriggerMatched()), | ||
TestParent(Messages._RegexpForMatrixStrategy_TestParent()), | ||
; | ||
private final Localizable displayName; | ||
|
||
private RegexpForMatrixStrategy(Localizable displayName) { | ||
this.displayName = displayName; | ||
} | ||
|
||
public String getDisplayName() { | ||
return displayName.toString(); | ||
} | ||
|
||
@Nonnull | ||
public static RegexpForMatrixStrategy getDefault() { | ||
return TestChildrenRetriggerAll; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/com/chikli/hudson/plugin/naginator/Messages.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
NaginatorCause.Description=Started by Naginator after build {0} failure | ||
RegexpForMatrixStrategy.TestChildrenRetriggerAll=Test failed matrix parts, and retrigger all | ||
RegexpForMatrixStrategy.TestChildrenRetriggerMatched=Test failed matrix parts, and retrigger only matched parts | ||
RegexpForMatrixStrategy.TestParent=Test the parent build | ||
NoChildStrategy.RerunWhole.DisplayName=Rerun the matrix with all combinations | ||
NoChildStrategy.RerunEmpty.DisplayName=Rerun the matrix with no combinations | ||
NoChildStrategy.DontRerun.DisplayName=Don''t rerun | ||
NaginatorPublisher.RegexpForMatrixStrategy.RerunMatrixPartShouldBeEnabled=You need to enable "Rerun build only for failed parts on the matrix" to use this strategy. | ||
|
Oops, something went wrong.