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)
249
if (buildSecret.Value.Type ==
BuildImageSecretType
.File)
Publishing\DockerContainerRuntime.cs (1)
114
if (buildSecret.Value.Type ==
BuildImageSecretType
.Environment && buildSecret.Value.Value is not null)
Publishing\PodmanContainerRuntime.cs (1)
68
if (buildSecret.Value.Type ==
BuildImageSecretType
.Environment && buildSecret.Value.Value is not null)
Publishing\ResourceContainerImageManager.cs (3)
446
var
secretType = buildSecret.Value is FileInfo ?
BuildImageSecretType
.File :
BuildImageSecretType
.Environment;
Aspire.Hosting.Tests (10)
Publishing\ResourceContainerImageManagerTests.cs (10)
679
Assert.Equal(
BuildImageSecretType
.Environment, fakeContainerRuntime.CapturedBuildSecrets["SECRET_ASENV"].Type);
833
Assert.Equal(
BuildImageSecretType
.Environment, fakeContainerRuntime.CapturedBuildSecrets["STRING_SECRET"].Type);
837
Assert.Equal(
BuildImageSecretType
.Environment, fakeContainerRuntime.CapturedBuildSecrets["NULL_SECRET"].Type);
885
Assert.Equal(
BuildImageSecretType
.Environment, fakeContainerRuntime.CapturedBuildSecrets["ENV_SECRET"].Type);
889
Assert.Equal(
BuildImageSecretType
.File, fakeContainerRuntime.CapturedBuildSecrets["FILE_SECRET"].Type);
897
["MY_SECRET"] = new BuildImageSecretValue("secret-value",
BuildImageSecretType
.Environment)
910
["npmrc"] = new BuildImageSecretValue("/path/to/.npmrc",
BuildImageSecretType
.File)
923
["MY_SECRET"] = new BuildImageSecretValue(null,
BuildImageSecretType
.Environment)
936
["ENV_TOKEN"] = new BuildImageSecretValue("token-value",
BuildImageSecretType
.Environment),
937
["npmrc"] = new BuildImageSecretValue("/app/.npmrc",
BuildImageSecretType
.File)