Added back section group.

This commit is contained in:
JoannaaKL
2022-09-08 15:59:06 +00:00
parent 2dc8f25359
commit dfcbe9b1e1

View File

@@ -99,7 +99,7 @@ namespace GitHub.Runner.Worker
await StartContainerAsync(executionContext, container); await StartContainerAsync(executionContext, container);
} }
executionContext.Output("Waiting for all services to be ready"); executionContext.Output("##[group]Waiting for all services to be ready");
bool IsAnyUnhealthy = false; bool IsAnyUnhealthy = false;
foreach (var container in containers.Where(c => !c.IsJobContainer)) foreach (var container in containers.Where(c => !c.IsJobContainer))
@@ -113,6 +113,7 @@ namespace GitHub.Runner.Worker
await ContainerHealthcheckLogs(executionContext, container, healthcheck); await ContainerHealthcheckLogs(executionContext, container, healthcheck);
} }
if (IsAnyUnhealthy) throw new InvalidOperationException("One or more containers failed to start."); if (IsAnyUnhealthy) throw new InvalidOperationException("One or more containers failed to start.");
executionContext.Output("##[endgroup]");
} }
public void printHello() public void printHello()
@@ -447,7 +448,6 @@ namespace GitHub.Runner.Worker
} }
else else
{ {
executionContext.Output($"Container {container.ContainerImage} failed healthchecks, printing logs:"); executionContext.Output($"Container {container.ContainerImage} failed healthchecks, printing logs:");
await _dockerManager.DockerLogs(context: executionContext, containerId: container.ContainerId); await _dockerManager.DockerLogs(context: executionContext, containerId: container.ContainerId);
executionContext.Error($"Failed to initialize container {container.ContainerImage}"); executionContext.Error($"Failed to initialize container {container.ContainerImage}");