forked from electric-cloud-community/DSL-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
masterComponent.groovy
49 lines (43 loc) · 1.17 KB
/
masterComponent.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
43
44
45
46
47
48
49
/*
Format: Electric Flow DSL
File: masterComponent.groovy
Description: Example of creation and copy of a master component
Set up Instructions
-------------------
ectool --format json evalDsl --dslFile masterComponent.groovy
*/
// Settings
def _proj = "Default"
def _app = "universe"
def _comp ="masterOfTheUniverse"
def _tier="Tier1"
project (_proj) {
// Create Master Component
component (_comp) {
pluginKey= "EC-Artifact"
ec_content_details.with {
pluginProjectName = "EC-Artifact"
pluginProcedure = "Retrieve"
artifactName = "com.sample:package1"
filterList = ""
overwrite = "update"
versionRange = ""
artifactVersionLocationProperty = "/myJob/retrievedArtifactVersions/\$" + "[assignedResourceName]"
}
}
application(_app) {
description = "The best app ever"
applicationTier (_tier) {
description = "This is my DEV app Tier"
}
}
}
// 6.0.1 method: you need to copy the masterCOmponent to your
// applicationTier
copyComponent(
componentName: _comp,
toApplicationName: _app,
newComponentName: "Prince",
projectName: _proj,
applicationTierName: _tier
)