-
Notifications
You must be signed in to change notification settings - Fork 830
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add pipeline aggregator plugin support
- Loading branch information
1 parent
748e590
commit 9305be2
Showing
16 changed files
with
354 additions
and
0 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
5 changes: 5 additions & 0 deletions
5
...core/src/main/docs/examples/javaposse/jobdsl/dsl/DslFactory/pipelineAggregatorView.groovy
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,5 @@ | ||
pipelineAggregatorView('pipeline-aggregator-view') { | ||
filterRegex('.*Pipeline') | ||
onlyLastBuild() | ||
useCondensedTables() | ||
} |
3 changes: 3 additions & 0 deletions
3
...n/docs/examples/javaposse/jobdsl/dsl/views/PipelineAggregatorView/buildHistorySize.groovy
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,3 @@ | ||
pipelineAggregatorView('pipeline-aggregator-view') { | ||
buildHistorySize(10) | ||
} |
3 changes: 3 additions & 0 deletions
3
...c/main/docs/examples/javaposse/jobdsl/dsl/views/PipelineAggregatorView/description.groovy
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,3 @@ | ||
pipelineAggregatorView('pipeline-aggregator-view') { | ||
description('View description') | ||
} |
3 changes: 3 additions & 0 deletions
3
...c/main/docs/examples/javaposse/jobdsl/dsl/views/PipelineAggregatorView/filterRegex.groovy
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,3 @@ | ||
pipelineAggregatorView('pipeline-aggregator-view') { | ||
filterRegex('.*Pipeline') | ||
} |
3 changes: 3 additions & 0 deletions
3
.../src/main/docs/examples/javaposse/jobdsl/dsl/views/PipelineAggregatorView/fontSize.groovy
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,3 @@ | ||
pipelineAggregatorView('pipeline-aggregator-view') { | ||
fontSize(10) | ||
} |
3 changes: 3 additions & 0 deletions
3
...main/docs/examples/javaposse/jobdsl/dsl/views/PipelineAggregatorView/onlyLastBuild.groovy
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,3 @@ | ||
pipelineAggregatorView('pipeline-aggregator-view') { | ||
onlyLastBuild() | ||
} |
3 changes: 3 additions & 0 deletions
3
...docs/examples/javaposse/jobdsl/dsl/views/PipelineAggregatorView/useCondensedTables.groovy
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,3 @@ | ||
pipelineAggregatorView('pipeline-aggregator-view') { | ||
useCondensedTables() | ||
} |
3 changes: 3 additions & 0 deletions
3
...ocs/examples/javaposse/jobdsl/dsl/views/PipelineAggregatorView/useScrollingCommits.groovy
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,3 @@ | ||
pipelineAggregatorView('pipeline-aggregator-view') { | ||
useScrollingCommits() | ||
} |
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
87 changes: 87 additions & 0 deletions
87
job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/views/PipelineAggregatorView.groovy
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,87 @@ | ||
package javaposse.jobdsl.dsl.views | ||
|
||
import javaposse.jobdsl.dsl.JobManagement | ||
import javaposse.jobdsl.dsl.NoDoc | ||
import javaposse.jobdsl.dsl.View | ||
|
||
import static javaposse.jobdsl.dsl.Preconditions.checkArgument | ||
import static javaposse.jobdsl.dsl.Preconditions.checkNotNullOrEmpty | ||
|
||
class PipelineAggregatorView extends View { | ||
|
||
PipelineAggregatorView(JobManagement jobManagement, String name) { | ||
super(jobManagement, name) | ||
} | ||
|
||
/** | ||
* Set the number of most recent builds to display. Defaults to {@code 16}. | ||
*/ | ||
void buildHistorySize(int buildHistorySize) { | ||
checkArgument(buildHistorySize > 0, 'buildHistorySize must be positive integer') | ||
|
||
configure { | ||
it / methodMissing('buildHistorySize', buildHistorySize) | ||
} | ||
} | ||
|
||
/** | ||
* Set regular expression used for filtering pipelines to be displayed. | ||
*/ | ||
void filterRegex(String filterRegex) { | ||
checkNotNullOrEmpty(filterRegex, 'filterRegex must be specified') | ||
|
||
configure { | ||
it / methodMissing('filterRegex', filterRegex) | ||
} | ||
} | ||
|
||
/** | ||
* Set font size. Defaults to {@code 16}. | ||
*/ | ||
void fontSize(int fontSize) { | ||
checkArgument(fontSize > 0, 'fontSize must be positive integer') | ||
|
||
configure { | ||
it / methodMissing('fontSize', fontSize) | ||
} | ||
} | ||
|
||
/** | ||
* Display only last pipeline build. Defaults to {@code false}. | ||
*/ | ||
void onlyLastBuild(boolean onlyLastBuild = true) { | ||
configure { | ||
it / methodMissing('onlyLastBuild', onlyLastBuild) | ||
} | ||
} | ||
|
||
/** | ||
* Use condensed tables. Defaults to {@code false}. | ||
*/ | ||
void useCondensedTables(boolean useCondensedTables = true) { | ||
configure { | ||
it / methodMissing('useCondensedTables', useCondensedTables) | ||
} | ||
} | ||
|
||
/** | ||
* Use scrolling commits. Defaults to {@code false}. | ||
*/ | ||
void useScrollingCommits(boolean useScrollingCommits = true) { | ||
configure { | ||
it / methodMissing('useScrollingCommits', useScrollingCommits) | ||
} | ||
} | ||
|
||
@Override | ||
@NoDoc | ||
void filterBuildQueue(boolean filterBuildQueue = true) { | ||
super.filterBuildQueue(filterBuildQueue) | ||
} | ||
|
||
@Override | ||
@NoDoc | ||
void filterExecutors(boolean filterExecutors = true) { | ||
super.filterExecutors(filterExecutors) | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...sl-core/src/main/resources/javaposse/jobdsl/dsl/views/PipelineAggregatorView-template.xml
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,11 @@ | ||
<?xml version="1.1" encoding="UTF-8"?> | ||
<com.ooyala.jenkins.plugins.pipelineaggregatorview.PipelineAggregator> | ||
<filterExecutors>false</filterExecutors> | ||
<filterQueue>false</filterQueue> | ||
<properties class="hudson.model.View$PropertyList"/> | ||
<fontSize>16</fontSize> | ||
<buildHistorySize>16</buildHistorySize> | ||
<useCondensedTables>false</useCondensedTables> | ||
<onlyLastBuild>false</onlyLastBuild> | ||
<useScrollingCommits>false</useScrollingCommits> | ||
</com.ooyala.jenkins.plugins.pipelineaggregatorview.PipelineAggregator> |
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.