aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Rendina <mrendina@stsci.edu>2017-11-29 15:44:22 -0500
committerMatt Rendina <mrendina@stsci.edu>2017-11-29 15:44:22 -0500
commit7f44a8306f820a01b4ad6d9bc1df4e25fee7868d (patch)
tree2c343b3f9760121ecc3cf19de5f0fb9a49fd40fc
parent84d3a21f81ac886f7be6aaa3feda1a3e2d14330c (diff)
downloadjscu_refactor-7f44a8306f820a01b4ad6d9bc1df4e25fee7868d.tar.gz
Test parameter insertion
-rw-r--r--src/BuildConfig.groovy18
-rw-r--r--vars/utils.groovy9
2 files changed, 19 insertions, 8 deletions
diff --git a/src/BuildConfig.groovy b/src/BuildConfig.groovy
index 4696381..6c9aeab 100644
--- a/src/BuildConfig.groovy
+++ b/src/BuildConfig.groovy
@@ -1,6 +1,6 @@
// src/BuildConfig.groovy
package BuildConfig;
-import org.jenkinsci.plugins.xunit.threshold.XUnitThreshold
+//import org.jenkinsci.plugins.xunit.threshold.XUnitThreshold
//@AutoClone // annotation is not CPS-compatible?
class BuildConfig implements Serializable {
@@ -10,9 +10,18 @@ class BuildConfig implements Serializable {
def build_cmds = []
def test_cmds = []
def run_tests = true
- def thresh = XUnitThreshold()
def thresholds = [[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: ''],
[$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']]
+ def failedFailureNewThresh = ''
+ def failedFailureThresh = ''
+ def failedUnstableNewThresh = ''
+ def failedUnstableThresh= ''
+
+ def skippedFailureNewThresh = ''
+ def skippedFailureThresh = ''
+ def skippedUnstableNewThresh = ''
+ def skippedUnstableThresh= ''
+
// Constructors
BuildConfig() {
@@ -23,11 +32,6 @@ class BuildConfig implements Serializable {
this.nodetype = nodetype
}
- //def setTestThreshold(valuemap) {
- // for (threshold in this.xunit_map) {
- // if (threshold
- //}
-
// copy method requires Jenkins script approval for the
// following signatures:
// method groovy.lang.MetaBeanProperty getSetter
diff --git a/vars/utils.groovy b/vars/utils.groovy
index eff3de2..56dff19 100644
--- a/vars/utils.groovy
+++ b/vars/utils.groovy
@@ -82,8 +82,15 @@ def concurrent(configs) {
// [$class: 'FailedThreshold', failureThreshold: '6']],
// tools: [[$class: 'JUnitType', pattern: '*.xml']]])
step([$class: 'XUnitBuilder',
- thresholds: [myconfig.thresholds],
+ thresholds: [
+ [$class: 'SkippedThreshold', unstableThreshold: "${myconfig.skippedUnstableThresh}"],
+ [$class: 'SkippedThreshold', failureThreshold: "${myconfig.skippedFailureThresh}"],
+ [$class: 'FailedThreshold', unstableThreshold: "${myconfig.failedUnstableThresh}"],
+ [$class: 'FailedThreshold', failureThreshold: "${myconfig.failedFailureThresh}"]],
tools: [[$class: 'JUnitType', pattern: '*.xml']]])
+ //step([$class: 'XUnitBuilder',
+ // thresholds: [myconfig.thresholds],
+ // tools: [[$class: 'JUnitType', pattern: '*.xml']]])
}
}
//} //end withEnv