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 all 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,19 @@
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;


public static async Task StartAndPopulateDockerRegistry(ITestOutputHelper testOutput)

Check failure on line 30 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#L30

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(30,30): error CS1998: (NETCORE_ENGINEERING_TELEMETRY=Build) This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check failure on line 30 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#L30

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(30,30): error CS1998: (NETCORE_ENGINEERING_TELEMETRY=Build) This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check failure on line 30 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#L30

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(30,30): error CS1998: (NETCORE_ENGINEERING_TELEMETRY=Build) This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check failure on line 30 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#L30

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(30,30): error CS1998: (NETCORE_ENGINEERING_TELEMETRY=Build) This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check failure on line 30 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#L30

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(30,30): error CS1998: (NETCORE_ENGINEERING_TELEMETRY=Build) This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check failure on line 30 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#L30

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(30,30): error CS1998: (NETCORE_ENGINEERING_TELEMETRY=Build) This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check failure on line 30 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#L30

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(30,30): error CS1998: (NETCORE_ENGINEERING_TELEMETRY=Build) This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

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

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci

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

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(30,30): error CS1998: (NETCORE_ENGINEERING_TELEMETRY=Build) This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

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

View check run for this annotation

Azure Pipelines / dotnet-sdk-public-ci

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

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs(30,30): error CS1998: (NETCORE_ENGINEERING_TELEMETRY=Build) This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
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 +48,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 +67,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 +92,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