13 instantiations of DockerfileBuildAnnotation
Aspire.Hosting (2)
ContainerResourceBuilderExtensions.cs (2)
589var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, fullyQualifiedDockerfilePath, stage); 728var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, tempDockerfilePath, stage)
Aspire.Hosting.Tests (11)
ApplicationModel\Docker\DockerfileBuildAnnotationTests.cs (8)
14var annotation = new DockerfileBuildAnnotation("/path/to/context", "/path/to/Dockerfile", "stage"); 28var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 40var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 56var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 73var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null); 104var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null) 140var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null) 180var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null)
DistributedApplicationModelExtensionsTests.cs (2)
50containerWithDockerfile.Resource.Annotations.Add(new DockerfileBuildAnnotation("/context", "/Dockerfile", null)); 54buildOnlyContainer.Resource.Annotations.Add(new DockerfileBuildAnnotation("/context", "/Dockerfile", null) { HasEntrypoint = false });
Publishing\ResourceContainerImageManagerTests.cs (1)
983var dockerfileBuildAnnotation = new DockerfileBuildAnnotation(tempContextPath, tempDockerfilePath, null)
127 references to DockerfileBuildAnnotation
Aspire.Hosting (24)
ApplicationModel\ResourceExtensions.cs (4)
842resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } buildAnnotation && 906return resource is ProjectResource || resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _); 926return resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuild) &&
ContainerResourceBuilderExtensions.cs (12)
298if (builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } buildAnnotation && 390if (builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } buildAnnotation) 589var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, fullyQualifiedDockerfilePath, stage); 595if (context.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileAnnotation)) 728var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, tempDockerfilePath, stage) 737if (context.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileAnnotation)) 1021var annotation = builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault(); 1119var annotation = builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault();
Dcp\DcpExecutor.cs (1)
2155if (modelContainerResource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } dockerfileBuildAnnotation)
Publishing\ManifestPublishingContext.cs (2)
317if (container.Annotations.OfType<DockerfileBuildAnnotation>().Any()) 368if (container.TryGetAnnotationsOfType<DockerfileBuildAnnotation>(out var annotations) && annotations.Single() is { } annotation)
Publishing\ResourceContainerImageManager.cs (4)
267else if (resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuildAnnotation)) 419private async Task BuildContainerImageFromDockerfileAsync(IResource resource, DockerfileBuildAnnotation dockerfileBuildAnnotation, string imageName, ResolvedContainerBuildOptions options, CancellationToken cancellationToken) 525resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _))
Utils\DockerfileHelper.cs (1)
21DockerfileBuildAnnotation annotation,
Aspire.Hosting.Azure (2)
AzurePublishingContext.cs (2)
315if (resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuildAnnotation) &&
Aspire.Hosting.Azure.AppContainers (1)
BaseContainerAppContext.cs (1)
93if (resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _))
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceInfrastructure.cs (1)
54if (resource is not ProjectResource && !(resource.IsContainer() && resource.TryGetAnnotationsOfType<DockerfileBuildAnnotation>(out _)))
Aspire.Hosting.Azure.Tests (4)
AzureContainerAppsTests.cs (2)
1983var dockerFileAnnotation = c.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
AzureDeployerTests.cs (2)
167var dockerFileAnnotation = c.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
Aspire.Hosting.Containers.Tests (34)
WithDockerfileTests.cs (34)
107Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation)); 131Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation)); 149Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation1)); 153Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation2)); 170Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation1)); 174Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation2)); 637var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 652var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 668var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 683var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 699var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 714var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 730var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 745var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 769var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 820var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 870var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>());
Aspire.Hosting.Docker (3)
DockerComposePublishingContext.cs (2)
86if (serviceResource.TargetResource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuildAnnotation) &&
DockerComposeServiceResource.cs (1)
138if (resourceInstance.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _) || resourceInstance is ProjectResource)
Aspire.Hosting.JavaScript (2)
JavaScriptHostingExtensions.cs (2)
449if (resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerFileAnnotation))
Aspire.Hosting.JavaScript.Tests (6)
AddJavaScriptAppTests.cs (2)
42var dockerBuildAnnotation = yarnApp.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
AddNodeAppTests.cs (2)
148var dockerBuildAnnotation = nodeApp.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
AddViteAppTests.cs (2)
70var dockerBuildAnnotation = nodeApp.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
Aspire.Hosting.Kubernetes (3)
KubernetesPublishingContext.cs (2)
74if (serviceResource.TargetResource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuildAnnotation) &&
KubernetesResource.cs (1)
136if (!resourceInstance.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _) && resourceInstance is not ProjectResource)
Aspire.Hosting.Tests (33)
ApplicationModel\Docker\DockerfileBuildAnnotationTests.cs (8)
14var annotation = new DockerfileBuildAnnotation("/path/to/context", "/path/to/Dockerfile", "stage"); 28var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 40var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 56var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 73var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null); 104var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null) 140var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null) 180var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null)
ApplicationModel\Docker\WithDockerfileBuilderTests.cs (20)
69var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 90var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 142var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 178var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 212var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 253var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 332var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 368var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 400var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 434var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault();
Publishing\ResourceContainerImageManagerTests.cs (5)
962var dockerfileBuildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single(); 983var dockerfileBuildAnnotation = new DockerfileBuildAnnotation(tempContextPath, tempDockerfilePath, null) 994if (context.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileAnnotation))
Aspire.Hosting.Yarp.Tests (14)
AddYarpTests.cs (14)
191var annotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 204var annotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 238Assert.Empty(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 265Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 282var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 312var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 345var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 383var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>());