forked from electric-cloud/DSL-Samples
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathSSC Procedure Link.groovy
42 lines (39 loc) · 1.05 KB
/
SSC Procedure Link.groovy
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
/*
CDRO DSL: Procedure to implement SSC Item and link to created object
*/
project "SSC link", {
procedure "Create pipeline", {
step "Apply DSL to create pipeline", shell : 'ectool evalDsl --dslFile',
command : '''\
def baseUrl = "https://" + getProperty(propertyName:"/server/settings/ipAddress").value
def pipelineId = pipeline("Generated pipeline", projectName: "Default").pipelineId
def url = baseUrl + "/flow/#pipelines/" + pipelineId
property "/myJob/report-urls/Created pipeline", value: url
'''.stripIndent()
}
catalog 'SSC Link', {
iconUrl = null
catalogItem 'Create Procedure', {
description = '''\
<xml>
<title></title>
<htmlData>
<![CDATA[
]]>
</htmlData>
</xml>
'''.stripIndent()
allowScheduling = '0'
buttonLabel = 'Create'
dslParamForm = null
dslString = null
endTargetJson = null
iconUrl = 'icon-catalog-item.svg'
subpluginKey = null
subprocedure = 'Create pipeline'
subproject = projectName
templateObjectType = 'none'
useFormalParameter = '0'
}
}
}