1
1
<Project DefaultTargets =" GenerateAfterBuild" >
2
2
<Target Name =" GenerateDockerfile" >
3
- <Message Text =" Generating Dockerfile" Importance =" high" />
4
- <Message Text =" Dockerfile path: $(KubeOpsDockerfilePath)" Importance =" normal" />
3
+ <PropertyGroup >
4
+ <!-- Configuration for Docker related commands -->
5
+ <KubeOpsDockerfilePath Condition =" '$(KubeOpsDockerfilePath)' == ''" >$(MSBuildProjectDirectory)\Dockerfile</KubeOpsDockerfilePath >
6
+ <KubeOpsDockerTag Condition =" '$(KubeOpsDockerTag)' == ''" >latest</KubeOpsDockerTag >
7
+ </PropertyGroup >
8
+
9
+ <Message Text =" Generating Dockerfile" Importance =" high" />
10
+ <Message Text =" Dockerfile path: $(KubeOpsDockerfilePath)" Importance =" normal" />
5
11
6
12
<Message Condition =" Exists('$(KubeOpsDockerfilePath)')" Text =" Dockerfile already exists. Don't overwrite."
7
- Importance =" high" />
13
+ Importance =" high" />
8
14
<Exec Condition =" !Exists('$(KubeOpsDockerfilePath)')"
9
- Command =" dotnet $(OutputPath)$(TargetFileName) generator docker --out $(KubeOpsDockerfilePath) --dotnet-tag $(KubeOpsDockerTag) --solution-dir $(SolutionDir) --target-file $(TargetFileName) --project-path $(ProjectPath)" />
15
+ Command =" dotnet $(OutputPath)$(TargetFileName) generator docker --out $(KubeOpsDockerfilePath) --dotnet-tag $(KubeOpsDockerTag) --solution-dir $(SolutionDir) --target-file $(TargetFileName) --project-path $(ProjectPath)" />
10
16
</Target >
11
17
12
18
<Target Name =" GenerateCrds" >
13
- <Message Text =" Generating CRDs" Importance =" high" />
14
- <Message Text =" Configuration path: $(KubeOpsCrdDir)" Importance =" normal" />
19
+ <PropertyGroup >
20
+ <!-- Configuration for the crd generation -->
21
+ <KubeOpsCrdDir Condition =" '$(KubeOpsCrdDir)' == ''" >$(KubeOpsConfigRoot)\crds</KubeOpsCrdDir >
22
+ <KubeOpsCrdFormat Condition =" '$(KubeOpsCrdFormat)' == ''" >Yaml</KubeOpsCrdFormat >
23
+ <KubeOpsCrdUseOldCrds Condition =" '$(KubeOpsCrdUseOldCrds)' == ''" >false</KubeOpsCrdUseOldCrds >
24
+ </PropertyGroup >
25
+
26
+ <Message Text =" Generating CRDs" Importance =" high" />
27
+ <Message Text =" Configuration path: $(KubeOpsCrdDir)" Importance =" normal" />
15
28
16
29
<Exec Condition =" '$(KubeOpsCrdUseOldCrds)' == 'false'"
17
- Command =" dotnet $(OutputPath)$(TargetFileName) generator crds --out $(KubeOpsCrdDir) --format $(KubeOpsCrdFormat)" />
30
+ Command =" dotnet $(OutputPath)$(TargetFileName) generator crds --out $(KubeOpsCrdDir) --format $(KubeOpsCrdFormat)" />
18
31
<Exec Condition =" '$(KubeOpsCrdUseOldCrds)' == 'true'"
19
- Command =" dotnet $(OutputPath)$(TargetFileName) generator crds --out $(KubeOpsCrdDir) --format $(KubeOpsCrdFormat) --use-old-crds" />
32
+ Command =" dotnet $(OutputPath)$(TargetFileName) generator crds --out $(KubeOpsCrdDir) --format $(KubeOpsCrdFormat) --use-old-crds" />
20
33
</Target >
21
34
22
35
<Target Name =" GenerateRbac" >
23
- <Message Text =" Generating Rbac roles" Importance =" high" />
24
- <Message Text =" Configuration path: $(KubeOpsRbacDir)" Importance =" normal" />
36
+ <PropertyGroup >
37
+ <!-- Configuration for the rbac generation -->
38
+ <KubeOpsRbacDir Condition =" '$(KubeOpsRbacDir)' == ''" >$(KubeOpsConfigRoot)\rbac</KubeOpsRbacDir >
39
+ <KubeOpsRbacFormat Condition =" '$(KubeOpsRbacFormat)' == ''" >Yaml</KubeOpsRbacFormat >
40
+ </PropertyGroup >
41
+
42
+ <Message Text =" Generating Rbac roles" Importance =" high" />
43
+ <Message Text =" Configuration path: $(KubeOpsRbacDir)" Importance =" normal" />
25
44
26
45
<Exec
27
- Command =" dotnet $(OutputPath)$(TargetFileName) generator rbac --out $(KubeOpsRbacDir) --format $(KubeOpsRbacFormat)" />
46
+ Command =" dotnet $(OutputPath)$(TargetFileName) generator rbac --out $(KubeOpsRbacDir) --format $(KubeOpsRbacFormat)" />
28
47
</Target >
29
48
30
49
<Target Name =" GenerateOperator" >
31
- <Message Text =" Generating Operator yamls" Importance =" high" />
32
- <Message Text =" Configuration path: $(KubeOpsOperatorDir)" Importance =" normal" />
50
+ <PropertyGroup >
51
+ <!-- Configuration for the operator manifest generation -->
52
+ <KubeOpsOperatorDir Condition =" '$(KubeOpsOperatorDir)' == ''" >$(KubeOpsConfigRoot)\operator</KubeOpsOperatorDir >
53
+ <KubeOpsOperatorFormat Condition =" '$(KubeOpsOperatorFormat)' == ''" >Yaml</KubeOpsOperatorFormat >
54
+ </PropertyGroup >
55
+
56
+ <Message Text =" Generating Operator yamls" Importance =" high" />
57
+ <Message Text =" Configuration path: $(KubeOpsOperatorDir)" Importance =" normal" />
33
58
34
59
<Exec
35
- Command =" dotnet $(OutputPath)$(TargetFileName) generator operator --out $(KubeOpsOperatorDir) --format $(KubeOpsOperatorFormat)" />
60
+ Command =" dotnet $(OutputPath)$(TargetFileName) generator operator --out $(KubeOpsOperatorDir) --format $(KubeOpsOperatorFormat)" />
36
61
</Target >
37
62
38
63
<Target Name =" GenerateInstaller" >
39
- <Message Text =" Generating Installer yamls" Importance =" high" />
40
- <Message Text =" Configuration path: $(KubeOpsInstallerDir)" Importance =" normal" />
64
+ <PropertyGroup >
65
+ <!-- Configuration for the installer manifest generation -->
66
+ <KubeOpsInstallerDir Condition =" '$(KubeOpsInstallerDir)' == ''" >$(KubeOpsConfigRoot)\install</KubeOpsInstallerDir >
67
+ <KubeOpsInstallerFormat Condition =" '$(KubeOpsInstallerFormat)' == ''" >Yaml</KubeOpsInstallerFormat >
68
+ </PropertyGroup >
69
+
70
+ <Message Text =" Generating Installer yamls" Importance =" high" />
71
+ <Message Text =" Configuration path: $(KubeOpsInstallerDir)" Importance =" normal" />
41
72
42
73
<Message Condition =" Exists('$(KubeOpsInstallerDir)')" Text =" Installer dir exists, don't overwrite contents."
43
- Importance =" high" />
74
+ Importance =" high" />
44
75
<Exec Condition =" !Exists('$(KubeOpsInstallerDir)')"
45
- Command =" dotnet $(OutputPath)$(TargetFileName) generator installer --out $(KubeOpsInstallerDir) --format $(KubeOpsInstallerFormat) --crds-dir $(KubeOpsCrdDir) --rbac-dir $(KubeOpsRbacDir) --operator-dir $(KubeOpsOperatorDir)" />
76
+ Command =" dotnet $(OutputPath)$(TargetFileName) generator installer --out $(KubeOpsInstallerDir) --format $(KubeOpsInstallerFormat) --crds-dir $(KubeOpsCrdDir) --rbac-dir $(KubeOpsRbacDir) --operator-dir $(KubeOpsOperatorDir)" />
46
77
</Target >
47
78
48
79
<Target Name =" GenerateAfterBuild" AfterTargets =" Build" >
49
- <CallTarget Condition =" '$(KubeOpsSkipDockerfile)' == ''" Targets =" GenerateDockerfile" />
50
- <CallTarget Condition =" '$(KubeOpsSkipCrds)' == ''" Targets =" GenerateCrds" />
51
- <CallTarget Condition =" '$(KubeOpsSkipRbac)' == ''" Targets =" GenerateRbac" />
52
- <CallTarget Condition =" '$(KubeOpsSkipOperator)' == ''" Targets =" GenerateOperator" />
53
- <CallTarget Condition =" '$(KubeOpsSkipInstaller)' == ''" Targets =" GenerateInstaller" />
80
+ <PropertyGroup >
81
+ <!-- Configuration for the pathes where to store the generated yamls and elements -->
82
+ <KubeOpsConfigRoot Condition =" '$(KubeOpsConfigRoot)' == ''" >$(MSBuildProjectDirectory)\config</KubeOpsConfigRoot >
83
+ </PropertyGroup >
84
+
85
+ <CallTarget Condition =" '$(KubeOpsSkipDockerfile)' == ''" Targets =" GenerateDockerfile" />
86
+ <CallTarget Condition =" '$(KubeOpsSkipCrds)' == ''" Targets =" GenerateCrds" />
87
+ <CallTarget Condition =" '$(KubeOpsSkipRbac)' == ''" Targets =" GenerateRbac" />
88
+ <CallTarget Condition =" '$(KubeOpsSkipOperator)' == ''" Targets =" GenerateOperator" />
89
+ <CallTarget Condition =" '$(KubeOpsSkipInstaller)' == ''" Targets =" GenerateInstaller" />
54
90
</Target >
55
- </Project >
91
+ </Project >
0 commit comments