-
Notifications
You must be signed in to change notification settings - Fork 16
/
ci.cake
156 lines (124 loc) · 5.8 KB
/
ci.cake
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#load "src/core/cake/core.cake"
var target = Argument("target", "default");
var configuration = Argument("configuration", string.Empty);
var recursive = Argument("recursive", false);
packerTemplates = new List<PackerTemplate>();
var w16s = PackerTemplates_Create("w16s", amazon: true);
var w16s_dotnet = PackerTemplates_Create("w16s-dotnet", parents: w16s);
var w16s_iis = PackerTemplates_Create("w16s-iis", parents: w16s_dotnet);
var w16s_sql16d = PackerTemplates_Create("w16s-sql16d", parents: w16s_iis);
var w16s_solr662 = PackerTemplates_Create("w16s-solr662", parents: w16s_sql16d);
var w16s_solr721 = PackerTemplates_Create("w16s-solr721", parents: w16s_sql16d);
var w16s_solr750 = PackerTemplates_Create("w16s-solr750", parents: w16s_sql16d);
var w16s_solr811 = PackerTemplates_Create("w16s-solr811", parents: w16s_sql16d);
var w16s_sc900 = PackerTemplates_Create("w16s-sc900", parents: w16s_solr662);
var w16s_sc901 = PackerTemplates_Create("w16s-sc901", parents: w16s_solr662);
var w16s_sc902 = PackerTemplates_Create("w16s-sc902", parents: w16s_solr662);
var w16s_sc902_jss1100 = PackerTemplates_Create("w16s-sc902_jss1100", parents: w16s_sc902);
var w16s_sc902_sxa171_jss1100 = PackerTemplates_Create("w16s-sc902_sxa171_jss1100", parents: w16s_sc902);
var w16s_sc902_sxa180 = PackerTemplates_Create("w16s-sc902_sxa180", parents: w16s_sc902);
var w16s_sc902_sxa180_jss1100 = PackerTemplates_Create("w16s-sc902_sxa180_jss1100", parents: w16s_sc902);
var w16s_sc910 = PackerTemplates_Create("w16s-sc910", parents: w16s_solr721);
var w16s_sc910_sxa180 = PackerTemplates_Create("w16s-sc910_sxa180", parents: w16s_sc910);
var w16s_sc910_jss1100 = PackerTemplates_Create("w16s-sc910_jss1100", parents: w16s_sc910);
var w16s_sc910_sxa180_jss1100 = PackerTemplates_Create("w16s-sc910_sxa180_jss1100", parents: w16s_sc910);
var w16s_sc911 = PackerTemplates_Create("w16s-sc911", parents: w16s_solr721);
var w16s_sc911_sxa181 = PackerTemplates_Create("w16s-sc911_sxa181", parents: w16s_sc911);
var w16s_sc911_jss1101 = PackerTemplates_Create("w16s-sc911_jss1101", parents: w16s_sc911);
var w16s_sc911_jss1110 = PackerTemplates_Create("w16s-sc911_jss1110", parents: w16s_sc911);
var w16s_sc911_sxa181_jss1101 = PackerTemplates_Create("w16s-sc911_sxa181_jss1101", parents: w16s_sc911);
var w16s_sc911_sxa181_jss1110 = PackerTemplates_Create("w16s-sc911_sxa181_jss1110", parents: w16s_sc911);
var w16s_sc920 = PackerTemplates_Create("w16s-sc920", parents: w16s_solr750);
var w16s_sc920_sxa190 = PackerTemplates_Create("w16s-sc920_sxa190", parents: w16s_sc920);
var w16s_sc920_jss1200 = PackerTemplates_Create("w16s-sc920_jss1200", parents: w16s_sc920);
var w16s_sc920_sxa190_jss1200 = PackerTemplates_Create("w16s-sc920_sxa190_jss1200", parents: w16s_sc920);
var w16s_sc930 = PackerTemplates_Create("w16s-sc930", parents: w16s_solr811);
var w16s_xc901 = PackerTemplates_Create("w16s-xc901", parents: w16s_sc901);
var w16s_xc902 = PackerTemplates_Create("w16s-xc902", parents: w16s_sc902);
var w16s_xc903 = PackerTemplates_Create("w16s-xc903", parents: w16s_sc902);
var w16s_xc903_sxa180_storefront = PackerTemplates_Create("w16s-xc903_sxa180_storefront", parents: w16s_sc902_sxa180);
var w16s_xc910 = PackerTemplates_Create("w16s-xc910", parents: w16s_sc911);
var w16s_xc910_sxa181_storefront = PackerTemplates_Create("w16s-xc910_sxa181_storefront", parents: w16s_sc911);
packerTemplates = packerTemplates.
Concat(w16s).
Concat(w16s_dotnet).
Concat(w16s_iis).
Concat(w16s_sql16d).
Concat(w16s_solr662).
Concat(w16s_solr721).
Concat(w16s_solr750).
Concat(w16s_solr811).
Concat(w16s_sc900).
Concat(w16s_sc901).
Concat(w16s_sc902).
Concat(w16s_sc902_jss1100).
Concat(w16s_sc902_sxa171_jss1100).
Concat(w16s_sc902_sxa180).
Concat(w16s_sc902_sxa180_jss1100).
Concat(w16s_sc910).
Concat(w16s_sc910_sxa180).
Concat(w16s_sc910_jss1100).
Concat(w16s_sc910_sxa180_jss1100).
Concat(w16s_sc911).
Concat(w16s_sc911_sxa181).
Concat(w16s_sc911_jss1101).
Concat(w16s_sc911_jss1110).
Concat(w16s_sc911_sxa181_jss1101).
Concat(w16s_sc911_sxa181_jss1110).
Concat(w16s_sc920).
Concat(w16s_sc920_sxa190).
Concat(w16s_sc920_jss1200).
Concat(w16s_sc920_sxa190_jss1200).
Concat(w16s_sc930).
Concat(w16s_xc901).
Concat(w16s_xc902).
Concat(w16s_xc903).
Concat(w16s_xc903_sxa180_storefront).
Concat(w16s_xc910).
Concat(w16s_xc910_sxa181_storefront).
ToList();
packerTemplate = configuration;
packerRecursive = recursive;
IEnumerable<PackerTemplate> PackerTemplates_Create(string type, bool amazon = false, IEnumerable<PackerTemplate> parents = null) {
var items = new List<PackerTemplate>();
var virtualBoxCore = PackerTemplate_Create(
type,
"virtualbox-core",
new [] { PackerBuilder_Create(parents == null ? "virtualbox-iso" : "virtualbox-ovf") },
new [] { PackerProvisioner_Create("chef") },
new [] { PackerPostProcessor_Create("vagrant-virtualbox") },
parents != null ? parents.First(item => item.IsMatching("virtualbox-core")) : null
);
// var virtualBoxSysprep = PackerTemplate_Create(
// type,
// "virtualbox-sysprep",
// new [] { PackerBuilder_Create("virtualbox-ovf") },
// new [] { PackerProvisioner_Create("sysprep") },
// new [] { PackerPostProcessor_Create("vagrant-virtualbox") },
// virtualBoxCore
// );
items.Add(virtualBoxCore);
// items.Add(virtualBoxSysprep);
return items;
}
Task("default")
.IsDependentOn("info");
Task("info")
.IsDependentOn("packer-info");
Task("clean")
.IsDependentOn("packer-clean");
Task("version")
.IsDependentOn("packer-version");
Task("restore")
.IsDependentOn("packer-restore");
Task("build")
.IsDependentOn("packer-build");
Task("rebuild")
.IsDependentOn("packer-rebuild");
Task("test")
.IsDependentOn("packer-test");
Task("package")
.IsDependentOn("packer-package");
Task("publish")
.IsDependentOn("packer-publish");
RunTarget(target);