internal List <string> GetPipelineQueueList(string toolName, string pipeline, string environment) { PipelineInfo pipelineInfo = new PipelineInfo(toolName, pipeline, environment); ExecutionManager exeManager = executionManagerDictionary[pipelineInfo.LockName]; return(exeManager.GetQueueList()); }
internal string AbortPipeline(string toolName, string pipeline, string environment, string pipelineInstanceName) { PipelineInfo pipelineInfo = new PipelineInfo(toolName, pipeline, environment); ExecutionManager exeManager = executionManagerDictionary[pipelineInfo.LockName]; return(exeManager.AbortPipeline(pipelineInstanceName)); }
public string TriggerPipeline(string toolName, string pipeline, string environment, bool updatePlan) { PipelineInfo pipelineInfo = new PipelineInfo(toolName, pipeline, environment, updatePlan); PipelineManager pipelineManager = new PipelineManager(); var triggerPipelineStatus = pipelineManager.AddToQueue(pipelineInfo); return(triggerPipelineStatus); }
public string RerunPipeline(string toolName, string pipeline, string environment, string pipelineInstanceName, List <string> testCaseIds = null) { PipelineInfo pipelineInfo = new PipelineInfo(toolName, pipeline, environment, pipelineInstanceName: pipelineInstanceName, testCasesIds: testCaseIds); PipelineManager pipelineManager = new PipelineManager(); var rerunPipelineStatus = pipelineManager.AddToQueue(pipelineInfo); return(rerunPipelineStatus); }
public string AddToQueue(PipelineInfo pipelineInfo) { ExecutionManager exeManager = null; if (!executionManagerDictionary.ContainsKey(pipelineInfo.LockName)) { exeManager = new ExecutionManager(pipelineInfo); executionManagerDictionary[pipelineInfo.LockName] = exeManager; } exeManager = executionManagerDictionary[pipelineInfo.LockName]; return(exeManager.AddToQueue(pipelineInfo)); }
public string AddToQueue(PipelineInfo pipelineInfo) { if (PipelineQueue.Any(x => x.ConfigKey.Equals(pipelineInfo.ConfigKey))) { return("AlreadyInQueue"); } PipelineQueue.Add(pipelineInfo); if (PipelineQueue.Where(x => x.Status == "Running").Count() == 0) { var task = Task.Run(() => { TriggerPipeline(PipelineQueue.FirstOrDefault()); }); } return("AddedToQueue"); }
private async void TriggerPipeline(PipelineInfo pipelineInfo) { pipelineInfo.Status = "Running"; Task task = new Task(StartPipelineExecution); await task; }
public ExecutionManager(PipelineInfo pipelineInfo) { //Task.Run(() => { TriggerPipeline(); }); }