forked from prom3theu5/aspirational-manifests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added options to build project resource container images using custom…
… Dockerfile instead of 'dotnet publish' (prom3theu5#270)
- Loading branch information
1 parent
19f5dfb
commit f4fe90e
Showing
23 changed files
with
160 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace Aspirate.Commands.Options; | ||
|
||
public sealed class ContainerBuildArgsOption : BaseOption<List<string>?> | ||
{ | ||
private static readonly string[] _aliases = | ||
[ | ||
"-cba", | ||
"--container-build-arg" | ||
]; | ||
|
||
private ContainerBuildArgsOption() : base(_aliases, "ASPIRATE_CONTAINER_BUILD_ARGS", null) | ||
{ | ||
Name = nameof(IContainerOptions.ContainerBuildArgs); | ||
Description = "The Container Build Arguments to use for all containers. In \"key\"=\"value\" format. Can include multiple times."; | ||
Arity = ArgumentArity.ZeroOrMore; | ||
IsRequired = false; | ||
} | ||
|
||
public static ContainerBuildArgsOption Instance { get; } = new(); | ||
} |
20 changes: 20 additions & 0 deletions
20
src/Aspirate.Commands/Options/ContainerBuildContextOption.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace Aspirate.Commands.Options; | ||
|
||
public sealed class ContainerBuildContextOption : BaseOption<string?> | ||
{ | ||
private static readonly string[] _aliases = | ||
[ | ||
"-cbc", | ||
"--container-build-context" | ||
]; | ||
|
||
private ContainerBuildContextOption() : base(_aliases, "ASPIRATE_CONTAINER_BUILD_CONTEXT", null) | ||
{ | ||
Name = nameof(IContainerOptions.ContainerBuildContext); | ||
Description = "The Container Build Context to use when Dockerfile is used to build projects"; | ||
Arity = ArgumentArity.ExactlyOne; | ||
IsRequired = false; | ||
} | ||
|
||
public static ContainerBuildContextOption Instance { get; } = new(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace Aspirate.Commands.Options; | ||
|
||
public sealed class PreferDockerfileOption : BaseOption<bool?> | ||
{ | ||
private static readonly string[] _aliases = ["--prefer-dockerfile"]; | ||
|
||
private PreferDockerfileOption() : base(_aliases, "ASPIRATE_PREFER_DOCKERFILE", null) | ||
{ | ||
Name = nameof(IBuildOptions.PreferDockerfile); | ||
Description = "Instructs to use Dockerfile when available to build project images"; | ||
Arity = ArgumentArity.ZeroOrOne; | ||
IsRequired = false; | ||
} | ||
|
||
public static PreferDockerfileOption Instance { get; } = new(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters