Skip to content

[release/8.0.1xx] Use new ACR for registry image #49691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: release/8.0.1xx
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,31 @@
public const string FullyQualifiedBaseImageAspNet = $"{BaseImageSource}/{AspNetBaseImage}:{Net8PreviewImageTag}";
private static string? s_registryContainerId;

public static void StartAndPopulateDockerRegistry(ITestOutputHelper testOutput)
private static string SDK_AzureContainerRegistryImage => "dotnetdhmirror-f8bzbjakh8cga6ab.azurecr.io/registry:2";
private static string Docker_HubRegistryImage => "docker.io/library/registry:2";

// TODO: some logic to pivot between this and Docker Hub
private static string RegistryImageToUse => SDK_AzureContainerRegistryImage;

internal class SameArchManifestPicker : IManifestPicker

Check failure on line 29 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Darwin_AoT_Tests Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L29

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(29,45): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'IManifestPicker' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 29 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Darwin Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L29

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(29,45): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'IManifestPicker' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 29 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Darwin Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L29

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(29,45): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'IManifestPicker' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 29 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Ubuntu_22_04 Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L29

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(29,45): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'IManifestPicker' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 29 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Ubuntu_22_04 Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L29

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(29,45): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'IManifestPicker' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 29 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Darwin_TemplateEngine Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L29

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(29,45): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'IManifestPicker' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 29 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Ubuntu_20_04_TemplateEngine Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L29

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(29,45): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'IManifestPicker' could not be found (are you missing a using directive or an assembly reference?)
{
public PlatformSpecificManifest? PickBestManifestForRid(IReadOnlyDictionary<string, PlatformSpecificManifest> manifestList, string runtimeIdentifier)
{
return manifestList.Values.SingleOrDefault(m => m.platform.os == "linux" && m.platform.architecture == "amd64");
}

public PlatformSpecificOciManifest? PickBestManifestForRid(IReadOnlyDictionary<string, PlatformSpecificOciManifest> manifestList, string runtimeIdentifier)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Darwin_AoT_Tests Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,96): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Darwin_AoT_Tests Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,16): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Darwin Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,96): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Darwin Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,16): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Darwin Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,96): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Ubuntu_22_04 Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,96): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Ubuntu_22_04 Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,16): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Ubuntu_22_04 Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,96): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Darwin_TemplateEngine Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,96): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Darwin_TemplateEngine Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,16): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Ubuntu_20_04_TemplateEngine Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,96): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 36 in src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci (Build Ubuntu_20_04_TemplateEngine Build_Release)

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs#L36

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(36,16): error CS0246: (NETCORE_ENGINEERING_TELEMETRY=Build) The type or namespace name 'PlatformSpecificOciManifest' could not be found (are you missing a using directive or an assembly reference?)
{
return manifestList.Values.SingleOrDefault(m => m.platform.os == "linux" && m.platform.architecture == "amd64");
}
}

public static async Task StartAndPopulateDockerRegistry(ITestOutputHelper testOutput)
{
using TestLoggerFactory loggerFactory = new(testOutput);

if (!new DockerCli(loggerFactory).IsAvailable()) {
if (!new DockerCli(loggerFactory).IsAvailable())
{
throw new InvalidOperationException("Docker is not available, tests cannot run");
}

Expand All @@ -40,7 +60,7 @@
{
logger.LogInformation("Spawning local registry at '{registry}', attempt #{attempt}.", LocalRegistry, spawnRegistryAttempt);

CommandResult processResult = ContainerCli.RunCommand(testOutput, "--rm", "--publish", "5010:5000", "--detach", "docker.io/library/registry:2").Execute();
CommandResult processResult = ContainerCli.RunCommand(testOutput, "--rm", "--publish", "5010:5000", "--detach", RegistryImageToUse).Execute();

processResult.Should().Pass().And.HaveStdOut();

Expand All @@ -59,7 +79,7 @@
.Execute()
.Should().Pass();

logger.LogInformation("Tagging image '{sourceRepo}/{sourceImage}:{sourceTag}' as '{targetRepo}/{targetImage}:{targetTag}'.",BaseImageSource, RuntimeBaseImage, tag, LocalRegistry, RuntimeBaseImage, tag);
logger.LogInformation("Tagging image '{sourceRepo}/{sourceImage}:{sourceTag}' as '{targetRepo}/{targetImage}:{targetTag}'.", BaseImageSource, RuntimeBaseImage, tag, LocalRegistry, RuntimeBaseImage, tag);
ContainerCli.TagCommand(testOutput, $"{BaseImageSource}/{RuntimeBaseImage}:{tag}", $"{LocalRegistry}/{RuntimeBaseImage}:{tag}")
.Execute()
.Should().Pass();
Expand All @@ -84,7 +104,7 @@
{
ContainerCli.StopCommand(testOutput, s_registryContainerId).Execute();
}
catch(Exception ex2)
catch (Exception ex2)
{
logger.LogError(ex2, "Failed to stop the registry {id}.", s_registryContainerId);
}
Expand Down
Loading