Skip to content
Open
Show file tree
Hide file tree
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
64 changes: 64 additions & 0 deletions eng/announcement-templates/Render.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static class TemplateDefinitions
private static readonly Dictionary<string, Func<TemplateContext>> s_templateContexts = new()
{
["alpine-floating-tag-update.md"] = AlpineFloatingTagTemplateParameters.ContextFactory,
["alpine-remove-version.md"] = AlpineVersionEolTemplateParameters.ContextFactory,
};

public static TemplateContext GetTemplateContext(FileInfo templateFileInfo)
Expand Down Expand Up @@ -188,6 +189,69 @@ public static AlpineFloatingTagTemplateParameters PromptForInput()
}
}

sealed record AlpineVersionEolTemplateParameters(
string RemovedVersion,
string ReplacementVersion,
string NewestVersion,
DateTime EolDate,
DateTime ReplacementReleaseDate,
string ReplacementDiscussionUrl,
string DotnetExampleVersion1,
string DotnetExampleVersion2)
{
public static Func<TemplateContext> ContextFactory { get; } = () =>
{
var model = PromptForInput();
return new TemplateContext(model);
};

public static AlpineVersionEolTemplateParameters PromptForInput()
{
var removedVersion = AnsiConsole.Prompt(
new TextPrompt<string>("Alpine version being removed:")
.DefaultValue("3.XX"));

var replacementVersion = AnsiConsole.Prompt(
new TextPrompt<string>($"Primary Alpine version to upgrade to:")
.DefaultValue("3.XX"));

var newestVersion = AnsiConsole.Prompt(
new TextPrompt<string>("[grey][[Optional]][/] Newest Alpine version (if different from replacement):")
.DefaultValue("")
.AllowEmpty());

var eolDate = AnsiConsole.Prompt(
new TextPrompt<DateOnly>($"Date Alpine {removedVersion} images stop being maintained:")
.DefaultValue(DateOnly.GetPatchTuesday(0)));

var replacementReleaseDate = AnsiConsole.Prompt(
new TextPrompt<DateOnly>($"When were Alpine {replacementVersion} images released?")
.DefaultValue(DateOnly.GetPatchTuesday(-3)));

const string DiscussionQueryLink = "https://github.com/dotnet/dotnet-docker/discussions/categories/announcements?discussions_q=is%3Aopen+category%3AAnnouncements+alpine";
var replacementDiscussionUrl = AnsiConsole.Prompt(
new TextPrompt<string>($"Link to announcement for Alpine {replacementVersion} image release (see {DiscussionQueryLink}):"));

var dotnetExampleVersion1 = AnsiConsole.Prompt(
new TextPrompt<string>("First .NET example version for tags:")
.DefaultValue("8.0"));

var dotnetExampleVersion2 = AnsiConsole.Prompt(
new TextPrompt<string>("Second .NET example version for tags:")
.DefaultValue("9.0"));

return new AlpineVersionEolTemplateParameters(
removedVersion,
replacementVersion,
newestVersion,
eolDate.ToDateTime(TimeOnly.MinValue),
replacementReleaseDate.ToDateTime(TimeOnly.MinValue),
replacementDiscussionUrl,
dotnetExampleVersion1,
dotnetExampleVersion2);
}
}

internal static class DateOnlyExtensions
{
extension(DateOnly date)
Expand Down
14 changes: 14 additions & 0 deletions eng/announcement-templates/alpine-remove-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# .NET Alpine {{ RemovedVersion }} images no longer maintained

.NET container images based on Alpine {{ RemovedVersion }} will no longer be maintained starting today, {{ EolDate | date: "%Y-%m-%d" }}, per our policy. Alpine {{ ReplacementVersion }} images [were released on {{ ReplacementReleaseDate | date: "%Y-%m-%d" }}]({{ ReplacementDiscussionUrl }}).

For more information, see our policies:

- [Supported platforms policy](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-platforms.md)
- [Supported tags policy](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-tags.md#majorminor-net-version-alpine).

## Details

Image tags containing `alpine{{ RemovedVersion }}` will no longer be updated. We will not delete existing {{ RemovedVersion }} images or tags, but they now contain unsupported builds of Alpine and .NET.

If you are using one of the Alpine {{ RemovedVersion }} tags such as `{{ DotnetExampleVersion1 }}-alpine{{ RemovedVersion }}` or `{{ DotnetExampleVersion2 }}-alpine{{ RemovedVersion }}`, we recommend that you upgrade to Alpine {{ ReplacementVersion }}{% if NewestVersion != "" %} or Alpine {{ NewestVersion }}{% endif %}. Alternatively, you can use a floating tag for Alpine such as `{{ DotnetExampleVersion1 }}-alpine` or `{{ DotnetExampleVersion2 }}-alpine` which updates automatically according to the [supported tags policy](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-tags.md#majorminor-net-version-alpine).