blob: 6c9aeab0824e9c1b532ea9cdf9e5e0cf9d7780f8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// src/BuildConfig.groovy
package BuildConfig;
//import org.jenkinsci.plugins.xunit.threshold.XUnitThreshold
//@AutoClone // annotation is not CPS-compatible?
class BuildConfig implements Serializable {
def nodetype = ""
def build_mode = ""
def env_vars = []
def build_cmds = []
def test_cmds = []
def run_tests = true
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() {
nodetype = ""
}
BuildConfig(nodetype) {
this.nodetype = nodetype
}
// copy method requires Jenkins script approval for the
// following signatures:
// method groovy.lang.MetaBeanProperty getSetter
// method groovy.lang.MetaObjectProtocol getProperties
// method groovy.lang.MetaProperty getProperty java.lang.Object
// method groovy.lang.MetaProperty setProperty java.lang.Object java.lang.Object
def BuildConfig copy() {
BuildConfig.metaClass.getProperties().findAll(){it.getSetter()!=null}.inject(new BuildConfig()){
buildconfig,metaProp->metaProp.setProperty(buildconfig,metaProp.getProperty(this))
buildconfig
}
}
}
|