ci: disable docker for ci
Some checks failed
Test if Server can be built / build-server (push) Failing after 32s

This commit is contained in:
Timothy Schenk 2023-10-27 20:23:06 +02:00
parent 3c36ab14da
commit 1de17ed73e

View file

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