Skip to content

Commit 59e48db

Browse files
committed
Merge branch 'plots_add_logarithmic'
2 parents e5a4b53 + c8b0fc1 commit 59e48db

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

docs/Job-reference.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3939,6 +3939,7 @@ job {
39393939
useDescriptions(boolean useDescriptions = true) // defaults to false
39403940
excludeZero(boolean excludeZero = true) // defaults to false
39413941
keepRecords(boolean keepRecords = true) // defaults to false
3942+
logarithmic(boolean logarithmic = true) // defaults to false
39423943
propertiesFile(String fileName) {
39433944
label(String label)
39443945
}
@@ -3992,6 +3993,7 @@ job {
39923993
useDescriptions()
39933994
keepRecords()
39943995
excludeZero()
3996+
logarithmic()
39953997
propertiesFile('my_data.properties') {
39963998
label('Builds')
39973999
}

job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PlotContext.groovy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class PlotContext implements Context {
2121
boolean useDescriptions
2222
boolean keepRecords
2323
boolean excludeZero
24+
boolean logarithmic
2425

2526
PlotContext(String group, String dataStore) {
2627
this.group = group
@@ -56,6 +57,10 @@ class PlotContext implements Context {
5657
this.excludeZero = excludeZero
5758
}
5859

60+
void logarithmic(boolean logarithmic = true) {
61+
this.logarithmic = logarithmic
62+
}
63+
5964
void propertiesFile(String fileName, Closure plotSeriesClosure = null) {
6065
checkArgument(!Strings.isNullOrEmpty(fileName), 'fileName must not be null or empty')
6166

job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContext.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ class PublisherContext implements Context {
391391
useDescr(plot.useDescriptions)
392392
keepRecords(plot.keepRecords)
393393
exclZero(plot.excludeZero)
394-
logarithmic(false)
394+
logarithmic(plot.logarithmic)
395395
}
396396
}
397397
}

job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContextSpec.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3127,6 +3127,7 @@ class PublisherContextSpec extends Specification {
31273127
useDescriptions()
31283128
keepRecords()
31293129
excludeZero()
3130+
logarithmic()
31303131
propertiesFile('data.prop')
31313132
}
31323133
}
@@ -3147,7 +3148,7 @@ class PublisherContextSpec extends Specification {
31473148
useDescr[0].value() == true
31483149
keepRecords[0].value() == true
31493150
exclZero[0].value() == true
3150-
logarithmic[0].value() == false
3151+
logarithmic[0].value() == true
31513152
with(series[0].'hudson.plugins.plot.PropertiesSeries'[0]) {
31523153
children().size() == 3
31533154
file[0].value() == 'data.prop'

0 commit comments

Comments
 (0)