19 references to BuildImageSecretType
Aspire.Hosting (9)
Publishing\BuildImageSecretValue.cs (3)
28
/// <param name="Value">The resolved secret value. For <see cref="
BuildImageSecretType
.Environment"/> secrets, this is the secret content.
29
/// For <see cref="
BuildImageSecretType
.File"/> secrets, this is the file path.</param>
32
public record BuildImageSecretValue(string? Value,
BuildImageSecretType
Type);
Publishing\ContainerRuntimeBase.cs (1)
479
if (buildSecret.Value.Type ==
BuildImageSecretType
.File)
Publishing\DockerContainerRuntime.cs (1)
95
if (buildSecret.Value.Type ==
BuildImageSecretType
.Environment && buildSecret.Value.Value is not null)
Publishing\PodmanContainerRuntime.cs (1)
203
if (buildSecret.Value.Type ==
BuildImageSecretType
.Environment && buildSecret.Value.Value is not null)
Publishing\ResourceContainerImageManager.cs (3)
474
var
secretType = buildSecret.Value is FileInfo ?
BuildImageSecretType
.File :
BuildImageSecretType
.Environment;
Aspire.Hosting.Tests (10)
Publishing\ResourceContainerImageManagerTests.cs (10)
772
Assert.Equal(
BuildImageSecretType
.Environment, fakeContainerRuntime.CapturedBuildSecrets["SECRET_ASENV"].Type);
928
Assert.Equal(
BuildImageSecretType
.Environment, fakeContainerRuntime.CapturedBuildSecrets["STRING_SECRET"].Type);
932
Assert.Equal(
BuildImageSecretType
.Environment, fakeContainerRuntime.CapturedBuildSecrets["NULL_SECRET"].Type);
981
Assert.Equal(
BuildImageSecretType
.Environment, fakeContainerRuntime.CapturedBuildSecrets["ENV_SECRET"].Type);
985
Assert.Equal(
BuildImageSecretType
.File, fakeContainerRuntime.CapturedBuildSecrets["FILE_SECRET"].Type);
993
["MY_SECRET"] = new BuildImageSecretValue("secret-value",
BuildImageSecretType
.Environment)
1006
["npmrc"] = new BuildImageSecretValue("/path/to/.npmrc",
BuildImageSecretType
.File)
1019
["MY_SECRET"] = new BuildImageSecretValue(null,
BuildImageSecretType
.Environment)
1032
["ENV_TOKEN"] = new BuildImageSecretValue("token-value",
BuildImageSecretType
.Environment),
1033
["npmrc"] = new BuildImageSecretValue("/app/.npmrc",
BuildImageSecretType
.File)