Skip to content
Snippets Groups Projects
Commit e59b2b44 authored by Recolic K's avatar Recolic K
Browse files

cleanup

parent 95fe3c24
No related branches found
No related tags found
No related merge requests found
Pipeline #857 passed with stage
in 9 seconds
*.out *.out
*.xaml *.xaml
*.o *.o
.ccls-cache
...@@ -5,6 +5,6 @@ before_script: ...@@ -5,6 +5,6 @@ before_script:
- cd rlib && make install && cd .. - cd rlib && make install && cd ..
build: build:
script: g++ workflows/another.cc -std=c++17 -o a.bin -I .. && ./a.bin script: g++ workflows/test.cc -std=c++17 -o a.bin -I .. && ./a.bin
...@@ -30,6 +30,13 @@ inline static auto HtmlEscapeString(rlib::string s) { ...@@ -30,6 +30,13 @@ inline static auto HtmlEscapeString(rlib::string s) {
return s.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;"); return s.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;");
} }
struct CSharpExpr {
std::string exprText;
auto unescapeThisExprInQuotedCSharpString() {
return "\"+" + exprText + "+\"";
}
};
} }
#endif #endif
\ No newline at end of file
...@@ -3,14 +3,17 @@ ...@@ -3,14 +3,17 @@
#include <cis-workflow-gen/quick-include.hpp> #include <cis-workflow-gen/quick-include.hpp>
int main() { int main() {
#define A_2(task, entityName) ManualOperation("Task notice: "#task, "Hey, man. You need to build " #task, teamid, #entityName) #define GEN_TASKNAME(taskname) (std::string(task_parent_note) + "." + taskname)
#define A_2(task, entityName) ManualOperation("Task notice: " + GEN_TASKNAME(#task), "Hey, man. You need to build " +GEN_TASKNAME(#task)+ ". Please resolve this ICM incident ONLY IF you have finished this task. ", teamid, #entityName)
#define A_1(arg1) A_2(arg1, ) #define A_1(arg1) A_2(arg1, )
#define A_proxy(x, Arg1, Arg2, FUNC, ...) FUNC #define A_proxy(x, Arg1, Arg2, FUNC, ...) FUNC
#define A(...) A_proxy(, ##__VA_ARGS__, A_2(__VA_ARGS__), A_1(__VA_ARGS__)) #define A(...) A_proxy(, ##__VA_ARGS__, A_2(__VA_ARGS__), A_1(__VA_ARGS__))
#define AV(task, entityName) Noop("Virtual task: "#task, #entityName) #define AV(task, entityName) Noop("Virtual task: "#task, #entityName)
auto teamid = "TODO.EOPTeamId"; auto task_parent_note = "EOP";
auto seqBody = auto teamid = "GCBuild";
auto eopBody =
/*148*/ A(EOPServerDock) >> /*148*/ A(EOPServerDock) >>
/*149*/ A(EOPServerRTEG) >> /*149*/ A(EOPServerRTEG) >>
/*151*/ A(ConfigCheckin_And_ImportInventory) >> /*151*/ A(ConfigCheckin_And_ImportInventory) >>
...@@ -18,73 +21,74 @@ int main() { ...@@ -18,73 +21,74 @@ int main() {
/*153*/ A(RackElevation_And_ServerImport) >> /*153*/ A(RackElevation_And_ServerImport) >>
/*154*/ A(BurninPayload) >> /*154*/ A(BurninPayload) >>
/*156*/ A(NewForestCreation) >> /*156*/ A(NewForestCreation) >>
/*157*/ A(GLSSetup_And_CNAMECreation) >> /*157*/ A(GLSSetup_And_CNAMECreation, M365GoLocal.EOP.GLSAndCNAME) >>
/*158*/ A(StatefulFlattening) >> /*158*/ A(StatefulFlattening) >>
/*159*/ A(DBDeployment) >> /*159*/ A(DBDeployment) >>
/*160*/ A(StatelessDeployment, EntityTodo) >> /*160*/ A(StatelessDeployment, M365GoLocal.EOP.StatelessDeployment) >>
/*162*/ A(ForwardSync) >> /*162*/ A(ForwardSync) >>
/*163*/ A(GTMGLSDNSConfigurations) >> /*163*/ A(GTMGLSDNSConfigurations) >>
/*164*/ A(TestTenantCreation) >> /*164*/ A(TestTenantCreation) >>
/*165*/ A(ValidationandComponentSignoff, EntityTodo) >> /*165*/ A(ValidationandComponentSignoff, M365GoLocal.EOP.Validation) >>
/*166*/ A(WorkloadIntegrationwithEXO) >> /*166*/ A(WorkloadIntegrationwithEXO) >>
/*167*/ AV(EOPEngineeringReadinessSweden, EntityTodo); /*167*/ AV(EOPEngineeringReadinessSweden, M365GoLocal.EOP.EngineeringReadiness);
auto flowEop = auto flowEop =
/*147*/ A(TAMAward) | /*147*/ A(TAMAward) |
seqBody; eopBody;
println(to_file("GoLocalSE_EOPWorkflow.xaml"), flowEop.generateXaml("FleetAGC.Workflows.GoLocalSE_EOP")); println(to_file("EOPWorkflow.xaml"), flowEop.generateXaml("Microsoft.Office.FleetAGC.Workflows.SwedenBuildout.EOP"));
teamid = "TODO.SPOTeamId"; task_parent_note = "SPO";
auto flowSpo = auto flowSpo =
/*114*/ A(TAMAward) | ( /*114*/ A(TAMAward) | (
/*115*/ A(SPOServer_And_NetworkDock) >> /*115*/ A(SPOServer_And_NetworkDock, M365GoLocal.SPO.Dock) >>
/*116*/ A(SPOServer_And_NetworkRTEG) >> /*116*/ A(SPOServer_And_NetworkRTEG) >>
/*119*/ A(ServerValidationNetwork_And_Hardware) >> /*119*/ A(ServerValidationNetwork_And_Hardware) >>
/*120*/ A(ServerImaging) >> /*120*/ A(ServerImaging) >>
/*121*/ A(AzureSubscription_And_SubmitandValidateConsumption) >> /*121*/ A(AzureSubscription_And_SubmitandValidateConsumption) >>
/*123*/ A(SPOFarmDeployments, EntityTodo_46) >> ( /*123*/ A(SPOFarmDeployments, M365GoLocal.SPO.FarmDeployment) >> (
/*124*/ A(SPOPostDeploymentValidation) | ( /*124*/ A(SPOPostDeploymentValidation) | (
/*126*/ A(MicroservicesDeployment, EntityTodo_487278) >> /*126*/ A(MicroservicesDeployment, M365GoLocal.SPO.MicroServices) >>
/*127*/ A(MicroservicesPostDeploymentValidation) /*127*/ A(MicroservicesPostDeploymentValidation)
) >> ) >>
/*128*/ AV(ServiceReadiness, EntityTodo_108) >> /*128*/ AV(ServiceReadiness, M365GoLocal.SPO.ServiceReadiness) >>
/*129*/ AV(WorkloadIntegration, EntityTodo_176_185) /*129*/ AV(WorkloadIntegration, M365GoLocal.SPO.WorkloadIntegration) >>
/*130*/ AV(SPOEngineeringReadinessSweden, M365GoLocal.SPO.EngineeringReadiness)
) )
); );
println(to_file("GoLocalSE_SPOWorkflow.xaml"), flowSpo.generateXaml("FleetAGC.Workflows.GoLocalSE_SPO")); println(to_file("SPOWorkflow.xaml"), flowSpo.generateXaml("Microsoft.Office.FleetAGC.Workflows.SwedenBuildout.SPO"));
teamid = "TODO.EXOTeamId"; task_parent_note = "EXO";
auto flowExo = auto flowExo =
/*86*/ A(Backends_TAMAward) | /*86*/ A(Backends_TAMAward) |
/*96*/ A(CAFE_Substrate_TAMAward) | /*96*/ A(CAFE_Substrate_TAMAward) |
( // begin the huge body ( // begin the huge body
( // dep group of 100 ( // dep group of 100
/*8384*/ (A(ActiveDirectoryDock) >> A(ActiveDirectoryRteg)) | /*8384*/ (A(ActiveDirectoryDock) >> A(ActiveDirectoryRteg, M365GoLocal.EXO.ActiveDirectoryRteg)) |
/*8788*/ (A(BackEndsDock) >> A(BackEndsRteg)) | /*8788*/ (A(BackEndsDock) >> A(BackEndsRteg)) |
/*9091*/ (A(ManagementDock) >> A(ManagementRteg)) | /*9091*/ (A(ManagementDock) >> A(ManagementRteg)) |
/*9394*/ (A(CafeDock) >> A(CafeRteg)) | /*9394*/ (A(CafeDock) >> A(CafeRteg)) |
/*9798*/ (A(SubstrateDock) >> A(SubstrateRteg)) /*9798*/ (A(SubstrateDock) >> A(SubstrateRteg))
) >> ) >>
/*100*/ A(DiscoveryADBackEndCafeSubstrateAllocationofServersIPsandRoles) >> /*100*/ A(DiscoveryADBackEndCafeSubstrateAllocationofServersIPsandRoles, M365GoLocal.EXO.IPAllocationDiscovery) >>
/*101*/ AV(ApplicationDeployment, EntityTodo_697744) >> /*101*/ AV(ApplicationDeployment, M365GoLocal.EXO.ApplicationDeployment) >>
/*102*/ A(ResourceForestDeployment) >> /*102*/ A(ResourceForestDeployment) >>
/*103*/ A(Backend_And_FrontEndDeployment) >> /*103*/ A(Backend_And_FrontEndDeployment) >>
/*104*/ A(CapacityUnitPrepDAG_And_CAFE) >> /*104*/ A(CapacityUnitPrepDAG_And_CAFE, M365GoLocal.EXO.CapacityUnitPrep) >>
/*106*/ A(ComponentValidation, EntityTodo_157) >> /*106*/ A(ComponentValidation, M365GoLocal.EXO.ServiceReadiness) >>
/*107*/ A(Bugfix_And_Hotfixes) >> /*107*/ A(Bugfix_And_Hotfixes) >>
/*108*/ A(MonitoringSetup) >> /*108*/ A(MonitoringSetup, M365GoLocal.EXO.MonitoringSetup) >>
/*109*/ A(WorkloadIntegration, EntityTodo_176_185) >> /*109*/ A(WorkloadIntegration, M365GoLocal.EXO.WorkloadIntegration) >>
/*110*/ AV(EXOEngineeringReadinessSweden, EntityTodo_nothing) /*110*/ AV(EXOEngineeringReadinessSweden, M365GoLocal.EXO.EngineeringReadiness)
); // end the huge body. ); // end the huge body.
println(to_file("GoLocalSE_EXOWorkflow.xaml"), flowExo.generateXaml("FleetAGC.Workflows.GoLocalSE_EXO")); println(to_file("EXOWorkflow.xaml"), flowExo.generateXaml("Microsoft.Office.FleetAGC.Workflows.SwedenBuildout.EXO"));
teamid = "TODO.FastSearchTeamId"; task_parent_note = "FastSearch";
auto flowFS = auto flowFS =
/*134*/ A(RTEGAzureResources, EntityTodo_48) | /*134*/ A(RTEGAzureResources, M365GoLocal.FastSearch.AzureResources) |
/*135136*/ (A(Dock, EntityTodo_115) >> A(RTEG)) >> /*135136*/ (A(Dock, M365GoLocal.FastSearch.Dock) >> A(RTEG)) >>
/*138*/ AV(InfrastuctureDeployment, ) >> /*138*/ AV(InfrastuctureDeployment, ) >>
( (
/*139*/ A(ServerValidationNetwork_And_Hardware) >> /*139*/ A(ServerValidationNetwork_And_Hardware) >>
...@@ -93,52 +97,52 @@ int main() { ...@@ -93,52 +97,52 @@ int main() {
) | ) |
/*142*/ A(FASTDeployment); /*142*/ A(FASTDeployment);
// Node143 depends on nothing in this workflow. I don't know where to put it. Wait for the email reply, I believe it depends on 141+142. // Node143 depends on nothing in this workflow. I don't know where to put it. Wait for the email reply, I believe it depends on 141+142.
/*143*/ AV(FASTEngineeringReadinessSweden, EntityTodo_143); /*143*/ AV(FASTEngineeringReadinessSweden, M365GoLocal.FastSearch.EngineeringReadiness);
println(to_file("GoLocalSE_FastSearchWorkflow.xaml"), flowFS.generateXaml("FleetAGC.Workflows.GoLocalSE_FastSearch")); println(to_file("FastSearchWorkflow.xaml"), flowFS.generateXaml("Microsoft.Office.FleetAGC.Workflows.SwedenBuildout.FastSearch"));
teamid = "TODO.WacTeamId"; task_parent_note = "Wac";
auto flowWac = auto flowWac =
/*171*/ A(RTEGAzureResources, EntityTodo_47_73) >> /*171*/ A(RTEGAzureResources, M365GoLocal.WAC.AzureResources) >>
/*173*/ A(InfrastructureDeployment) >> /*173*/ A(InfrastructureDeployment) >>
/*174*/ A(ServiceDeployment) >> /*174*/ A(ServiceDeployment) >>
/*175*/ AV(ServiceReadiness, ) >> /*175*/ AV(ServiceReadiness, ) >>
/*176*/ AV(WACEngineeringReadinessSweden, ); /*176*/ AV(WACEngineeringReadinessSweden, M365GoLocal.WAC.EngineeringReadiness);
println(to_file("GoLocalSE_WACWorkflow.xaml"), flowWac.generateXaml("FleetAGC.Workflows.GoLocalSE_WAC")); println(to_file("WACWorkflow.xaml"), flowWac.generateXaml("Microsoft.Office.FleetAGC.Workflows.SwedenBuildout.WAC"));
teamid = "TODO.OCSTeamId"; task_parent_note = "OCS";
auto flowOcs = auto flowOcs =
/*180*/ A(RtegAzureResources) >> /*180*/ A(RtegAzureResources, M365GoLocal.OCS.AzureResources) >>
/*182*/ A(infrastuctureDeployment) >> /*182*/ A(infrastuctureDeployment) >>
/*183*/ A(ServiceDeployment) >> /*183*/ A(ServiceDeployment) >>
/*184*/ AV(ServiceReadiness, ) >> /*184*/ AV(ServiceReadiness, ) >>
/*185*/ AV(OCSEngineeringReadinessSweden, ); /*185*/ AV(OCSEngineeringReadinessSweden, M365GoLocal.OCS.EngineeringReadiness);
println(to_file("GoLocalSE_OCSWorkflow.xaml"), flowOcs.generateXaml("FleetAGC.Workflows.GoLocalSE_OCS")); println(to_file("OCSWorkflow.xaml"), flowOcs.generateXaml("Microsoft.Office.FleetAGC.Workflows.SwedenBuildout.OCS"));
teamid = "TODO.TeamsTeamId"; task_parent_note = "Teams";
auto flowTeams = auto flowTeams =
( // first half begin ( // first half begin
/*188*/ AV(TeamsRTEG, ) >> /*188*/ AV(TeamsRTEG, ) >>
/*189*/ A(PreRegCompute) | /*189*/ A(PreRegCompute) |
/*190*/ A(RTEGAzureResources) /*190*/ A(RTEGAzureResources, M365GoLocal.Teams.AzureResources)
) | ( // second half begin ) | ( // second half begin
/*192*/ A(ServicesDeployment) >> /*192*/ A(ServicesDeployment) >>
/*193*/ A(TestingandStamping) >> /*193*/ A(TestingandStamping) >>
/*194*/ A(TeamsEngineeringReadinessSweden, EntityTodo_167_110) /*194*/ A(TeamsEngineeringReadinessSweden, M365GoLocal.Teams.EngineeringReadiness)
); );
println(to_file("GoLocalSE_TeamsWorkflow.xaml"), flowTeams.generateXaml("FleetAGC.Workflows.GoLocalSE_Teams")); println(to_file("TeamsWorkflow.xaml"), flowTeams.generateXaml("Microsoft.Office.FleetAGC.Workflows.SwedenBuildout.Teams"));
teamid = "TODO.CountryLaunchTeamId"; task_parent_note = "CountryLaunch";
auto flowCL = auto flowCL =
// I believe that, all of them should be Virtual Activity... (Use Noop) // I believe that, all of them should be Virtual Activity... (Use Noop)
/*196*/ AV(SwedenGAWorkloadAvailability, EntityTodo_manymanydep) >> /*196*/ AV(SwedenGAWorkloadAvailability, M365GoLocal.CountryLaunch.GAWorkloadAvailability) >>
/*197*/ A(SwedenGABakePeriod) >> /*197*/ A(SwedenGABakePeriod) >>
/*198*/ A(SwedenGAMarketingRelease); /*198*/ A(SwedenGAMarketingRelease);
println(to_file("GoLocalSE_CountryLaunchWorkflow.xaml"), flowCL.generateXaml("FleetAGC.Workflows.GoLocalSE_CountryLaunch")); println(to_file("CountryLaunchWorkflow.xaml"), flowCL.generateXaml("Microsoft.Office.FleetAGC.Workflows.SwedenBuildout.CountryLaunch"));
......
File moved
#include <cis-workflow-gen/quick-include.hpp>
int main() {
auto flow =
Activity("CreateResGrp", "FleetAGC.Activities.InitResourceGroupActivity")
.addInputSetting("ResourceGroup", "WdsTest")
>> Activity("CreateVM", "FleetAGC.Activities.CreateAzureResourceActivity")
.addInputSetting("ResourceGroup", "WdsTest")
.addInputSetting("DeploymentName", "DeployVM")
.addInputSetting("TemplateFilePath", "Resources/ArmTemplates/VM/Template_winserver2016.json")
.addInputSetting("ParameterFilePath", "Resources/ArmTemplates/VM/Parameters_WDS.json")
>> Activity("WaitForCreateVM", "FleetAGC.Activities.QueryAzureVMsActivity")
.addInputSetting("ResourceGroup", "WDSSeedingServer")
>> Activity("InstallWdsServices", "FleetAGC.Activities.RemotePSActivity")
.addInputSetting("PublicIP", "\" + GlobalSettings[\"GlobalAdminPublicIPAddress\"] + \"")
.addInputSetting("UserNameKey", "DC1AdminUserName")
.addInputSetting("PasswordKey", "DC1AdminPassword")
.addInputSetting("ScriptPath", "Resources/PSScript/WDSGo.ps1")
.addInputSetting("RequiresSAS","true")
>> Activity("WaitForWdsInstallFinish", "FleetAGC.Activities.RemotePSActivity")
.addInputSetting("PublicIP", "\" + GlobalSettings[\"GlobalAdminPublicIPAddress\"] + \"")
.addInputSetting("UserNameKey", "DC1AdminUserName")
.addInputSetting("PasswordKey", "DC1AdminPassword")
.addInputSetting("RetryTime", "2000")
.addInputSetting("RetryInterval", "1")
.addInputSetting("ScriptPath", "Resources/PSScript/WDSGo_CheckSuccess.ps1")
;
println(to_file("DeployWdsTestServerWorkflow.xaml"), flow.generateXaml("FleetAGC.Workflows.DeployWdsTestServerWorkflow"));
}
// TODO: WDS server requires more UDP port to be opened. But we don't know the client's ip address.
// So, would security team be happy if we open UDP 67 and 69 to public?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment