-
Notifications
You must be signed in to change notification settings - Fork 402
Expand file tree
/
Copy pathDockerAgentDeclaration.groovy
More file actions
61 lines (47 loc) · 1.53 KB
/
DockerAgentDeclaration.groovy
File metadata and controls
61 lines (47 loc) · 1.53 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.lesfurets.jenkins.unit.declarative.agent
import com.lesfurets.jenkins.unit.declarative.GenericPipelineDeclaration
import groovy.transform.Memoized
import groovy.transform.ToString
import static com.lesfurets.jenkins.unit.declarative.ObjectUtils.printNonNullProperties
@ToString(includePackage = false, includeNames = true, ignoreNulls = true)
class DockerAgentDeclaration extends GenericPipelineDeclaration {
String label
String args = ""
String registryUrl
String registryCredentialsId
String customWorkspace
boolean reuseNode
boolean containerPerStageRoot
boolean alwaysPull
String image
def label(final String label) {
this.label = label
}
def args(final String args) {
this.args = args
}
def alwaysPull(final boolean alwaysPull) {
this.alwaysPull = alwaysPull
}
def registryUrl(final String registryUrl) {
this.registryUrl = registryUrl
}
def registryCredentialsId(final String registryCredentialsId) {
this.registryCredentialsId = registryCredentialsId
}
def customWorkspace(final String customWorkspace) {
this.customWorkspace = customWorkspace
}
def reuseNode(final boolean reuseNode) {
this.reuseNode = reuseNode
}
def containerPerStageRoot(final boolean containerPerStageRoot) {
this.containerPerStageRoot = containerPerStageRoot
}
def image(String image) {
this.image = image
}
String toString() {
return printNonNullProperties(this)
}
}