mirror of https://github.com/dotnet/tye.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
904 B
31 lines
904 B
using System.Threading.Tasks;
|
|
|
|
namespace Opulence
|
|
{
|
|
public sealed class BuildDockerImageStep : ServiceExecutor.Step
|
|
{
|
|
public override string DisplayText => "Building Docker Image...";
|
|
|
|
public string Environment { get; set; } = "production";
|
|
|
|
public override async Task ExecuteAsync(OutputContext output, Application application, ServiceEntry service)
|
|
{
|
|
if (SkipWithoutProject(output, service, out var project))
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (SkipWithoutContainerInfo(output, service, out var container))
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (SkipForEnvironment(output, service, Environment))
|
|
{
|
|
return;
|
|
}
|
|
|
|
await DockerContainerBuilder.BuildContainerImageAsync(output, application, service, project, container);
|
|
}
|
|
}
|
|
}
|
|
|