in Webapp/SDAF/Controllers/SystemController.cs [347:378]
public async Task<IActionResult> InstallConfirmedAsync(string id, string partitionKey, Templateparameters parameters)
{
try
{
SystemModel system = await GetById(id, partitionKey);
string pipelineId = _configuration["SAP_INSTALL_PIPELINE_ID"];
string branch = _configuration["SourceBranch"];
PipelineRequestBody requestBody = new()
{
resources = new Resources
{
repositories = new Repositories
{
self = new Self
{
refName = $"refs/heads/{branch}"
}
}
},
templateParameters = parameters
};
await restHelper.TriggerPipeline(pipelineId, requestBody);
TempData["success"] = "Successfully triggered SAP installation pipeline for " + id;
}
catch (Exception e)
{
TempData["error"] = "Error triggering SAP installation pipeline for system " + id + ": " + e.Message;
}
return RedirectToAction("Index");
}