diff --git a/build/Build.cs b/build/Build.cs index 9ba86b3..9e7bf91 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -45,18 +45,26 @@ sealed class Build : NukeBuild Target Compile => _ => _ .DependsOn(Clean) .DependsOn(Restore) - .Requires(SupportsDocker) .Executes(() => { + if (!SupportsDocker) + { + return; + } + DockerTasks.DockerStackRm(settings => settings.SetStacks("continuity")); DotNetTasks.DotNetBuild(settings => settings.SetNoRestore(true)); }); Target Pack => _ => _ .DependsOn(SonarScan) - .Requires(SupportsDocker) .Executes(() => { + if (!SupportsDocker) + { + return; + } + DockerTasks.DockerBuild(settings => settings .SetPath(AbsolutePath.Create(RootDirectory)) .SetFile("Server/Dockerfile") @@ -86,6 +94,11 @@ sealed class Build : NukeBuild Target Deploy => _ => _.DependsOn(Pack).Executes(() => { + if (!SupportsDocker) + { + return; + } + DockerTasks.DockerPull(settings => settings.SetName("postgres:16.0-alpine")); if (IsLocalBuild) {