Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced Job.logRotator with BuildDiscarderProperty.
- Loading branch information
Showing
72 changed files
with
161 additions
and
53 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
78 changes: 78 additions & 0 deletions
78
core/src/main/java/jenkins/model/BuildDiscarderProperty.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,78 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright 2015 CloudBees, Inc. | ||
* | ||
* 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 jenkins.model; | ||
|
||
import hudson.Extension; | ||
import hudson.model.Descriptor; | ||
import hudson.model.DescriptorVisibilityFilter; | ||
import hudson.model.Items; | ||
import hudson.model.Job; | ||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
/** | ||
* Defines a {@link BuildDiscarder}. | ||
*/ | ||
public class BuildDiscarderProperty extends OptionalJobProperty<Job<?,?>> { | ||
|
||
private final BuildDiscarder strategy; | ||
|
||
@DataBoundConstructor | ||
public BuildDiscarderProperty(BuildDiscarder strategy) { | ||
this.strategy = strategy; | ||
} | ||
|
||
public BuildDiscarder getStrategy() { | ||
return strategy; | ||
} | ||
|
||
@Extension | ||
public static class DescriptorImpl extends OptionalJobPropertyDescriptor { | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return Messages.BuildDiscarderProperty_displayName(); | ||
} | ||
|
||
static { | ||
Items.XSTREAM2.addCompatibilityAlias("org.jenkinsci.plugins.workflow.job.properties.BuildDiscarderProperty", BuildDiscarderProperty.class); | ||
} | ||
|
||
} | ||
|
||
@Extension | ||
public static class ConditionallyHidden extends DescriptorVisibilityFilter { | ||
|
||
@SuppressWarnings("rawtypes") | ||
@Override | ||
public boolean filter(Object context, Descriptor descriptor) { | ||
if (descriptor instanceof DescriptorImpl && context instanceof Job) { | ||
return ((Job) context).supportsLogRotator(); | ||
} | ||
return true; | ||
} | ||
|
||
} | ||
|
||
} |
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
1 change: 0 additions & 1 deletion
1
core/src/main/resources/hudson/model/Job/configure_cs.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,6 +1,5 @@ | ||
# This file is under the MIT License by authors | ||
|
||
Description=Popis | ||
Discard\ Old\ Builds=Zahodit star\u00E9 sestaven\u00ED | ||
LOADING=Nahr\u00E1v\u00E1n\u00ED | ||
name=jm\u00E9no |
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
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
1 change: 0 additions & 1 deletion
1
core/src/main/resources/hudson/model/Job/configure_es_AR.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,6 +1,5 @@ | ||
# This file is under the MIT License by authors | ||
|
||
Description=Descripci\u00F3n | ||
Discard\ Old\ Builds=Descargar build antiguos | ||
LOADING=CARGANDO | ||
name={0} nombre |
1 change: 0 additions & 1 deletion
1
core/src/main/resources/hudson/model/Job/configure_et.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,6 +1,5 @@ | ||
# This file is under the MIT License by authors | ||
|
||
Description=Kirjeldus | ||
Discard\ Old\ Builds=Eemalda vanad bildid | ||
LOADING=Laen | ||
name={0} nimi |
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
1 change: 0 additions & 1 deletion
1
core/src/main/resources/hudson/model/Job/configure_he.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,6 +1,5 @@ | ||
# This file is under the MIT License by authors | ||
|
||
Description=\u05EA\u05D0\u05D5\u05E8 | ||
Discard\ Old\ Builds=\u05D4\u05E9\u05DE\u05D3 \u05D1\u05E0\u05D9\u05D5\u05EA \u05D9\u05E9\u05E0\u05D5\u05EA | ||
LOADING=\u05D8\u05D5\u05E2\u05DF | ||
name=\u05E9\u05DD {0} |
1 change: 0 additions & 1 deletion
1
core/src/main/resources/hudson/model/Job/configure_hu.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,7 +1,6 @@ | ||
# This file is under the MIT License by authors | ||
|
||
Description=Le\u00EDr\u00E1s | ||
Discard\ Old\ Builds=R\u00E9gi \u00E9p\u00EDt\u00E9sek t\u00F6rl\u00E9se | ||
LOADING=BET\u00D6LT\u00C9S | ||
Strategy=Strat\u00E9gia | ||
name={0} n\u00E9v |
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
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
1 change: 0 additions & 1 deletion
1
core/src/main/resources/hudson/model/Job/configure_lt.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,5 @@ | |
# THE SOFTWARE. | ||
|
||
Description=Beskrivelse | ||
Discard\ Old\ Builds=Slett gamle bygg | ||
LOADING=LASTER | ||
name={0} navn |
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
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
1 change: 0 additions & 1 deletion
1
core/src/main/resources/hudson/model/Job/configure_pt_PT.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,6 +1,5 @@ | ||
# This file is under the MIT License by authors | ||
|
||
Description=Descri\u00E7\u00E3o | ||
Discard\ Old\ Builds=Descartar compila\u00E7\u00F5es antigas | ||
LOADING=A CARREGAR | ||
name={0} nome |
1 change: 0 additions & 1 deletion
1
core/src/main/resources/hudson/model/Job/configure_ro.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,7 +1,6 @@ | ||
# This file is under the MIT License by authors | ||
|
||
Description=Descriere | ||
Discard\ Old\ Builds=Anuleaza Build-urile vechi | ||
LOADING=SE INCARCA | ||
Strategy=Strategie | ||
name=numele {0} |
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
1 change: 0 additions & 1 deletion
1
core/src/main/resources/hudson/model/Job/configure_sk.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,7 +1,6 @@ | ||
# This file is under the MIT License by authors | ||
|
||
Description=Popis | ||
Discard\ Old\ Builds=Vymazanie star\u00FDch zostaven\u00ED | ||
LOADING=Nahr\u00E1vanie | ||
Strategy=Strat\u00E9gia | ||
name={0} meno |
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
1 change: 0 additions & 1 deletion
1
core/src/main/resources/hudson/model/Job/configure_uk.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
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
Oops, something went wrong.