From 1de17ed73eecccd0170d800268bc3c9c9b23f7b4 Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Fri, 27 Oct 2023 20:23:06 +0200 Subject: [PATCH] ci: disable docker for ci --- build/Build.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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) {