diff --git a/.github/ISSUE_TEMPLATE/new-windows-release.md b/.github/ISSUE_TEMPLATE/new-windows-release.md index 71e19cf1b..1dc8e5901 100644 --- a/.github/ISSUE_TEMPLATE/new-windows-release.md +++ b/.github/ISSUE_TEMPLATE/new-windows-release.md @@ -2,15 +2,14 @@ name: ".NET Framework Docker Release - New Windows Version" about: "Checklist for releasing .NET Framework container images for new Windows major versions" title: ".NET Framework Container Images Release - New Windows Version - " -labels: docker -assignees: lbussell --- ## Prep Tasks -1. - [ ] Ensure a ["New Windows Release" issue](https://github.com/dotnet/docker-tools/blob/main/.github/ISSUE_TEMPLATE/releases/new-windows-release.md) exists for docker-tools repo +1. - [ ] Ensure a ["New Windows Release" issue](https://github.com/dotnet/docker-tools/blob/main/.github/ISSUE_TEMPLATE/releases/new-windows-release.md) exists for docker-tools repo. Follow that checklist until build images for the new Windows version are available. 1. - [ ] Update [manifest.json](https://github.com/microsoft/dotnet-framework-docker/blob/main/manifest.json) to include entries for the new images -1. - [ ] Update [manifest.samples.json](https://github.com/microsoft/dotnet-framework-docker/blob/main/manifest.samples.json) to include the new Windows version for each of the samples +1. - [ ] Update [manifest.versions.json](https://github.com/microsoft/dotnet-framework-docker/blob/main/manifest.versions.json) and [manifest.datestamps.json](https://github.com/microsoft/dotnet-framework-docker/blob/main/manifest.datestamps.json) and add any variables that are necessary for the new Windows version +1. - [ ] Update [mcr-tags-metadata-templates](https://github.com/microsoft/dotnet-framework-docker/blob/main/eng/mcr-tags-metadata-templates) to include the new Windows version 1. - [ ] Update the test data for each of the [test classes](https://github.com/microsoft/dotnet-framework-docker/tree/main/tests/Microsoft.DotNet.Framework.Docker.Tests) to include the new Windows version 1. - [ ] Run the `update-dependencies` tool to generate the new Dockerfiles and update all the necessary files: - [ ] `dotnet run --project .\eng\update-dependencies` @@ -19,13 +18,17 @@ assignees: lbussell 1. - [ ] Create a local VM of the new Windows version 1. - [ ] Clone this repo with the above changes onto the VM 1. - [ ] Run `.\build-and-test.ps1 -OS windowsservercore-` to build and test your changes -1. - [ ] Revert any modifications that were made to the 3.5/runtime Dockerfile to support local testing due to the lack of the `https://dotnetbinaries.blob.core.windows.net/dockerassets/microsoft-windows.netfx3-.zip` file. 1. - [ ] Commit generated changes 1. - [ ] Create PR 1. - [ ] Get PR signoff. **Don't merge PR to main.** +## Samples + +1. - [ ] Add samples for the new Windows version +1. - [ ] Update [manifest.samples.json](https://github.com/microsoft/dotnet-framework-docker/blob/main/manifest.samples.json) to include the new Windows version for each of the samples +1. - [ ] Update [mcr-tags-metadata-templates](https://github.com/microsoft/dotnet-framework-docker/blob/main/eng/mcr-tags-metadata-templates) to include the new samples images + ## Release Day Tasks -1. - [ ] Create a [`microsoft-windows.netfx3-.zip`](https://github.com/microsoft/dotnet-framework-docker/blob/1c3dd6638c6b827b81ffb13386b924f6dcdee533/3.5/runtime/windowsservercore-1909/Dockerfile#L11) file containing the .NET Fx 3.5 cab installer file and upload it to the [blob storage location](https://dotnetbinaries.blob.core.windows.net/dockerassets). 1. - [ ] Release the images by following the [Servicing Release Checklist](https://github.com/dotnet/release/blob/main/.github/ISSUE_TEMPLATE/dotnet-fx-docker-servicing-release.md) 1. - [ ] Create an announcement (example: [Windows Server, version 1909](https://github.com/microsoft/dotnet-framework-docker/issues/448)) diff --git a/.github/linters/.linkspector.yml b/.github/linters/.linkspector.yml index d69ed7cae..e5981d5be 100644 --- a/.github/linters/.linkspector.yml +++ b/.github/linters/.linkspector.yml @@ -7,6 +7,5 @@ dirs: excludedDirs: - eng/readme-templates ignorePatterns: - - pattern: "^https://dotnetbinaries.blob.core.windows.net/dockerassets" - - pattern: "^https://github.com/dotnet/release/blob/main/.github/ISSUE_TEMPLATE/dotnet-fx-docker-servicing-release.md" + - pattern: "^https://github.com/dotnet/release/.*$" useGitIgnore: true diff --git a/Microsoft.DotNet.Framework.Docker.sln b/Microsoft.DotNet.Framework.Docker.sln new file mode 100644 index 000000000..f6109c6ed --- /dev/null +++ b/Microsoft.DotNet.Framework.Docker.sln @@ -0,0 +1,48 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.Framework.UpdateDependencies", "eng\update-dependencies\Microsoft.DotNet.Framework.UpdateDependencies.csproj", "{41061718-0920-4131-A70C-F52E46C89E31}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.Framework.Docker.Tests", "tests\Microsoft.DotNet.Framework.Docker.Tests\Microsoft.DotNet.Framework.Docker.Tests.csproj", "{ACB9C5B2-6D27-4487-94A1-6F397AC4D733}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {41061718-0920-4131-A70C-F52E46C89E31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {41061718-0920-4131-A70C-F52E46C89E31}.Debug|Any CPU.Build.0 = Debug|Any CPU + {41061718-0920-4131-A70C-F52E46C89E31}.Debug|x64.ActiveCfg = Debug|Any CPU + {41061718-0920-4131-A70C-F52E46C89E31}.Debug|x64.Build.0 = Debug|Any CPU + {41061718-0920-4131-A70C-F52E46C89E31}.Debug|x86.ActiveCfg = Debug|Any CPU + {41061718-0920-4131-A70C-F52E46C89E31}.Debug|x86.Build.0 = Debug|Any CPU + {41061718-0920-4131-A70C-F52E46C89E31}.Release|Any CPU.ActiveCfg = Release|Any CPU + {41061718-0920-4131-A70C-F52E46C89E31}.Release|Any CPU.Build.0 = Release|Any CPU + {41061718-0920-4131-A70C-F52E46C89E31}.Release|x64.ActiveCfg = Release|Any CPU + {41061718-0920-4131-A70C-F52E46C89E31}.Release|x64.Build.0 = Release|Any CPU + {41061718-0920-4131-A70C-F52E46C89E31}.Release|x86.ActiveCfg = Release|Any CPU + {41061718-0920-4131-A70C-F52E46C89E31}.Release|x86.Build.0 = Release|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Debug|x64.ActiveCfg = Debug|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Debug|x64.Build.0 = Debug|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Debug|x86.ActiveCfg = Debug|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Debug|x86.Build.0 = Debug|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Release|Any CPU.Build.0 = Release|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Release|x64.ActiveCfg = Release|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Release|x64.Build.0 = Release|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Release|x86.ActiveCfg = Release|Any CPU + {ACB9C5B2-6D27-4487-94A1-6F397AC4D733}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/README.aspnet.md b/README.aspnet.md index 3bf0e0238..ca578dba8 100644 --- a/README.aspnet.md +++ b/README.aspnet.md @@ -73,35 +73,34 @@ Version Tag | OS Version | Supported .NET Versions Tag | Dockerfile ---------| --------------- -4.8.1-20250408-windowsservercore-ltsc2025, 4.8.1-windowsservercore-ltsc2025, 4.8.1 | [Dockerfile](src/aspnet/4.8.1/windowsservercore-ltsc2025/Dockerfile) -3.5-20250408-windowsservercore-ltsc2025, 3.5-windowsservercore-ltsc2025, 3.5 | [Dockerfile](src/aspnet/3.5/windowsservercore-ltsc2025/Dockerfile) +4.8.1-20250708-windowsservercore-ltsc2025, 4.8.1-windowsservercore-ltsc2025, 4.8.1 | [Dockerfile](src/aspnet/4.8.1/windowsservercore-ltsc2025/Dockerfile) ### Windows Server Core 2022 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8.1-20250408-windowsservercore-ltsc2022, 4.8.1-windowsservercore-ltsc2022, 4.8.1 | [Dockerfile](src/aspnet/4.8.1/windowsservercore-ltsc2022/Dockerfile) -4.8-20250408-windowsservercore-ltsc2022, 4.8-windowsservercore-ltsc2022, 4.8, latest | [Dockerfile](src/aspnet/4.8/windowsservercore-ltsc2022/Dockerfile) -3.5-20250408-windowsservercore-ltsc2022, 3.5-windowsservercore-ltsc2022, 3.5 | [Dockerfile](src/aspnet/3.5/windowsservercore-ltsc2022/Dockerfile) +4.8.1-20250708-windowsservercore-ltsc2022, 4.8.1-windowsservercore-ltsc2022, 4.8.1 | [Dockerfile](src/aspnet/4.8.1/windowsservercore-ltsc2022/Dockerfile) +4.8-20250708-windowsservercore-ltsc2022, 4.8-windowsservercore-ltsc2022, 4.8, latest | [Dockerfile](src/aspnet/4.8/windowsservercore-ltsc2022/Dockerfile) +3.5-20250708-windowsservercore-ltsc2022, 3.5-windowsservercore-ltsc2022, 3.5 | [Dockerfile](src/aspnet/3.5/windowsservercore-ltsc2022/Dockerfile) ### Windows Server Core 2019 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8-20250408-windowsservercore-ltsc2019, 4.8-windowsservercore-ltsc2019, 4.8, latest | [Dockerfile](src/aspnet/4.8/windowsservercore-ltsc2019/Dockerfile) -4.7.2-20250408-windowsservercore-ltsc2019, 4.7.2-windowsservercore-ltsc2019, 4.7.2 | [Dockerfile](src/aspnet/4.7.2/windowsservercore-ltsc2019/Dockerfile) -3.5-20250408-windowsservercore-ltsc2019, 3.5-windowsservercore-ltsc2019, 3.5 | [Dockerfile](src/aspnet/3.5/windowsservercore-ltsc2019/Dockerfile) +4.8-20250708-windowsservercore-ltsc2019, 4.8-windowsservercore-ltsc2019, 4.8, latest | [Dockerfile](src/aspnet/4.8/windowsservercore-ltsc2019/Dockerfile) +4.7.2-20250708-windowsservercore-ltsc2019, 4.7.2-windowsservercore-ltsc2019, 4.7.2 | [Dockerfile](src/aspnet/4.7.2/windowsservercore-ltsc2019/Dockerfile) +3.5-20250708-windowsservercore-ltsc2019, 3.5-windowsservercore-ltsc2019, 3.5 | [Dockerfile](src/aspnet/3.5/windowsservercore-ltsc2019/Dockerfile) ### Windows Server Core 2016 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8-20250408-windowsservercore-ltsc2016, 4.8-windowsservercore-ltsc2016, 4.8, latest | [Dockerfile](src/aspnet/4.8/windowsservercore-ltsc2016/Dockerfile) -4.7.2-20250408-windowsservercore-ltsc2016, 4.7.2-windowsservercore-ltsc2016, 4.7.2 | [Dockerfile](src/aspnet/4.7.2/windowsservercore-ltsc2016/Dockerfile) -4.7.1-20250408-windowsservercore-ltsc2016, 4.7.1-windowsservercore-ltsc2016, 4.7.1 | [Dockerfile](src/aspnet/4.7.1/windowsservercore-ltsc2016/Dockerfile) -4.7-20250408-windowsservercore-ltsc2016, 4.7-windowsservercore-ltsc2016, 4.7 | [Dockerfile](src/aspnet/4.7/windowsservercore-ltsc2016/Dockerfile) -4.6.2-20250408-windowsservercore-ltsc2016, 4.6.2-windowsservercore-ltsc2016, 4.6.2 | [Dockerfile](src/aspnet/4.6.2/windowsservercore-ltsc2016/Dockerfile) -3.5-20250408-windowsservercore-ltsc2016, 3.5-windowsservercore-ltsc2016, 3.5 | [Dockerfile](src/aspnet/3.5/windowsservercore-ltsc2016/Dockerfile) +4.8-20250708-windowsservercore-ltsc2016, 4.8-windowsservercore-ltsc2016, 4.8, latest | [Dockerfile](src/aspnet/4.8/windowsservercore-ltsc2016/Dockerfile) +4.7.2-20250708-windowsservercore-ltsc2016, 4.7.2-windowsservercore-ltsc2016, 4.7.2 | [Dockerfile](src/aspnet/4.7.2/windowsservercore-ltsc2016/Dockerfile) +4.7.1-20250708-windowsservercore-ltsc2016, 4.7.1-windowsservercore-ltsc2016, 4.7.1 | [Dockerfile](src/aspnet/4.7.1/windowsservercore-ltsc2016/Dockerfile) +4.7-20250708-windowsservercore-ltsc2016, 4.7-windowsservercore-ltsc2016, 4.7 | [Dockerfile](src/aspnet/4.7/windowsservercore-ltsc2016/Dockerfile) +4.6.2-20250708-windowsservercore-ltsc2016, 4.6.2-windowsservercore-ltsc2016, 4.6.2 | [Dockerfile](src/aspnet/4.6.2/windowsservercore-ltsc2016/Dockerfile) +3.5-20250708-windowsservercore-ltsc2016, 3.5-windowsservercore-ltsc2016, 3.5 | [Dockerfile](src/aspnet/3.5/windowsservercore-ltsc2016/Dockerfile) *Tags not listed in the table above are not supported. See the [Supported Tags Policy](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-tags.md). diff --git a/README.runtime.md b/README.runtime.md index 1ab89d91f..81c11b1fb 100644 --- a/README.runtime.md +++ b/README.runtime.md @@ -64,35 +64,34 @@ Version Tag | OS Version | Supported .NET Versions Tag | Dockerfile ---------| --------------- -4.8.1-20250408-windowsservercore-ltsc2025, 4.8.1-windowsservercore-ltsc2025, 4.8.1 | [Dockerfile](src/runtime/4.8.1/windowsservercore-ltsc2025/Dockerfile) -3.5-20250408-windowsservercore-ltsc2025, 3.5-windowsservercore-ltsc2025, 3.5 | [Dockerfile](src/runtime/3.5/windowsservercore-ltsc2025/Dockerfile) +4.8.1-20250708-windowsservercore-ltsc2025, 4.8.1-windowsservercore-ltsc2025, 4.8.1 | [Dockerfile](src/runtime/4.8.1/windowsservercore-ltsc2025/Dockerfile) ### Windows Server Core 2022 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8.1-20250408-windowsservercore-ltsc2022, 4.8.1-windowsservercore-ltsc2022, 4.8.1 | [Dockerfile](src/runtime/4.8.1/windowsservercore-ltsc2022/Dockerfile) -4.8-20250408-windowsservercore-ltsc2022, 4.8-windowsservercore-ltsc2022, 4.8, latest | [Dockerfile](src/runtime/4.8/windowsservercore-ltsc2022/Dockerfile) -3.5-20250408-windowsservercore-ltsc2022, 3.5-windowsservercore-ltsc2022, 3.5 | [Dockerfile](src/runtime/3.5/windowsservercore-ltsc2022/Dockerfile) +4.8.1-20250708-windowsservercore-ltsc2022, 4.8.1-windowsservercore-ltsc2022, 4.8.1 | [Dockerfile](src/runtime/4.8.1/windowsservercore-ltsc2022/Dockerfile) +4.8-20250708-windowsservercore-ltsc2022, 4.8-windowsservercore-ltsc2022, 4.8, latest | [Dockerfile](src/runtime/4.8/windowsservercore-ltsc2022/Dockerfile) +3.5-20250708-windowsservercore-ltsc2022, 3.5-windowsservercore-ltsc2022, 3.5 | [Dockerfile](src/runtime/3.5/windowsservercore-ltsc2022/Dockerfile) ### Windows Server Core 2019 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8-20250408-windowsservercore-ltsc2019, 4.8-windowsservercore-ltsc2019, 4.8, latest | [Dockerfile](src/runtime/4.8/windowsservercore-ltsc2019/Dockerfile) -4.7.2-20250408-windowsservercore-ltsc2019, 4.7.2-windowsservercore-ltsc2019, 4.7.2 | [Dockerfile](src/runtime/4.7.2/windowsservercore-ltsc2019/Dockerfile) -3.5-20250408-windowsservercore-ltsc2019, 3.5-windowsservercore-ltsc2019, 3.5 | [Dockerfile](src/runtime/3.5/windowsservercore-ltsc2019/Dockerfile) +4.8-20250708-windowsservercore-ltsc2019, 4.8-windowsservercore-ltsc2019, 4.8, latest | [Dockerfile](src/runtime/4.8/windowsservercore-ltsc2019/Dockerfile) +4.7.2-20250708-windowsservercore-ltsc2019, 4.7.2-windowsservercore-ltsc2019, 4.7.2 | [Dockerfile](src/runtime/4.7.2/windowsservercore-ltsc2019/Dockerfile) +3.5-20250708-windowsservercore-ltsc2019, 3.5-windowsservercore-ltsc2019, 3.5 | [Dockerfile](src/runtime/3.5/windowsservercore-ltsc2019/Dockerfile) ### Windows Server Core 2016 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8-20250408-windowsservercore-ltsc2016, 4.8-windowsservercore-ltsc2016, 4.8, latest | [Dockerfile](src/runtime/4.8/windowsservercore-ltsc2016/Dockerfile) -4.7.2-20250408-windowsservercore-ltsc2016, 4.7.2-windowsservercore-ltsc2016, 4.7.2 | [Dockerfile](src/runtime/4.7.2/windowsservercore-ltsc2016/Dockerfile) -4.7.1-20250408-windowsservercore-ltsc2016, 4.7.1-windowsservercore-ltsc2016, 4.7.1 | [Dockerfile](src/runtime/4.7.1/windowsservercore-ltsc2016/Dockerfile) -4.7-20250408-windowsservercore-ltsc2016, 4.7-windowsservercore-ltsc2016, 4.7 | [Dockerfile](src/runtime/4.7/windowsservercore-ltsc2016/Dockerfile) -4.6.2-20250408-windowsservercore-ltsc2016, 4.6.2-windowsservercore-ltsc2016, 4.6.2 | [Dockerfile](src/runtime/4.6.2/windowsservercore-ltsc2016/Dockerfile) -3.5-20250408-windowsservercore-ltsc2016, 3.5-windowsservercore-ltsc2016, 3.5 | [Dockerfile](src/runtime/3.5/windowsservercore-ltsc2016/Dockerfile) +4.8-20250708-windowsservercore-ltsc2016, 4.8-windowsservercore-ltsc2016, 4.8, latest | [Dockerfile](src/runtime/4.8/windowsservercore-ltsc2016/Dockerfile) +4.7.2-20250708-windowsservercore-ltsc2016, 4.7.2-windowsservercore-ltsc2016, 4.7.2 | [Dockerfile](src/runtime/4.7.2/windowsservercore-ltsc2016/Dockerfile) +4.7.1-20250708-windowsservercore-ltsc2016, 4.7.1-windowsservercore-ltsc2016, 4.7.1 | [Dockerfile](src/runtime/4.7.1/windowsservercore-ltsc2016/Dockerfile) +4.7-20250708-windowsservercore-ltsc2016, 4.7-windowsservercore-ltsc2016, 4.7 | [Dockerfile](src/runtime/4.7/windowsservercore-ltsc2016/Dockerfile) +4.6.2-20250708-windowsservercore-ltsc2016, 4.6.2-windowsservercore-ltsc2016, 4.6.2 | [Dockerfile](src/runtime/4.6.2/windowsservercore-ltsc2016/Dockerfile) +3.5-20250708-windowsservercore-ltsc2016, 3.5-windowsservercore-ltsc2016, 3.5 | [Dockerfile](src/runtime/3.5/windowsservercore-ltsc2016/Dockerfile) *Tags not listed in the table above are not supported. See the [Supported Tags Policy](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-tags.md). diff --git a/README.sdk.md b/README.sdk.md index ff2c721c6..a9fef54ba 100644 --- a/README.sdk.md +++ b/README.sdk.md @@ -72,30 +72,29 @@ Version Tag | OS Version | Supported .NET Versions Tag | Dockerfile ---------| --------------- -4.8.1-20250408-windowsservercore-ltsc2025, 4.8.1-windowsservercore-ltsc2025, 4.8.1 | [Dockerfile](src/sdk/4.8.1/windowsservercore-ltsc2025/Dockerfile) -3.5-20250408-windowsservercore-ltsc2025, 3.5-windowsservercore-ltsc2025, 3.5 | [Dockerfile](src/sdk/3.5/windowsservercore-ltsc2025/Dockerfile) +4.8.1-20250708-windowsservercore-ltsc2025, 4.8.1-windowsservercore-ltsc2025, 4.8.1 | [Dockerfile](src/sdk/4.8.1/windowsservercore-ltsc2025/Dockerfile) ### Windows Server Core 2022 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8.1-20250408-windowsservercore-ltsc2022, 4.8.1-windowsservercore-ltsc2022, 4.8.1 | [Dockerfile](src/sdk/4.8.1/windowsservercore-ltsc2022/Dockerfile) -4.8-20250408-windowsservercore-ltsc2022, 4.8-windowsservercore-ltsc2022, 4.8, latest | [Dockerfile](src/sdk/4.8/windowsservercore-ltsc2022/Dockerfile) -3.5-20250408-windowsservercore-ltsc2022, 3.5-windowsservercore-ltsc2022, 3.5 | [Dockerfile](src/sdk/3.5/windowsservercore-ltsc2022/Dockerfile) +4.8.1-20250708-windowsservercore-ltsc2022, 4.8.1-windowsservercore-ltsc2022, 4.8.1 | [Dockerfile](src/sdk/4.8.1/windowsservercore-ltsc2022/Dockerfile) +4.8-20250708-windowsservercore-ltsc2022, 4.8-windowsservercore-ltsc2022, 4.8, latest | [Dockerfile](src/sdk/4.8/windowsservercore-ltsc2022/Dockerfile) +3.5-20250708-windowsservercore-ltsc2022, 3.5-windowsservercore-ltsc2022, 3.5 | [Dockerfile](src/sdk/3.5/windowsservercore-ltsc2022/Dockerfile) ### Windows Server Core 2019 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8-20250408-windowsservercore-ltsc2019, 4.8-windowsservercore-ltsc2019, 4.8, latest | [Dockerfile](src/sdk/4.8/windowsservercore-ltsc2019/Dockerfile) -3.5-20250408-windowsservercore-ltsc2019, 3.5-windowsservercore-ltsc2019, 3.5 | [Dockerfile](src/sdk/3.5/windowsservercore-ltsc2019/Dockerfile) +4.8-20250708-windowsservercore-ltsc2019, 4.8-windowsservercore-ltsc2019, 4.8, latest | [Dockerfile](src/sdk/4.8/windowsservercore-ltsc2019/Dockerfile) +3.5-20250708-windowsservercore-ltsc2019, 3.5-windowsservercore-ltsc2019, 3.5 | [Dockerfile](src/sdk/3.5/windowsservercore-ltsc2019/Dockerfile) ### Windows Server Core 2016 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8-20250408-windowsservercore-ltsc2016, 4.8-windowsservercore-ltsc2016, 4.8, latest | [Dockerfile](src/sdk/4.8/windowsservercore-ltsc2016/Dockerfile) -3.5-20250408-windowsservercore-ltsc2016, 3.5-windowsservercore-ltsc2016, 3.5 | [Dockerfile](src/sdk/3.5/windowsservercore-ltsc2016/Dockerfile) +4.8-20250708-windowsservercore-ltsc2016, 4.8-windowsservercore-ltsc2016, 4.8, latest | [Dockerfile](src/sdk/4.8/windowsservercore-ltsc2016/Dockerfile) +3.5-20250708-windowsservercore-ltsc2016, 3.5-windowsservercore-ltsc2016, 3.5 | [Dockerfile](src/sdk/3.5/windowsservercore-ltsc2016/Dockerfile) *Tags not listed in the table above are not supported. See the [Supported Tags Policy](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-tags.md). diff --git a/README.wcf.md b/README.wcf.md index 46c6ae40e..1b00a4451 100644 --- a/README.wcf.md +++ b/README.wcf.md @@ -72,31 +72,31 @@ Version Tag | OS Version | Supported .NET Versions Tag | Dockerfile ---------| --------------- -4.8.1-20250408-windowsservercore-ltsc2025, 4.8.1-windowsservercore-ltsc2025, 4.8.1 | [Dockerfile](src/wcf/4.8.1/windowsservercore-ltsc2025/Dockerfile) +4.8.1-20250708-windowsservercore-ltsc2025, 4.8.1-windowsservercore-ltsc2025, 4.8.1 | [Dockerfile](src/wcf/4.8.1/windowsservercore-ltsc2025/Dockerfile) ### Windows Server Core 2022 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8.1-20250408-windowsservercore-ltsc2022, 4.8.1-windowsservercore-ltsc2022, 4.8.1 | [Dockerfile](src/wcf/4.8.1/windowsservercore-ltsc2022/Dockerfile) -4.8-20250408-windowsservercore-ltsc2022, 4.8-windowsservercore-ltsc2022, 4.8, latest | [Dockerfile](src/wcf/4.8/windowsservercore-ltsc2022/Dockerfile) +4.8.1-20250708-windowsservercore-ltsc2022, 4.8.1-windowsservercore-ltsc2022, 4.8.1 | [Dockerfile](src/wcf/4.8.1/windowsservercore-ltsc2022/Dockerfile) +4.8-20250708-windowsservercore-ltsc2022, 4.8-windowsservercore-ltsc2022, 4.8, latest | [Dockerfile](src/wcf/4.8/windowsservercore-ltsc2022/Dockerfile) ### Windows Server Core 2019 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8-20250408-windowsservercore-ltsc2019, 4.8-windowsservercore-ltsc2019, 4.8, latest | [Dockerfile](src/wcf/4.8/windowsservercore-ltsc2019/Dockerfile) -4.7.2-20250408-windowsservercore-ltsc2019, 4.7.2-windowsservercore-ltsc2019, 4.7.2 | [Dockerfile](src/wcf/4.7.2/windowsservercore-ltsc2019/Dockerfile) +4.8-20250708-windowsservercore-ltsc2019, 4.8-windowsservercore-ltsc2019, 4.8, latest | [Dockerfile](src/wcf/4.8/windowsservercore-ltsc2019/Dockerfile) +4.7.2-20250708-windowsservercore-ltsc2019, 4.7.2-windowsservercore-ltsc2019, 4.7.2 | [Dockerfile](src/wcf/4.7.2/windowsservercore-ltsc2019/Dockerfile) ### Windows Server Core 2016 amd64 Tags Tag | Dockerfile ---------| --------------- -4.8-20250408-windowsservercore-ltsc2016, 4.8-windowsservercore-ltsc2016, 4.8, latest | [Dockerfile](src/wcf/4.8/windowsservercore-ltsc2016/Dockerfile) -4.7.2-20250408-windowsservercore-ltsc2016, 4.7.2-windowsservercore-ltsc2016, 4.7.2 | [Dockerfile](src/wcf/4.7.2/windowsservercore-ltsc2016/Dockerfile) -4.7.1-20250408-windowsservercore-ltsc2016, 4.7.1-windowsservercore-ltsc2016, 4.7.1 | [Dockerfile](src/wcf/4.7.1/windowsservercore-ltsc2016/Dockerfile) -4.7-20250408-windowsservercore-ltsc2016, 4.7-windowsservercore-ltsc2016, 4.7 | [Dockerfile](src/wcf/4.7/windowsservercore-ltsc2016/Dockerfile) -4.6.2-20250408-windowsservercore-ltsc2016, 4.6.2-windowsservercore-ltsc2016, 4.6.2 | [Dockerfile](src/wcf/4.6.2/windowsservercore-ltsc2016/Dockerfile) +4.8-20250708-windowsservercore-ltsc2016, 4.8-windowsservercore-ltsc2016, 4.8, latest | [Dockerfile](src/wcf/4.8/windowsservercore-ltsc2016/Dockerfile) +4.7.2-20250708-windowsservercore-ltsc2016, 4.7.2-windowsservercore-ltsc2016, 4.7.2 | [Dockerfile](src/wcf/4.7.2/windowsservercore-ltsc2016/Dockerfile) +4.7.1-20250708-windowsservercore-ltsc2016, 4.7.1-windowsservercore-ltsc2016, 4.7.1 | [Dockerfile](src/wcf/4.7.1/windowsservercore-ltsc2016/Dockerfile) +4.7-20250708-windowsservercore-ltsc2016, 4.7-windowsservercore-ltsc2016, 4.7 | [Dockerfile](src/wcf/4.7/windowsservercore-ltsc2016/Dockerfile) +4.6.2-20250708-windowsservercore-ltsc2016, 4.6.2-windowsservercore-ltsc2016, 4.6.2 | [Dockerfile](src/wcf/4.6.2/windowsservercore-ltsc2016/Dockerfile) *Tags not listed in the table above are not supported. See the [Supported Tags Policy](https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-tags.md). diff --git a/eng/common/templates/1es-official.yml b/eng/common/templates/1es-official.yml index bb4f3d188..357ab811d 100644 --- a/eng/common/templates/1es-official.yml +++ b/eng/common/templates/1es-official.yml @@ -17,6 +17,9 @@ parameters: - name: stages type: stageList default: [] +- name: serviceConnections + type: object + default: [] - name: pool type: object default: @@ -38,23 +41,30 @@ resources: ref: refs/tags/release extends: - template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + template: /eng/common/templates/task-prefix-decorator.yml@self parameters: - pool: ${{ parameters.pool }} - sdl: - binskim: - enabled: true - componentgovernance: - ignoreDirectories: $(Build.SourcesDirectory)/versions - whatIf: ${{ parameters.cgDryRun }} - showAlertLink: true - policheck: - enabled: true - sourceRepositoriesToScan: - exclude: - - repository: InternalVersionsRepo - - repository: PublicVersionsRepo - sourceAnalysisPool: ${{ parameters.sourceAnalysisPool }} - tsa: - enabled: true - stages: ${{ parameters.stages }} + baseTemplate: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + templateParameters: + pool: ${{ parameters.pool }} + sdl: + binskim: + enabled: true + componentgovernance: + ignoreDirectories: $(Build.SourcesDirectory)/versions + whatIf: ${{ parameters.cgDryRun }} + showAlertLink: true + policheck: + enabled: true + sourceRepositoriesToScan: + exclude: + - repository: InternalVersionsRepo + - repository: PublicVersionsRepo + sourceAnalysisPool: ${{ parameters.sourceAnalysisPool }} + tsa: + enabled: true + stages: + - template: /eng/common/templates/stages/setup-service-connections.yml@self + parameters: + pool: ${{ parameters.pool }} + serviceConnections: ${{ parameters.serviceConnections }} + - ${{ parameters.stages }} diff --git a/eng/common/templates/1es-unofficial.yml b/eng/common/templates/1es-unofficial.yml index 1be2d5745..64dc53134 100644 --- a/eng/common/templates/1es-unofficial.yml +++ b/eng/common/templates/1es-unofficial.yml @@ -20,6 +20,9 @@ parameters: type: stageList default: [] # 1ES Pipeline Template parameters +- name: serviceConnections + type: object + default: [] - name: pool type: object default: @@ -41,26 +44,35 @@ resources: ref: refs/tags/release extends: - template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates + template: /eng/common/templates/task-prefix-decorator.yml@self parameters: - pool: ${{ parameters.pool }} - sdl: - binskim: - enabled: true - componentgovernance: - ignoreDirectories: $(Build.SourcesDirectory)/versions - whatIf: true - showAlertLink: true - enableAllTools: ${{ not(parameters.disableSDL) }} - policheck: - enabled: true - sbom: - enabled: true - sourceRepositoriesToScan: - exclude: - - repository: InternalVersionsRepo - - repository: PublicVersionsRepo - sourceAnalysisPool: ${{ parameters.sourceAnalysisPool }} - tsa: - enabled: true - stages: ${{ parameters.stages }} + # Use a unique task prefix for unofficial pipelines + taskPrefix: "🟦" + baseTemplate: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates + templateParameters: + pool: ${{ parameters.pool }} + sdl: + binskim: + enabled: true + componentgovernance: + ignoreDirectories: $(Build.SourcesDirectory)/versions + whatIf: true + showAlertLink: true + enableAllTools: ${{ not(parameters.disableSDL) }} + policheck: + enabled: true + sbom: + enabled: true + sourceRepositoriesToScan: + exclude: + - repository: InternalVersionsRepo + - repository: PublicVersionsRepo + sourceAnalysisPool: ${{ parameters.sourceAnalysisPool }} + tsa: + enabled: true + stages: + - template: /eng/common/templates/stages/setup-service-connections.yml@self + parameters: + pool: ${{ parameters.pool }} + serviceConnections: ${{ parameters.serviceConnections }} + - ${{ parameters.stages }} diff --git a/eng/common/templates/jobs/build-images.yml b/eng/common/templates/jobs/build-images.yml index a1063904d..6d2482e9b 100644 --- a/eng/common/templates/jobs/build-images.yml +++ b/eng/common/templates/jobs/build-images.yml @@ -65,10 +65,14 @@ jobs: parameters: name: BuildImages displayName: Build Images - serviceConnection: $(build.serviceConnectionName) + serviceConnections: + - name: acr + id: $(build.serviceConnection.id) + tenantId: $(build.serviceConnection.tenantId) + clientId: $(build.serviceConnection.clientId) internalProjectName: ${{ parameters.internalProjectName }} dockerClientOS: ${{ parameters.dockerClientOS }} - args: > + args: >- build --manifest $(manifest) $(imageBuilderPaths) diff --git a/eng/common/templates/jobs/copy-base-images-staging.yml b/eng/common/templates/jobs/copy-base-images-staging.yml index 169eeb144..71ddb4a56 100644 --- a/eng/common/templates/jobs/copy-base-images-staging.yml +++ b/eng/common/templates/jobs/copy-base-images-staging.yml @@ -24,7 +24,10 @@ jobs: additionalOptions: ${{ parameters.additionalOptions }} acr: server: $(acr-staging.server) - serviceConnection: $(internal-mirror.serviceConnectionName) + serviceConnection: + tenantId: $(internal-mirror.serviceConnection.tenantId) + clientId: $(internal-mirror.serviceConnection.clientId) + id: $(internal-mirror.serviceConnection.id) subscription: $(acr-staging.subscription) resourceGroup: $(acr-staging.resourceGroup) repoPrefix: $(mirrorRepoPrefix) diff --git a/eng/common/templates/jobs/copy-base-images.yml b/eng/common/templates/jobs/copy-base-images.yml index c75974216..3068a43cb 100644 --- a/eng/common/templates/jobs/copy-base-images.yml +++ b/eng/common/templates/jobs/copy-base-images.yml @@ -32,7 +32,7 @@ jobs: - ${{ parameters.customInitSteps }} - template: /eng/common/templates/steps/copy-base-images.yml@self parameters: - acr: ${{ parameters.acr }} + acr: ${{ parameters.acr }} repoPrefix: ${{ parameters.repoPrefix }} additionalOptions: ${{ parameters.additionalOptions }} continueOnError: ${{ parameters.continueOnError }} diff --git a/eng/common/templates/jobs/generate-matrix.yml b/eng/common/templates/jobs/generate-matrix.yml index f4fb75c0b..8037aca56 100644 --- a/eng/common/templates/jobs/generate-matrix.yml +++ b/eng/common/templates/jobs/generate-matrix.yml @@ -8,6 +8,7 @@ parameters: noCache: false customInitSteps: [] commonInitStepsForMatrixAndBuild: [] + sourceBuildPipelineRunId: "" jobs: - job: ${{ parameters.name }} @@ -28,9 +29,10 @@ jobs: parameters: targetPath: $(Build.ArtifactStagingDirectory) artifactName: image-info + pipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - powershell: | $additionalGenerateBuildMatrixOptions = "$(additionalGenerateBuildMatrixOptions)" - + if ("${{ parameters.isTestStage}}" -eq "true") { $additionalGenerateBuildMatrixOptions = "$additionalGenerateBuildMatrixOptions --image-info $(artifactsPath)/image-info.json" } @@ -59,6 +61,10 @@ jobs: parameters: name: matrix displayName: Generate ${{ parameters.matrixType }} Matrix - serviceConnection: $(build.serviceConnectionName) + serviceConnections: + - name: acr + tenantId: $(build.serviceConnection.tenantId) + clientId: $(build.serviceConnection.clientId) + id: $(build.serviceConnection.id) internalProjectName: internal args: $(generateBuildMatrixCommand) diff --git a/eng/common/templates/jobs/publish.yml b/eng/common/templates/jobs/publish.yml index 05538ba41..52a851446 100644 --- a/eng/common/templates/jobs/publish.yml +++ b/eng/common/templates/jobs/publish.yml @@ -3,14 +3,17 @@ parameters: internalProjectName: null customInitSteps: [] customPublishVariables: [] + sourceBuildPipelineDefinitionId: "" + sourceBuildPipelineRunId: "" jobs: - job: Publish pool: ${{ parameters.pool }} timeoutInMinutes: 90 + variables: - name: imageBuilder.commonCmdArgs - value: > + value: >- --manifest '$(manifest)' --registry-override '$(acr.server)' $(manifestVariables) @@ -29,39 +32,56 @@ jobs: - name: sourceBuildIdOutputDir value: $(Build.ArtifactStagingDirectory)/sourceBuildId - ${{ parameters.customPublishVariables }} + steps: - template: /eng/common/templates/steps/retain-build.yml@self + - template: /eng/common/templates/steps/init-docker-linux.yml@self + - pwsh: | $azdoOrgName = Split-Path -Leaf $Env:SYSTEM_COLLECTIONURI echo "##vso[task.setvariable variable=azdoOrgName]$azdoOrgName" displayName: Set Publish Variables + - ${{ parameters.customInitSteps }} + - template: /eng/common/templates/steps/validate-branch.yml@self parameters: internalProjectName: ${{ parameters.internalProjectName }} + - template: /eng/common/templates/steps/download-build-artifact.yml@self parameters: targetPath: $(imageInfoHostDir) artifactName: image-info + piplineDefinitionId: ${{ parameters.sourceBuildPipelineDefinitionId }} + pipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} # This can fail in scenarios where no build jobs have run to produce any artifacts continueOnError: true + - template: /eng/common/templates/steps/set-image-info-path-var.yml@self parameters: publicSourceBranch: $(publicSourceBranch) + - template: /eng/common/templates/steps/set-dry-run.yml@self + - script: echo "##vso[task.setvariable variable=imageQueueTime]$(date --rfc-2822)" displayName: Set Publish Variables + - script: > $(runImageBuilderCmd) trimUnchangedPlatforms '$(imageInfoContainerDir)/image-info.json' displayName: Trim Unchanged Images + - template: /eng/common/templates/steps/run-imagebuilder.yml@self parameters: displayName: Copy Images - serviceConnection: $(publish.serviceConnectionName) + serviceConnections: + - name: acr + id: $(publish.serviceConnection.id) + tenantId: $(publish.serviceConnection.tenantId) + clientId: $(publish.serviceConnection.clientId) internalProjectName: ${{ parameters.internalProjectName }} - args: > + args: >- copyAcrImages '$(acr.subscription)' '$(acr.resourceGroup)' @@ -74,13 +94,18 @@ jobs: $(dryRunArg) $(imageBuilder.pathArgs) $(imageBuilder.commonCmdArgs) + - template: /eng/common/templates/steps/run-imagebuilder.yml@self parameters: displayName: Publish Manifest - serviceConnection: $(publish.serviceConnectionName) + serviceConnections: + - name: acr + id: $(publish.serviceConnection.id) + tenantId: $(publish.serviceConnection.tenantId) + clientId: $(publish.serviceConnection.clientId) internalProjectName: ${{ parameters.internalProjectName }} dockerClientOS: ${{ parameters.dockerClientOS }} - args: > + args: >- publishManifest '$(imageInfoContainerDir)/image-info.json' --repo-prefix '$(publishRepoPrefix)' @@ -89,6 +114,7 @@ jobs: $(dryRunArg) $(imageBuilder.pathArgs) $(imageBuilder.commonCmdArgs) + - template: /eng/common/templates/steps/publish-artifact.yml@self parameters: path: $(imageInfoHostDir) @@ -96,24 +122,30 @@ jobs: displayName: Publish Image Info File Artifact internalProjectName: ${{ parameters.internalProjectName }} publicProjectName: ${{ parameters.publicProjectName }} + - template: /eng/common/templates/steps/wait-for-mcr-image-ingestion.yml@self parameters: imageInfoPath: '$(imageinfoContainerDir)/image-info.json' minQueueTime: $(imageQueueTime) dryRunArg: $(dryRunArg) condition: succeeded() + - template: /eng/common/templates/steps/publish-readmes.yml@self parameters: dryRunArg: $(dryRunArg) condition: and(succeeded(), eq(variables['publishReadme'], 'true')) + - script: mkdir -p $(Build.ArtifactStagingDirectory)/eol-annotation-data displayName: Create EOL Annotation Data Directory - - script: > - curl -fSL + + - powershell: >- + $(engCommonPath)/Invoke-WithRetry.ps1 + "curl -fSL --output $(imageInfoHostDir)/full-image-info-orig.json - https://raw.githubusercontent.com/$(gitHubVersionsRepoInfo.org)/$(gitHubVersionsRepoInfo.repo)/refs/heads/$(gitHubVersionsRepoInfo.branch)/$(gitHubImageInfoVersionsPath) + https://raw.githubusercontent.com/$(gitHubVersionsRepoInfo.org)/$(gitHubVersionsRepoInfo.repo)/refs/heads/$(gitHubVersionsRepoInfo.branch)/$(gitHubImageInfoVersionsPath)" condition: and(succeeded(), eq(variables['publishImageInfo'], 'true')) displayName: Download Latest Image Info + - script: > $(runImageBuilderCmd) mergeImageInfo $(imageInfoContainerDir) @@ -125,13 +157,18 @@ jobs: --initial-image-info-path $(imageInfoContainerDir)/full-image-info-orig.json condition: and(succeeded(), eq(variables['publishImageInfo'], 'true')) displayName: Merge Image Info + - template: /eng/common/templates/steps/run-imagebuilder.yml@self parameters: displayName: Ingest Kusto Image Info - serviceConnection: $(kusto.serviceConnectionName) + serviceConnections: + - name: kusto + id: $(kusto.serviceConnection.id) + tenantId: $(kusto.serviceConnection.tenantId) + clientId: $(kusto.serviceConnection.clientId) internalProjectName: ${{ parameters.internalProjectName }} condition: and(succeeded(), eq(variables['ingestKustoImageInfo'], 'true')) - args: > + args: >- ingestKustoImageInfo '$(imageInfoContainerDir)/image-info.json' '$(kusto.cluster)' @@ -142,13 +179,18 @@ jobs: --architecture '*' $(dryRunArg) $(imageBuilder.commonCmdArgs) + - template: /eng/common/templates/steps/run-imagebuilder.yml@self parameters: displayName: Generate EOL Annotation Data - serviceConnection: $(publish.serviceConnectionName) + serviceConnections: + - name: acr + id: $(publish.serviceConnection.id) + tenantId: $(publish.serviceConnection.tenantId) + clientId: $(publish.serviceConnection.clientId) internalProjectName: internal condition: and(succeeded(), eq(variables['publishEolAnnotations'], 'true')) - args: > + args: >- generateEolAnnotationData '$(artifactsPath)/eol-annotation-data/eol-annotation-data.json' '$(imageInfoContainerDir)/full-image-info-orig.json' @@ -157,6 +199,7 @@ jobs: '$(publishRepoPrefix)' $(generateEolAnnotationDataExtraOptions) $(dryRunArg) + - template: /eng/common/templates/steps/publish-artifact.yml@self parameters: path: $(Build.ArtifactStagingDirectory)/eol-annotation-data @@ -165,16 +208,18 @@ jobs: internalProjectName: internal publicProjectName: public condition: and(succeeded(), eq(variables['publishEolAnnotations'], 'true')) + - template: /eng/common/templates/steps/annotate-eol-digests.yml@self parameters: internalProjectName: ${{ parameters.internalProjectName }} dataFile: $(artifactsPath)/eol-annotation-data/eol-annotation-data.json + - script: > $(runImageBuilderCmd) publishImageInfo '$(imageInfoContainerDir)/full-image-info-new.json' '$(gitHubVersionsRepoInfo.userName)' '$(gitHubVersionsRepoInfo.email)' - '$(gitHubVersionsRepoInfo.accessToken)' + $(gitHubVersionsRepoInfo.authArgs) --git-owner '$(gitHubVersionsRepoInfo.org)' --git-repo '$(gitHubVersionsRepoInfo.repo)' --git-branch '$(gitHubVersionsRepoInfo.branch)' @@ -183,6 +228,16 @@ jobs: $(imageBuilder.commonCmdArgs) condition: and(succeeded(), eq(variables['publishImageInfo'], 'true')) displayName: Publish Image Info + + # Task displayNames names are hardcoded to reference the task prefix used by 1ES official + # pipelines in eng/common/templates/1es-official.yml. + # + # These will fail if they are dependend on by an unofficial pipeline since they use a unique task + # prefix compared to official pipelines (see eng/common/templates/1es-unofficial.yml). This is + # acceptable because unofficial pipelines should not publish images. + # + # https://github.com/dotnet/docker-tools/issues/1698 tracks making this command no longer depend + # on individual step displayNames. - script: > $(runImageBuilderCmd) postPublishNotification '$(publishNotificationRepoName)' @@ -192,29 +247,37 @@ jobs: '$(System.AccessToken)' '$(azdoOrgName)' '$(System.TeamProject)' - '$(gitHubNotificationsRepoInfo.accessToken)' + $(gitHubNotificationsRepoInfo.authArgs) '$(gitHubNotificationsRepoInfo.org)' '$(gitHubNotificationsRepoInfo.repo)' --repo-prefix '$(publishRepoPrefix)' - --task "Copy Images (Authenticated)" - --task "Publish Manifest (Authenticated)" - --task "Wait for Image Ingestion (Authenticated)" - --task "Publish Readmes" - --task "Wait for MCR Doc Ingestion (Authenticated)" - --task "Publish Image Info" - --task "Ingest Kusto Image Info (Authenticated)" - --task "Generate EOL Annotation Data (Authenticated)" - --task "Annotate EOL Images (Authenticated)" - --task "Wait for Annotation Ingestion (Authenticated)" + --task "🟪 Copy Images" + --task "🟪 Publish Manifest" + --task "🟪 Wait for Image Ingestion" + --task "🟪 Publish Readmes" + --task "🟪 Wait for MCR Doc Ingestion" + --task "🟪 Publish Image Info" + --task "🟪 Ingest Kusto Image Info" + --task "🟪 Generate EOL Annotation Data" + --task "🟪 Annotate EOL Images" + --task "🟪 Wait for Annotation Ingestion" $(dryRunArg) $(imageBuilder.commonCmdArgs) displayName: Post Publish Notification condition: and(always(), eq(variables['publishNotificationsEnabled'], 'true')) + - powershell: | + # Default to current build number if parameter was not overridden + $buildId = "${{ parameters.sourceBuildPipelineRunId }}" + if ($buildId -eq "") { + $buildId = "$(Build.BuildNumber)" + } + New-Item -ItemType Directory -Path $(sourceBuildIdOutputDir) - Set-Content -Path $(sourceBuildIdOutputDir)/source-build-id.txt -Value $(sourceBuildId) + Set-Content -Path $(sourceBuildIdOutputDir)/source-build-id.txt -Value "$buildId" condition: succeeded() displayName: Write Source Build ID to File + - template: /eng/common/templates/steps/publish-artifact.yml@self parameters: path: $(sourceBuildIdOutputDir) diff --git a/eng/common/templates/jobs/test-images-linux-client.yml b/eng/common/templates/jobs/test-images-linux-client.yml index 4e1c0fd44..2e9319f2c 100644 --- a/eng/common/templates/jobs/test-images-linux-client.yml +++ b/eng/common/templates/jobs/test-images-linux-client.yml @@ -6,6 +6,7 @@ parameters: preBuildValidation: false internalProjectName: null customInitSteps: [] + sourceBuildPipelineRunId: "" jobs: - job: ${{ parameters.name }} @@ -24,3 +25,4 @@ jobs: preBuildValidation: ${{ parameters.preBuildValidation }} internalProjectName: ${{ parameters.internalProjectName }} customInitSteps: ${{ parameters.customInitSteps }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} diff --git a/eng/common/templates/jobs/test-images-windows-client.yml b/eng/common/templates/jobs/test-images-windows-client.yml index 3a0b2fd91..498fee6cb 100644 --- a/eng/common/templates/jobs/test-images-windows-client.yml +++ b/eng/common/templates/jobs/test-images-windows-client.yml @@ -5,6 +5,7 @@ parameters: testJobTimeout: 60 internalProjectName: null customInitSteps: [] + sourceBuildPipelineRunId: "" jobs: - job: ${{ parameters.name }} @@ -19,3 +20,4 @@ jobs: parameters: internalProjectName: ${{ parameters.internalProjectName }} customInitSteps: ${{ parameters.customInitSteps }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} diff --git a/eng/common/templates/stages/build-and-test.yml b/eng/common/templates/stages/build-and-test.yml index 2f4249a28..1b5d4a8f7 100644 --- a/eng/common/templates/stages/build-and-test.yml +++ b/eng/common/templates/stages/build-and-test.yml @@ -7,6 +7,7 @@ parameters: customGenerateMatrixInitSteps: [] customBuildInitSteps: [] customTestInitSteps: [] + sourceBuildPipelineRunId: "" linuxAmdBuildJobTimeout: 60 linuxArmBuildJobTimeout: 60 @@ -48,6 +49,7 @@ parameters: stages: - stage: Build condition: and(succeeded(), contains(variables['stages'], 'build')) + dependsOn: [] jobs: - template: /eng/common/templates/jobs/test-images-linux-client.yml@self parameters: @@ -266,6 +268,7 @@ stages: internalProjectName: ${{ parameters.internalProjectName }} publicProjectName: ${{ parameters.publicProjectName }} customInitSteps: ${{ parameters.customGenerateMatrixInitSteps }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} commonInitStepsForMatrixAndBuild: - template: /eng/common/templates/steps/common-init-for-matrix-and-build.yml@self parameters: @@ -280,6 +283,7 @@ stages: testJobTimeout: ${{ parameters.linuxAmdTestJobTimeout }} internalProjectName: ${{ parameters.internalProjectName }} customInitSteps: ${{ parameters.customTestInitSteps }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - template: /eng/common/templates/jobs/test-images-linux-client.yml@self parameters: name: Linux_arm64 @@ -288,6 +292,7 @@ stages: testJobTimeout: ${{ parameters.linuxArmTestJobTimeout }} internalProjectName: ${{ parameters.internalProjectName }} customInitSteps: ${{ parameters.customTestInitSteps }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - template: /eng/common/templates/jobs/test-images-linux-client.yml@self parameters: name: Linux_arm32 @@ -296,6 +301,7 @@ stages: testJobTimeout: ${{ parameters.linuxArmTestJobTimeout }} internalProjectName: ${{ parameters.internalProjectName }} customInitSteps: ${{ parameters.customTestInitSteps }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - template: /eng/common/templates/jobs/test-images-windows-client.yml@self parameters: name: Windows1809_amd64 @@ -304,6 +310,7 @@ stages: testJobTimeout: ${{ parameters.windowsAmdTestJobTimeout }} internalProjectName: ${{ parameters.internalProjectName }} customInitSteps: ${{ parameters.customTestInitSteps }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - template: /eng/common/templates/jobs/test-images-windows-client.yml@self parameters: name: Windows2022_amd64 @@ -312,6 +319,7 @@ stages: testJobTimeout: ${{ parameters.windowsAmdTestJobTimeout }} internalProjectName: ${{ parameters.internalProjectName }} customInitSteps: ${{ parameters.customTestInitSteps }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - template: /eng/common/templates/jobs/test-images-windows-client.yml@self parameters: name: Windows2025_amd64 @@ -320,6 +328,7 @@ stages: testJobTimeout: ${{ parameters.windowsAmdTestJobTimeout }} internalProjectName: ${{ parameters.internalProjectName }} customInitSteps: ${{ parameters.customTestInitSteps }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - template: /eng/common/templates/jobs/test-images-windows-client.yml@self parameters: name: WindowsLtsc2016_amd64 @@ -328,3 +337,4 @@ stages: testJobTimeout: ${{ parameters.windowsAmdTestJobTimeout }} internalProjectName: ${{ parameters.internalProjectName }} customInitSteps: ${{ parameters.customTestInitSteps }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} diff --git a/eng/common/templates/stages/dotnet/build-and-test.yml b/eng/common/templates/stages/dotnet/build-and-test.yml index 1ca876bb5..03bcaf372 100644 --- a/eng/common/templates/stages/dotnet/build-and-test.yml +++ b/eng/common/templates/stages/dotnet/build-and-test.yml @@ -25,6 +25,7 @@ parameters: linuxArmTestJobTimeout: 60 windowsAmdTestJobTimeout: 60 customTestInitSteps: [] + sourceBuildPipelineRunId: "" internalProjectName: null publicProjectName: null @@ -48,6 +49,7 @@ stages: linuxArmBuildJobTimeout: ${{ parameters.linuxArmBuildJobTimeout }} buildMatrixType: ${{ parameters.buildMatrixType }} testMatrixType: ${{ parameters.testMatrixType }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} internalVersionsRepoRef: InternalVersionsRepo publicVersionsRepoRef: PublicVersionsRepo diff --git a/eng/common/templates/stages/dotnet/build-test-publish-repo.yml b/eng/common/templates/stages/dotnet/build-test-publish-repo.yml index 40ea5550e..65bc54584 100644 --- a/eng/common/templates/stages/dotnet/build-test-publish-repo.yml +++ b/eng/common/templates/stages/dotnet/build-test-publish-repo.yml @@ -24,6 +24,7 @@ parameters: linuxArmTestJobTimeout: 60 windowsAmdTestJobTimeout: 60 customTestInitSteps: [] + sourceBuildPipelineRunId: "" # Publish parameters customPublishInitSteps: [] @@ -50,6 +51,7 @@ stages: windowsAmdBuildJobTimeout: ${{ parameters.windowsAmdBuildJobTimeout }} customBuildInitSteps: ${{ parameters.customBuildInitSteps }} # Test + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} testMatrixType: ${{ parameters.testMatrixType }} testMatrixCustomBuildLegGroupArgs: ${{ parameters.testMatrixCustomBuildLegGroupArgs }} linuxAmdTestJobTimeout: ${{ parameters.linuxAmdTestJobTimeout }} @@ -67,3 +69,4 @@ stages: customPublishInitSteps: ${{ parameters.customPublishInitSteps }} internalProjectName: ${{ parameters.internalProjectName }} publicProjectName: ${{ parameters.publicProjectName }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} diff --git a/eng/common/templates/stages/dotnet/publish.yml b/eng/common/templates/stages/dotnet/publish.yml index 0bfbcfabf..a8a9170a6 100644 --- a/eng/common/templates/stages/dotnet/publish.yml +++ b/eng/common/templates/stages/dotnet/publish.yml @@ -6,7 +6,10 @@ parameters: publicProjectName: null pool: "" isInternalServicingValidation: false + isStandalonePublish: false customPublishInitSteps: [] + sourceBuildPipelineDefinitionId: '' + sourceBuildPipelineRunId: '' stages: - template: /eng/common/templates/stages/publish.yml@self @@ -14,6 +17,9 @@ stages: internalProjectName: ${{ parameters.internalProjectName }} publicProjectName: ${{ parameters.publicProjectName }} isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }} + isStandalonePublish: ${{ parameters.isStandalonePublish }} + sourceBuildPipelineDefinitionId: ${{ parameters.sourceBuildPipelineDefinitionId }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} customPublishInitSteps: - pwsh: | diff --git a/eng/common/templates/stages/publish.yml b/eng/common/templates/stages/publish.yml index 9cb7cd802..e1a3ec9ca 100644 --- a/eng/common/templates/stages/publish.yml +++ b/eng/common/templates/stages/publish.yml @@ -6,20 +6,25 @@ parameters: publicProjectName: null isInternalServicingValidation: false + isStandalonePublish: false pool: vmImage: $(defaultLinuxAmd64PoolImage) + sourceBuildPipelineDefinitionId: '' + sourceBuildPipelineRunId: '' + ################################################################################ # Publish Images ################################################################################ stages: - ${{ if eq(parameters.isInternalServicingValidation, 'false') }}: - stage: Publish - ${{ if and(eq(variables['System.TeamProject'], parameters.internalProjectName), ne(variables['Build.Reason'], 'PullRequest')) }}: - dependsOn: Test - ${{ else }}: - dependsOn: Post_Build + ${{ if not(parameters.isStandalonePublish) }}: + ${{ if and(eq(variables['System.TeamProject'], parameters.internalProjectName), ne(variables['Build.Reason'], 'PullRequest')) }}: + dependsOn: Test + ${{ else }}: + dependsOn: Post_Build condition: " and( not(canceled()), @@ -56,3 +61,5 @@ stages: internalProjectName: ${{ parameters.internalProjectName }} customPublishVariables: ${{ parameters.customPublishVariables }} customInitSteps: ${{ parameters.customPublishInitSteps }} + sourceBuildPipelineDefinitionId: ${{ parameters.sourceBuildPipelineDefinitionId }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} diff --git a/eng/common/templates/stages/setup-service-connections.yml b/eng/common/templates/stages/setup-service-connections.yml new file mode 100644 index 000000000..7d1251258 --- /dev/null +++ b/eng/common/templates/stages/setup-service-connections.yml @@ -0,0 +1,34 @@ +# This stage exists to tell Azure DevOps about all of the service connections +# that will be used in the pipeline. A service connection will not work unless +# it is declared in this stage's parameters, even if your pipeline has already +# been granted access to the service connection. This stage also does not need +# to complete before the service connection is used. +parameters: +- name: pool + type: object +# serviceConnections object shape: +# - name: string +- name: serviceConnections + type: object + default: [] + +stages: + +- stage: SetupServiceConnectionsStage + displayName: Setup service connections + jobs: + + - job: SetupServiceConnectionsJob + displayName: Setup service connections + pool: ${{ parameters.pool }} + steps: + + - ${{ each serviceConnection in parameters.serviceConnections }}: + - task: AzureCLI@2 + displayName: Setup ${{ serviceConnection.name }} + inputs: + azureSubscription: ${{ serviceConnection.name }} + scriptType: pscore + scriptLocation: inlineScript + inlineScript: | + az account show diff --git a/eng/common/templates/steps/annotate-eol-digests.yml b/eng/common/templates/steps/annotate-eol-digests.yml index 3f01cad02..e6306bc57 100644 --- a/eng/common/templates/steps/annotate-eol-digests.yml +++ b/eng/common/templates/steps/annotate-eol-digests.yml @@ -7,10 +7,14 @@ steps: parameters: name: AnnotateEOLImages displayName: Annotate EOL Images - serviceConnection: $(publish.serviceConnectionName) + serviceConnections: + - name: acr + id: $(publish.serviceConnection.id) + tenantId: $(publish.serviceConnection.tenantId) + clientId: $(publish.serviceConnection.clientId) internalProjectName: internal condition: and(succeeded(), eq(variables['publishEolAnnotations'], 'true')) - args: > + args: >- annotateEolDigests ${{ parameters.dataFile }} $(acr.server) @@ -28,9 +32,13 @@ steps: - template: /eng/common/templates/steps/run-imagebuilder.yml@self parameters: displayName: Wait for Annotation Ingestion - serviceConnection: $(marStatus.serviceConnectionName) + serviceConnections: + - name: mar + id: $(marStatus.serviceConnection.id) + tenantId: $(marStatus.serviceConnection.tenantId) + clientId: $(marStatus.serviceConnection.clientId) internalProjectName: internal - condition: and(succeeded(), eq(variables['publishEolAnnotations'], 'true')) - args: > + condition: and(succeeded(), eq(variables['publishEolAnnotations'], 'true'), eq(variables['waitForIngestionEnabled'], 'true')) + args: >- waitForMarAnnotationIngestion $(artifactsPath)/annotation-digests/annotation-digests.txt diff --git a/eng/common/templates/steps/clean-acr-images.yml b/eng/common/templates/steps/clean-acr-images.yml index f02b02251..abfb9fb94 100644 --- a/eng/common/templates/steps/clean-acr-images.yml +++ b/eng/common/templates/steps/clean-acr-images.yml @@ -11,9 +11,13 @@ steps: - template: /eng/common/templates/steps/run-imagebuilder.yml@self parameters: displayName: Clean ACR Images - ${{ parameters.repo }} - serviceConnection: $(clean.serviceConnectionName) + serviceConnections: + - name: acr + id: $(clean.serviceConnection.id) + tenantId: $(clean.serviceConnection.tenantId) + clientId: $(clean.serviceConnection.clientId) internalProjectName: ${{ parameters.internalProjectName }} - args: > + args: >- cleanAcrImages ${{ parameters.repo }} ${{ parameters.subscription }} diff --git a/eng/common/templates/steps/copy-base-images.yml b/eng/common/templates/steps/copy-base-images.yml index e24fc0306..f78b1c5dc 100644 --- a/eng/common/templates/steps/copy-base-images.yml +++ b/eng/common/templates/steps/copy-base-images.yml @@ -3,7 +3,10 @@ parameters: type: object default: server: "" - serviceConnection: "" + serviceConnection: + tenantId: "" + clientId: "" + id: "" subscription: "" resourceGroup: "" - name: repoPrefix @@ -25,13 +28,17 @@ steps: - template: /eng/common/templates/steps/run-imagebuilder.yml@self parameters: displayName: Copy Base Images - serviceConnection: ${{ parameters.acr.serviceConnection }} + serviceConnections: + - name: "acr" + tenantId: ${{ parameters.acr.serviceConnection.tenantId }} + clientId: ${{ parameters.acr.serviceConnection.clientId }} + id: ${{ parameters.acr.serviceConnection.id }} continueOnError: ${{ parameters.continueOnError }} internalProjectName: 'internal' # Use environment variable to reference $(dryRunArg). Since $(dryRunArg) might be undefined, # PowerShell will treat the Azure Pipelines variable macro syntax as a command and throw an # error - args: > + args: >- copyBaseImages '${{ parameters.acr.subscription }}' '${{ parameters.acr.resourceGroup }}' diff --git a/eng/common/templates/steps/download-build-artifact.yml b/eng/common/templates/steps/download-build-artifact.yml index ed68ef5b3..965f49320 100644 --- a/eng/common/templates/steps/download-build-artifact.yml +++ b/eng/common/templates/steps/download-build-artifact.yml @@ -1,17 +1,38 @@ parameters: + # Destination directory on the pipeline agent's filesystem, relative or absolute. targetPath: "" + # The build/pipeline artifact to download. If the value is left empty, + # the task downloads all artifacts associated with the pipeline run. artifactName: "" + # AKA pipeline/definition - optional. + # If this is left empty, use the current pipeline's definition ID. + # You can get this from the URL of the pipeline's overview page on Azure DevOps. + # Example: https://dev.azure.com/$org/$project/_build?definitionId=373 + pipelineDefinitionId: "" + # AKA runId/buildId/pipelineId - optional. + # The identifier of the pipeline run from which to download the artifacts. + # If this is left empty, then always download from the current pipeline + # You can get this from the URL of the specific pipeline run, for example: + # https://dev.azure.com/$org/$project/_build/results?buildId=2709155&view=results + pipelineRunId: "" condition: true continueOnError: false steps: -- task: DownloadPipelineArtifact@1 +# https://learn.microsoft.com/azure/devops/pipelines/tasks/reference/download-pipeline-artifact-v2 +- task: DownloadPipelineArtifact@2 inputs: - buildType: specific - project: $(System.TeamProject) - pipline: $(System.DefinitionId) - buildVersionToDownload: specific - buildId: $(sourceBuildId) + ${{ if ne(parameters.pipelineRunId, '') }}: + buildType: specific + project: $(System.TeamProject) + ${{ if ne(parameters.pipelineDefinitionId, '') }}: + definition: ${{ parameters.pipelineDefinitionId }} + ${{ else }}: + definition: $(System.DefinitionId) + buildId: ${{ parameters.pipelineRunId }} + buildVersionToDownload: specific + ${{ else }}: + buildType: current targetPath: ${{ parameters.targetPath }} artifactName: ${{ parameters.artifactName }} displayName: Download Build Artifact(s) diff --git a/eng/common/templates/steps/init-common.yml b/eng/common/templates/steps/init-common.yml index ed73a179e..c22ad449c 100644 --- a/eng/common/templates/steps/init-common.yml +++ b/eng/common/templates/steps/init-common.yml @@ -3,7 +3,7 @@ parameters: steps: - powershell: | - $sourceBranch=$Env:BUILD_SOURCEBRANCH -replace "refs/heads/","" -replace "refs/tags/","" -replace "refs/pull/","" + $sourceBranch=$Env:BUILD_SOURCEBRANCH -replace "refs/heads/","" -replace "refs/tags/","" -replace "refs/pull/","" echo "##vso[task.setvariable variable=sourceBranch]$sourceBranch" displayName: Define Source Branch Variable condition: and(succeeded(), ${{ parameters.condition }}) diff --git a/eng/common/templates/steps/init-docker-linux.yml b/eng/common/templates/steps/init-docker-linux.yml index aa74ac002..729546a38 100644 --- a/eng/common/templates/steps/init-docker-linux.yml +++ b/eng/common/templates/steps/init-docker-linux.yml @@ -24,26 +24,27 @@ steps: # Setup Image Builder (Optional) ################################################################################ - ${{ if eq(parameters.setupImageBuilder, 'true') }}: + - script: $(engCommonPath)/pull-image.sh $(imageNames.imageBuilder) displayName: Pull Image Builder condition: and(succeeded(), ${{ parameters.condition }}) - - script: > + + - script: >- docker build -t $(imageNames.imageBuilder.withrepo) --build-arg IMAGE=$(imageNames.imageBuilder) -f $(engCommonPath)/Dockerfile.WithRepo . displayName: Build Image for Image Builder condition: and(succeeded(), ${{ parameters.condition }}) + - task: PowerShell@2 displayName: Define ImageBuilder Command Variables condition: and(succeeded(), ${{ parameters.condition }}) inputs: targetType: 'inline' script: | - $tokenHostPath = '$(Agent.TempDirectory)' - $tokenHostFilePath = "${tokenHostPath}/token" - $tokenContainerPath = "/tmp" - $tokenContainerFilePath = "${tokenContainerPath}/token" + $imageBuilderImageName = "$(imageNames.imageBuilder.withrepo)" + Write-Host "##vso[task.setvariable variable=imageBuilderImageName]$imageBuilderImageName" $dockerRunBaseCmd = @( "docker run --rm" @@ -58,10 +59,10 @@ steps: ) $authedDockerRunArgs = @( - '-e AZURE_TENANT_ID=$env:tenantId' - '-e AZURE_CLIENT_ID=$env:servicePrincipalId' - "-e AZURE_FEDERATED_TOKEN_FILE=$tokenContainerFilePath" - "-v ${tokenHostPath}:${tokenContainerPath}" + '-e' + 'SYSTEM_ACCESSTOKEN=$env:SYSTEM_ACCESSTOKEN' + '-e' + 'SYSTEM_OIDCREQUESTURI=$env:SYSTEM_OIDCREQUESTURI' ) $dockerRunCmd = $dockerRunBaseCmd + $dockerRunArgs @@ -72,7 +73,6 @@ steps: Write-Host "##vso[task.setvariable variable=runImageBuilderCmd]$runImageBuilderCmd" Write-Host "##vso[task.setvariable variable=runAuthedImageBuilderCmd]$runAuthedImageBuilderCmd" - Write-Host "##vso[task.setvariable variable=tokenHostFilePath]$tokenHostFilePath" ################################################################################ # Setup Test Runner (Optional) diff --git a/eng/common/templates/steps/init-docker-windows.yml b/eng/common/templates/steps/init-docker-windows.yml index a6fbaead6..ae867f9e8 100644 --- a/eng/common/templates/steps/init-docker-windows.yml +++ b/eng/common/templates/steps/init-docker-windows.yml @@ -43,20 +43,6 @@ steps: inputs: targetType: 'inline' script: | - $tokenHostPath = '$(Agent.TempDirectory)' - $tokenHostFilePath = "$tokenHostPath\token" - $runImageBuilderCmd = "$(Build.BinariesDirectory)\.Microsoft.DotNet.ImageBuilder\Microsoft.DotNet.ImageBuilder.exe" - - $authedImageBuilderCmds = @( - '$env:AZURE_TENANT_ID = $env:tenantId' - '$env:AZURE_CLIENT_ID = $env:servicePrincipalId' - '$env:AZURE_FEDERATED_TOKEN_FILE = ' + "'" + "$tokenHostFilePath" + "'" - $runImageBuilderCmd - ) - - $runAuthedImageBuilderCmd = $($authedImageBuilderCmds -join "; ") - Write-Host "##vso[task.setvariable variable=runImageBuilderCmd]$runImageBuilderCmd" - Write-Host "##vso[task.setvariable variable=runAuthedImageBuilderCmd]$runAuthedImageBuilderCmd" - Write-Host "##vso[task.setvariable variable=tokenHostFilePath]$tokenHostFilePath" + Write-Host "##vso[task.setvariable variable=runAuthedImageBuilderCmd]$runImageBuilderCmd" diff --git a/eng/common/templates/steps/publish-readmes.yml b/eng/common/templates/steps/publish-readmes.yml index 9f5e0ffb9..4f7f77dd0 100644 --- a/eng/common/templates/steps/publish-readmes.yml +++ b/eng/common/templates/steps/publish-readmes.yml @@ -9,7 +9,7 @@ steps: --registry-override '$(acr.server)' '$(mcrDocsRepoInfo.userName)' '$(mcrDocsRepoInfo.email)' - '$(mcrDocsRepoInfo.accessToken)' + $(mcrDocsRepoInfo.authArgs) '$(publicGitRepoUri)' ${{ parameters.dryRunArg }} $(manifestVariables) diff --git a/eng/common/templates/steps/run-imagebuilder.yml b/eng/common/templates/steps/run-imagebuilder.yml index ae20464ce..3613d809b 100644 --- a/eng/common/templates/steps/run-imagebuilder.yml +++ b/eng/common/templates/steps/run-imagebuilder.yml @@ -5,9 +5,18 @@ parameters: - name: displayName type: string default: "Run ImageBuilder" -- name: serviceConnection - type: string - default: "" +- name: serviceConnections + type: object + default: + # name: the name of the service connection argument that will be passed to the ImageBuilder command. + # For example, if the argument is --acr-service-connection, the name would be "acr". + - name: "" + # The service connection's ID (GUID). + id: "" + # The client ID of the Managed Idendity backing the service connection (GUID). + clientId: "" + # The ID of the tenant that the Managed Identity is in (GUID). + tenantId: "" - name: internalProjectName type: string default: null @@ -25,21 +34,36 @@ parameters: default: "linux" steps: -- ${{ if and(eq(variables['System.TeamProject'], parameters.internalProjectName), ne(variables['Build.Reason'], 'PullRequest'), ne(parameters.serviceConnection, '')) }}: - - template: /eng/common/templates/steps/run-pwsh-with-auth.yml@self - parameters: - ${{ if ne(parameters.name, '') }}: - name: ${{ parameters.name }} - displayName: ${{ parameters.displayName }} - serviceConnection: ${{ parameters.serviceConnection }} - continueOnError: ${{ parameters.continueOnError }} - dockerClientOS: ${{ parameters.dockerClientOS }} - condition: ${{ parameters.condition }} - command: > - $env:idToken | Out-File -FilePath $(tokenHostFilePath); - $(runAuthedImageBuilderCmd) ${{ parameters.args }}; - Remove-Item -Path $(tokenHostFilePath) -Force +- ${{ if and(eq(variables['System.TeamProject'], parameters.internalProjectName), ne(variables['Build.Reason'], 'PullRequest')) }}: + + - task: PowerShell@2 + ${{ if ne(parameters.name, '') }}: + name: ${{ parameters.name }} + displayName: ${{ parameters.displayName }} + continueOnError: ${{ parameters.continueOnError }} + condition: ${{ parameters.condition }} + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + SYSTEM_OIDCREQUESTURI: $(System.OidcRequestUri) + inputs: + targetType: 'inline' + script: | + $serviceConnections = '${{ convertToJson(parameters.serviceConnections) }}' + + Write-Host "Service connections:" + Write-Host "${serviceConnections}" + + $serviceConnectionsJson = $serviceConnections | ConvertFrom-Json + $serviceConnectionsArgs = @() + foreach ($connection in $serviceConnectionsJson) { + $serviceConnectionsArgs += "--$($connection.name)-service-connection" + $serviceConnectionsArgs += "$($connection.tenantId):$($connection.clientId):$($connection.id)" + } + + $(runAuthedImageBuilderCmd) ${{ parameters.args }} @serviceConnectionsArgs + - ${{ else }}: + - task: PowerShell@2 ${{ if ne(parameters.name, '') }}: name: ${{ parameters.name }} @@ -48,5 +72,5 @@ steps: condition: ${{ parameters.condition }} inputs: targetType: 'inline' - script: > + script: >- $(runImageBuilderCmd) ${{ parameters.args }} diff --git a/eng/common/templates/steps/test-images-linux-client.yml b/eng/common/templates/steps/test-images-linux-client.yml index 6a747016c..1af54d0c1 100644 --- a/eng/common/templates/steps/test-images-linux-client.yml +++ b/eng/common/templates/steps/test-images-linux-client.yml @@ -3,6 +3,7 @@ parameters: internalProjectName: null condition: true customInitSteps: [] + sourceBuildPipelineRunId: "" steps: - template: /eng/common/templates/steps/init-docker-linux.yml@self @@ -47,7 +48,7 @@ steps: displayName: Docker login serviceConnection: $(test.serviceConnectionName) condition: and(succeeded(), ${{ parameters.condition }}) - command: > + command: >- $azLoginArgs = '--service-principal --tenant $env:AZURE_TENANT_ID -u $env:AZURE_CLIENT_ID --federated-token $env:AZURE_FEDERATED_TOKEN'; docker exec -e AZURE_TENANT_ID=$env:tenantId -e AZURE_CLIENT_ID=$env:servicePrincipalId -e AZURE_FEDERATED_TOKEN=$env:idToken $(testRunner.container) pwsh -File $(engCommonRelativePath)/Invoke-WithRetry.ps1 @@ -58,6 +59,7 @@ steps: targetPath: $(Build.ArtifactStagingDirectory) artifactName: image-info condition: ${{ parameters.condition }} + pipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - template: /eng/common/templates/steps/parse-test-arg-arrays.yml@self - powershell: > $(test.init); diff --git a/eng/common/templates/steps/test-images-windows-client.yml b/eng/common/templates/steps/test-images-windows-client.yml index 04b099d52..d53a42b66 100644 --- a/eng/common/templates/steps/test-images-windows-client.yml +++ b/eng/common/templates/steps/test-images-windows-client.yml @@ -2,6 +2,7 @@ parameters: internalProjectName: null condition: true customInitSteps: [] + sourceBuildPipelineRunId: "" steps: - ${{ if and(eq(variables['System.TeamProject'], parameters.internalProjectName), ne(variables['Build.Reason'], 'PullRequest')) }}: @@ -16,7 +17,7 @@ steps: serviceConnection: $(test.serviceConnectionName) dockerClientOS: windows condition: and(succeeded(), ${{ parameters.condition }}) - command: > + command: >- az login --service-principal --tenant $env:tenantId -u $env:servicePrincipalId --federated-token $env:idToken; $accessToken = $(az acr login -n $(acr-staging.server) --expose-token --query accessToken --output tsv); docker login $(acr-staging.server) -u 00000000-0000-0000-0000-000000000000 -p $accessToken @@ -37,6 +38,7 @@ steps: targetPath: $(Build.ArtifactStagingDirectory) artifactName: image-info condition: ${{ parameters.condition }} + pipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - template: /eng/common/templates/steps/parse-test-arg-arrays.yml@self - powershell: > $(test.init); diff --git a/eng/common/templates/steps/wait-for-mcr-doc-ingestion.yml b/eng/common/templates/steps/wait-for-mcr-doc-ingestion.yml index a0be54d2f..05112cc5b 100644 --- a/eng/common/templates/steps/wait-for-mcr-doc-ingestion.yml +++ b/eng/common/templates/steps/wait-for-mcr-doc-ingestion.yml @@ -8,9 +8,13 @@ steps: parameters: displayName: Wait for MCR Doc Ingestion condition: and(${{ parameters.condition }}, eq(variables['waitForIngestionEnabled'], 'true')) - serviceConnection: $(marStatus.serviceConnectionName) + serviceConnections: + - name: mar + id: $(marStatus.serviceConnection.id) + tenantId: $(marStatus.serviceConnection.tenantId) + clientId: $(marStatus.serviceConnection.clientId) internalProjectName: 'internal' - args: > + args: >- waitForMcrDocIngestion '${{ parameters.commitDigest }}' --timeout '$(mcrDocIngestionTimeout)' diff --git a/eng/common/templates/steps/wait-for-mcr-image-ingestion.yml b/eng/common/templates/steps/wait-for-mcr-image-ingestion.yml index 83263c7f2..a3c84ddfe 100644 --- a/eng/common/templates/steps/wait-for-mcr-image-ingestion.yml +++ b/eng/common/templates/steps/wait-for-mcr-image-ingestion.yml @@ -9,9 +9,13 @@ steps: parameters: displayName: Wait for Image Ingestion condition: and(${{ parameters.condition }}, eq(variables['waitForIngestionEnabled'], 'true')) - serviceConnection: $(marStatus.serviceConnectionName) + serviceConnections: + - name: mar + id: $(marStatus.serviceConnection.id) + tenantId: $(marStatus.serviceConnection.tenantId) + clientId: $(marStatus.serviceConnection.clientId) internalProjectName: 'internal' - args: > + args: >- waitForMcrImageIngestion '${{ parameters.imageInfoPath }}' --manifest '$(manifest)' diff --git a/eng/common/templates/task-prefix-decorator.yml b/eng/common/templates/task-prefix-decorator.yml new file mode 100644 index 000000000..4f1a86ce6 --- /dev/null +++ b/eng/common/templates/task-prefix-decorator.yml @@ -0,0 +1,63 @@ +# This Azure Pipelines template is adds a prefix to the display name of each +# task passed through the `stages` parameter. When used in conjunction with +# an "extends" template which injects a lot of tasks into the pipeline, the +# added prefix helps to identify which tasks were passed through this template +# and which tasks were injected by the `baseTemplate`. +# +# This template assumes that `baseTemplate` uses the `stages` parameter. If it +# doesn't, this template likely won't work as expected. + +parameters: +# The pipeline will behave as if it were originally extended from this template, +# except with updated task display names. +- name: baseTemplate + type: string + default: "" + +# These parameters are passed directly to `baseTemplate` +- name: templateParameters + type: object + default: null + +# These stages will be modified and passed to the `baseTemplate` as the +# `stages` parameter. The +- name: stages + type: stageList + default: [] + +# This prefix will be added to the display name of each task. +- name: taskPrefix + type: string + default: "🟪" + + +extends: + template: ${{ parameters.baseTemplate }} + parameters: + ${{ insert }}: ${{ parameters.templateParameters }} + stages: + - ${{ each stage in parameters.stages }}: + - stage: ${{ stage.stage }} + ${{ each property in stage }}: + ${{ if notIn(property.key, 'stage', 'jobs') }}: + ${{ property.key }} : ${{ property.value }} + jobs: + - ${{ each job in stage.jobs }}: + - job: ${{ job.job }} + ${{ each property in job }}: + ${{ if notIn(property.key, 'job', 'steps') }}: + ${{ property.key }} : ${{ property.value }} + steps: + - ${{ each step in job.steps }}: + # Special case for Azure Pipelines checkout task: + # https://learn.microsoft.com/azure/devops/extend/develop/pipeline-decorator-context?view=azure-devops#task-names-and-guids + # The checkout task does not have a name - it is special and built directly into the agent. + # Avoid modifying the checkout task, or else it will show up in the UI as a task with no name. + - ${{ if contains(step.task, '6d15af64-176c-496d-b583-fd2ae21d4df4') }}: + - ${{ step }} + - ${{ else }}: + - task: ${{ step.task }} + ${{ each property in step }}: + ${{ if notIn(property.key, 'task', 'displayName') }}: + ${{ property.key }} : ${{ property.value }} + displayName: ${{ parameters.taskPrefix }} ${{ step.displayName }} diff --git a/eng/common/templates/variables/common.yml b/eng/common/templates/variables/common.yml index 38a62317a..65d4ce9d8 100644 --- a/eng/common/templates/variables/common.yml +++ b/eng/common/templates/variables/common.yml @@ -1,8 +1,24 @@ +parameters: +# sourceBuildPipelineRunId should be overridden when skipping a build to run +# tests or publish images that were produced in a different pipeline run. +# Defaults to $(Build.BuildId) which refers to the current pipeline run. +- name: sourceBuildPipelineRunId + type: string + default: "" + variables: - template: /eng/common/templates/variables/docker-images.yml@self - template: /eng/common/templates/variables/common-paths.yml@self -- name: stagingRepoPrefix - value: build-staging/$(sourceBuildId)/ + +# stagingRepoPrefix defines where images will be pushed to in the staging repo, +# which is defined in the $(acr-staging.server) variable. +- ${{ if ne(parameters.sourceBuildPipelineRunId, '') }}: + - name: stagingRepoPrefix + value: build-staging/${{ parameters.sourceBuildPipelineRunId }}/ +- ${{ else }}: + - name: stagingRepoPrefix + value: build-staging/$(Build.BuildId)/ + - name: publishReadme value: true - name: publishImageInfo diff --git a/eng/common/templates/variables/docker-images.yml b/eng/common/templates/variables/docker-images.yml index 91cbd61b7..8740ceacd 100644 --- a/eng/common/templates/variables/docker-images.yml +++ b/eng/common/templates/variables/docker-images.yml @@ -1,5 +1,5 @@ variables: - imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2662183 + imageNames.imageBuilderName: mcr.microsoft.com/dotnet-buildtools/image-builder:2746495 imageNames.imageBuilder: $(imageNames.imageBuilderName) imageNames.imageBuilder.withrepo: imagebuilder-withrepo:$(Build.BuildId)-$(System.JobId) imageNames.testRunner: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux3.0-docker-testrunner diff --git a/eng/common/templates/variables/dotnet/build-test-publish.yml b/eng/common/templates/variables/dotnet/build-test-publish.yml index ce88f4f2e..49e3a9f21 100644 --- a/eng/common/templates/variables/dotnet/build-test-publish.yml +++ b/eng/common/templates/variables/dotnet/build-test-publish.yml @@ -1,7 +1,16 @@ # Common variables for building/testing/publishing in the .NET team's pipelines +parameters: +# sourceBuildPipelineRunId should be overridden when skipping a build to run +# tests or publish images that were produced in a different pipeline run. +# Defaults to $(Build.BuildId) which refers to the current pipeline run. +- name: sourceBuildPipelineRunId + type: string + default: "" variables: - template: /eng/common/templates/variables/dotnet/common.yml@self + parameters: + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - name: commonVersionsImageInfoPath value: build-info/docker @@ -14,12 +23,15 @@ variables: - name: officialRepoPrefixes value: public/,internal/private/,unlisted/ -- name: mcrDocsRepoInfo.accessToken - value: $(BotAccount-dotnet-docker-bot-PAT) +- name: mcrDocsRepoInfo.authArgs + value: >- + --gh-private-key '$(GitHubApp-NET-Docker-MAR-Docs-Updater-PrivateKey)' + --gh-app-client-id '$(gitHubApp.marDocsUpdater.clientId)' + --gh-app-installation-id '$(gitHubApp.marDocsUpdater.microsoft.installationId)' - name: mcrDocsRepoInfo.userName - value: $(dotnetDockerBot.userName) + value: $(gitHubApp.marDocsUpdater.userName) - name: mcrDocsRepoInfo.email - value: $(dotnetDockerBot.email) + value: $(gitHubApp.marDocsUpdater.email) - name: publishNotificationsEnabled value: true @@ -27,8 +39,8 @@ variables: value: dotnet - name: gitHubNotificationsRepoInfo.repo value: dotnet-docker-internal -- name: gitHubNotificationsRepoInfo.accessToken - value: $(BotAccount-dotnet-docker-bot-PAT) +- name: gitHubNotificationsRepoInfo.authArgs + value: --gh-token '$(BotAccount-dotnet-docker-bot-PAT)' - name: gitHubVersionsRepoInfo.org value: dotnet @@ -38,8 +50,8 @@ variables: value: main - name: gitHubVersionsRepoInfo.path value: ${{ variables.commonVersionsImageInfoPath }} -- name: gitHubVersionsRepoInfo.accessToken - value: $(BotAccount-dotnet-docker-bot-PAT) +- name: gitHubVersionsRepoInfo.authArgs + value: --gh-token '$(BotAccount-dotnet-docker-bot-PAT)' - name: gitHubVersionsRepoInfo.userName value: $(dotnetDockerBot.userName) - name: gitHubVersionsRepoInfo.email diff --git a/eng/common/templates/variables/dotnet/common.yml b/eng/common/templates/variables/dotnet/common.yml index f9d52677b..895dbd469 100644 --- a/eng/common/templates/variables/dotnet/common.yml +++ b/eng/common/templates/variables/dotnet/common.yml @@ -1,5 +1,16 @@ +parameters: +# sourceBuildPipelineRunId should be overridden when skipping a build to run +# tests or publish images that were produced in a different pipeline run. +# Defaults to $(Build.BuildId) which refers to the current pipeline run. +- name: sourceBuildPipelineRunId + type: string + default: "" + variables: - template: /eng/common/templates/variables/common.yml@self + parameters: + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} + - name: publicProjectName value: public - name: internalProjectName diff --git a/eng/mcr-tags-metadata-templates/aspnet-tags.yml b/eng/mcr-tags-metadata-templates/aspnet-tags.yml index afe087fc5..1dd9fc0ee 100644 --- a/eng/mcr-tags-metadata-templates/aspnet-tags.yml +++ b/eng/mcr-tags-metadata-templates/aspnet-tags.yml @@ -1,6 +1,5 @@ $(McrTagsYmlRepo:aspnet) $(McrTagsYmlTagGroup:4.8.1-windowsservercore-ltsc2025) -$(McrTagsYmlTagGroup:3.5-windowsservercore-ltsc2025) $(McrTagsYmlTagGroup:4.8.1-windowsservercore-ltsc2022) $(McrTagsYmlTagGroup:4.8-windowsservercore-ltsc2022) $(McrTagsYmlTagGroup:3.5-windowsservercore-ltsc2022) diff --git a/eng/mcr-tags-metadata-templates/runtime-tags.yml b/eng/mcr-tags-metadata-templates/runtime-tags.yml index 8772e706b..254e4d935 100644 --- a/eng/mcr-tags-metadata-templates/runtime-tags.yml +++ b/eng/mcr-tags-metadata-templates/runtime-tags.yml @@ -1,6 +1,5 @@ $(McrTagsYmlRepo:runtime) $(McrTagsYmlTagGroup:4.8.1-windowsservercore-ltsc2025) -$(McrTagsYmlTagGroup:3.5-windowsservercore-ltsc2025) $(McrTagsYmlTagGroup:4.8.1-windowsservercore-ltsc2022) $(McrTagsYmlTagGroup:4.8-windowsservercore-ltsc2022) $(McrTagsYmlTagGroup:3.5-windowsservercore-ltsc2022) diff --git a/eng/mcr-tags-metadata-templates/sdk-tags.yml b/eng/mcr-tags-metadata-templates/sdk-tags.yml index fa61ae216..7dac44bfb 100644 --- a/eng/mcr-tags-metadata-templates/sdk-tags.yml +++ b/eng/mcr-tags-metadata-templates/sdk-tags.yml @@ -1,6 +1,5 @@ $(McrTagsYmlRepo:sdk) $(McrTagsYmlTagGroup:4.8.1-windowsservercore-ltsc2025) -$(McrTagsYmlTagGroup:3.5-windowsservercore-ltsc2025) $(McrTagsYmlTagGroup:4.8.1-windowsservercore-ltsc2022) $(McrTagsYmlTagGroup:4.8-windowsservercore-ltsc2022) $(McrTagsYmlTagGroup:3.5-windowsservercore-ltsc2022) diff --git a/eng/pipelines/dotnet-framework-samples.yml b/eng/pipelines/dotnet-framework-samples.yml index 2279c0d98..49d400f6c 100644 --- a/eng/pipelines/dotnet-framework-samples.yml +++ b/eng/pipelines/dotnet-framework-samples.yml @@ -8,8 +8,20 @@ resources: endpoint: dotnet name: dotnet/versions +parameters: +- name: sourceBuildPipelineRunId + displayName: > + Source build pipeline run ID. This refers to runs of *this pipeline*. + Override this parameter in combination with disabling the `Build` stage to + test or publish images that were built in a different pipeline run. When + building new images, leave this value alone. + type: string + default: $(Build.BuildId) + variables: - template: /eng/pipelines/variables/common.yml@self + parameters: + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - name: manifest value: manifest.samples.json - name: imageInfoVariant @@ -18,6 +30,12 @@ variables: extends: template: /eng/common/templates/1es-official.yml@self parameters: + serviceConnections: + - name: $(internal-mirror.serviceConnectionName) + - name: $(build.serviceConnectionName) + - name: $(publish.serviceConnectionName) + - name: $(kusto.serviceConnectionName) + - name: $(marStatus.serviceConnectionName) stages: - template: /eng/common/templates/stages/dotnet/build-test-publish-repo.yml@self parameters: diff --git a/eng/pipelines/dotnet-framework.yml b/eng/pipelines/dotnet-framework.yml index 55f9c6d05..23b6a2c0c 100644 --- a/eng/pipelines/dotnet-framework.yml +++ b/eng/pipelines/dotnet-framework.yml @@ -8,8 +8,20 @@ resources: endpoint: dotnet name: dotnet/versions +parameters: +- name: sourceBuildPipelineRunId + displayName: > + Source build pipeline run ID. This refers to runs of *this pipeline*. + Override this parameter in combination with disabling the `Build` stage to + test or publish images that were built in a different pipeline run. When + building new images, leave this value alone. + type: string + default: $(Build.BuildId) + variables: - template: /eng/pipelines/variables/common.yml@self + parameters: + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - name: manifest value: manifest.json - name: mcrImageIngestionTimeout @@ -18,10 +30,17 @@ variables: extends: template: /eng/common/templates/1es-official.yml@self parameters: + serviceConnections: + - name: $(internal-mirror.serviceConnectionName) + - name: $(build.serviceConnectionName) + - name: $(publish.serviceConnectionName) + - name: $(kusto.serviceConnectionName) + - name: $(marStatus.serviceConnectionName) stages: - template: /eng/common/templates/stages/dotnet/build-test-publish-repo.yml@self parameters: internalProjectName: ${{ variables.internalProjectName }} publicProjectName: ${{ variables.publicProjectName }} + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} windowsAmdBuildJobTimeout: 240 windowsAmdTestJobTimeout: 90 diff --git a/eng/pipelines/variables/common.yml b/eng/pipelines/variables/common.yml index 6f812596b..743d64e2a 100644 --- a/eng/pipelines/variables/common.yml +++ b/eng/pipelines/variables/common.yml @@ -1,5 +1,14 @@ +parameters: +# sourceBuildPipelineRunId should be overridden when skipping a build to run +# tests or publish images that were produced in a different pipeline run. +- name: sourceBuildPipelineRunId + type: string + default: "" + variables: - template: /eng/common/templates/variables/dotnet/build-test-publish.yml@self + parameters: + sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }} - name: publicGitRepoUri value: https://github.com/microsoft/dotnet-framework-docker - name: productVersionComponents diff --git a/eng/update-dependencies/CustomFileRegexUpdater.cs b/eng/update-dependencies/CustomFileRegexUpdater.cs deleted file mode 100644 index ef729f104..000000000 --- a/eng/update-dependencies/CustomFileRegexUpdater.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Collections.Generic; -using System.Linq; -using Microsoft.DotNet.VersionTools.Dependencies; - -namespace Microsoft.DotNet.Framework.UpdateDependencies -{ - public class CustomFileRegexUpdater : FileRegexUpdater - { - private readonly string replacementValue; - private readonly string buildInfoName; - - public CustomFileRegexUpdater(string replacementValue, string buildInfoName) - { - this.replacementValue = replacementValue; - this.buildInfoName = buildInfoName; - } - - protected override string TryGetDesiredValue(IEnumerable dependencyInfos, out IEnumerable usedDependencyInfos) - { - usedDependencyInfos = dependencyInfos.Where(info => info.SimpleName == this.buildInfoName); - - return this.replacementValue; - } - } -} diff --git a/eng/update-dependencies/DependencyUpdater.cs b/eng/update-dependencies/DependencyUpdater.cs deleted file mode 100644 index 29807acc9..000000000 --- a/eng/update-dependencies/DependencyUpdater.cs +++ /dev/null @@ -1,189 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Microsoft.DotNet.VersionTools; -using Microsoft.DotNet.VersionTools.Automation; -using Microsoft.DotNet.VersionTools.Dependencies; -using Microsoft.DotNet.VersionTools.Dependencies.BuildOutput; - -namespace Microsoft.DotNet.Framework.UpdateDependencies -{ - public class DependencyUpdater - { - private readonly Options options; - private static readonly Lazy> dockerfiles; - - public const string RuntimeImageVariant = "runtime"; - public const string SdkImageVariant = "sdk"; - public const string AspnetImageVariant = "aspnet"; - public const string WcfImageVariant = "wcf"; - - public DependencyUpdater(Options options) - { - this.options = options; - } - - static DependencyUpdater() - { - dockerfiles = new Lazy>(() => - Directory.GetFiles( - Path.Combine(Program.RepoRoot, "src"), - "Dockerfile", - SearchOption.AllDirectories) - .Select(file => new DockerfileInfo(file)) - .ToArray()); - } - - public async Task ExecuteAsync() - { - IEnumerable dependencyInfos = new IDependencyInfo[] - { - CreateBuildInfo(RuntimeImageVariant, - this.options.DateStampRuntime?? this.options.DateStampAll ?? String.Empty), - CreateBuildInfo(SdkImageVariant, - this.options.DateStampSdk ?? this.options.DateStampAll ?? String.Empty), - CreateBuildInfo(AspnetImageVariant, - this.options.DateStampAspnet ?? this.options.DateStampAll ?? String.Empty), - CreateBuildInfo(WcfImageVariant, - this.options.DateStampWcf ?? this.options.DateStampAll ?? String.Empty), - }; - - DependencyUpdateResults updateResults = UpdateFiles(dependencyInfos); - if (updateResults.ChangesDetected()) - { - if (this.options.UpdateOnly) - { - Trace.TraceInformation($"Changes made but no GitHub credentials specified, skipping PR creation"); - } - else - { - await CreatePullRequestAsync(dependencyInfos); - } - } - } - - private async Task CreatePullRequestAsync(IEnumerable buildInfos) - { - GitHubAuth gitHubAuth = new GitHubAuth(this.options.GitHubPassword, this.options.GitHubUser, this.options.GitHubEmail); - PullRequestCreator prCreator = new PullRequestCreator(gitHubAuth, this.options.GitHubUser); - PullRequestOptions prOptions = new PullRequestOptions() - { - BranchNamingStrategy = new SingleBranchNamingStrategy($"UpdateDependencies-{this.options.GitHubUpstreamBranch}") - }; - - string commitMessage = $"[{this.options.GitHubUpstreamBranch}] Update image dependencies"; - - await prCreator.CreateOrUpdateAsync( - commitMessage, - commitMessage, - string.Empty, - new GitHubBranch(this.options.GitHubUpstreamBranch, new GitHubProject(this.options.GitHubProject, this.options.GitHubUpstreamOwner)), - new GitHubProject(this.options.GitHubProject, gitHubAuth.User), - prOptions); - } - - private static BuildDependencyInfo CreateBuildInfo(string name, string version) - { - return new BuildDependencyInfo( - new BuildInfo - { - Name = name, - LatestPackages = new Dictionary { }, - LatestReleaseVersion = version - }, - false, - Enumerable.Empty()); - } - - private DependencyUpdateResults UpdateFiles(IEnumerable buildInfos) - { - List updaters = new List(); - - updaters.AddRange(CreateManifestUpdaters()); - updaters.Add(ScriptRunnerUpdater.GetDockerfileUpdater(Program.RepoRoot)); - updaters.Add(ScriptRunnerUpdater.GetReadMeUpdater(Program.RepoRoot)); - - return DependencyUpdateUtils.Update(updaters, buildInfos); - } - - private IEnumerable CreateManifestUpdaters() - { - const string RuntimePrefix = "Runtime"; - const string SdkPrefix = "Sdk"; - const string AspnetPrefix = "Aspnet"; - const string WcfPrefix = "Wcf"; - - if (this.options.DateStampAll != null) - { - yield return CreateManifestUpdater(RuntimePrefix, RuntimeImageVariant); - yield return CreateManifestUpdater(SdkPrefix, SdkImageVariant); - yield return CreateManifestUpdater(AspnetPrefix, AspnetImageVariant); - yield return CreateManifestUpdater(WcfPrefix, WcfImageVariant); - } - else - { - if (this.options.DateStampRuntime != null) - { - yield return CreateManifestUpdater(RuntimePrefix, RuntimeImageVariant); - } - - if (this.options.DateStampSdk != null) - { - yield return CreateManifestUpdater(SdkPrefix, SdkImageVariant); - } - - if (this.options.DateStampAspnet != null) - { - yield return CreateManifestUpdater(AspnetPrefix, AspnetImageVariant); - } - - if (this.options.DateStampWcf != null) - { - yield return CreateManifestUpdater(WcfPrefix, WcfImageVariant); - } - } - } - - private static IDependencyUpdater CreateManifestUpdater(string dateStampVariablePrefix, string buildInfoName) - { - const string TagDateStampGroupName = "tagDateStampValue"; - - return new FileRegexReleaseUpdater - { - Path = Path.Combine(Program.RepoRoot, "manifest.datestamps.json"), - BuildInfoName = buildInfoName, - Regex = new Regex($"\"{dateStampVariablePrefix}ReleaseDateStamp\": \"(?<{TagDateStampGroupName}>\\d{{8}})\""), - VersionGroupName = TagDateStampGroupName - }; - } - - private class DockerfileInfo - { - public DockerfileInfo(string path) - { - this.Path = path; - - string[] pathParts = path.Substring(Program.RepoRoot.Length + 1) - .Replace(@"\", "/") - .Split("/"); - - this.FrameworkVersion = pathParts[2]; - this.ImageVariant = pathParts[1]; - this.OsVersion = pathParts[3]; - } - - public string Path { get; } - public string FrameworkVersion { get; } - public string OsVersion { get; } - public string ImageVariant { get; } - } - } -} diff --git a/eng/update-dependencies/IVariableContext.cs b/eng/update-dependencies/IVariableContext.cs new file mode 100644 index 000000000..93777b741 --- /dev/null +++ b/eng/update-dependencies/IVariableContext.cs @@ -0,0 +1,31 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.DotNet.Framework.UpdateDependencies; + +/// +/// Provides access to a collection of named variables that can be retrieved +/// and modified. Variables support recursive resolution, allowing one variable +/// to reference another using the $(variableName) syntax. +/// +internal interface IVariableContext +{ + /// + /// Retrieves or updates a variable by name. When retrieving, any embedded + /// variable references are resolved recursively. When setting, the + /// underlying content is updated to reflect the change. + /// + /// + /// The name of the variable to access. + /// + /// + /// The resolved value of the variable, or an empty string if not found. + /// + string this[string key] { get; set; } + + /// + /// Enumerates all available variable names in this context. + /// + IEnumerable AllVariables { get; } +} diff --git a/eng/update-dependencies/IVariableUpdater.cs b/eng/update-dependencies/IVariableUpdater.cs new file mode 100644 index 000000000..7d521fbaf --- /dev/null +++ b/eng/update-dependencies/IVariableUpdater.cs @@ -0,0 +1,40 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.DotNet.Framework.UpdateDependencies; + +internal interface IVariableUpdater +{ + /// + /// Determines whether a variable should be updated based on its name. + /// + /// + /// The name of the variable being checked for update eligibility. + /// + /// + /// All variables in the current context, in case the updater needs to + /// reference other variables when determining if an update is needed. + /// + /// + /// True if the variable should be updated. + /// + bool ShouldUpdate(string variableKey, IVariableContext variables); + + /// + /// Computes a new value for a variable based on its current name and the + /// surrounding context. This method is only called for variables whose + /// names match the . + /// + /// + /// The name of the variable being updated. + /// + /// + /// All variables in the current context. Used to reference other variables + /// when generating a new value. + /// + /// + /// The new value that should be assigned to the variable. + /// + Task GetNewValueAsync(string variableKey, IVariableContext variables); +} diff --git a/eng/update-dependencies/LcuVariableUpdater.cs b/eng/update-dependencies/LcuVariableUpdater.cs new file mode 100644 index 000000000..cf0f58891 --- /dev/null +++ b/eng/update-dependencies/LcuVariableUpdater.cs @@ -0,0 +1,144 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Text.RegularExpressions; +using Microsoft.Playwright; + +namespace Microsoft.DotNet.Framework.UpdateDependencies; + +/// +/// Updates Latest Cumulative Update (LCU) download URLs variables by fetching +/// the most recent update information from the Microsoft Update Catalog. +/// +internal sealed partial class LcuVariableUpdater : IVariableUpdater, IAsyncDisposable +{ + private static readonly BrowserNewContextOptions s_newBrowserOptions = new() { Locale = "en-US" }; + + private readonly Lazy> _playwright; + private readonly Lazy> _browser; + + public LcuVariableUpdater() + { + _playwright = new Lazy>(Playwright.Playwright.CreateAsync); + _browser = new( + async () => + { + var playwright = await _playwright.Value; + return await playwright.Chromium.LaunchAsync( + new BrowserTypeLaunchOptions { Headless = true } + ); + } + ); + } + + /// + /// Matches LCU variable names in the format "lcu|{version}|{framework}" + /// where version contains digits and periods. Examples: + /// "lcu|ltsc2019|4.8", "lcu|ltsc2022|3.5". + /// + [GeneratedRegex(@"lcu\|[^|]+\|\d+(\.\d+)+?")] + private partial Regex LcuVariablePattern { get; } + + /// + public bool ShouldUpdate(string variableKey, IVariableContext variables) + { + return LcuVariablePattern.IsMatch(variableKey); + } + + /// + public async Task GetNewValueAsync(string variableKey, IVariableContext variables) + { + // Assuming that variableKey is in a format like "lcu|ltsc2019|4.8", we + // want to look at the variable "kb|ltsc2019|4.8". + string[] variableNameParts = variableKey.Split('|'); + variableNameParts[0] = "kb"; + string kbVariableName = string.Join('|', variableNameParts); + string kbNumber = variables[kbVariableName]; + + // By convention, the second/middle part of the variable name contains + // the Windows version. + var windowsVersion = variableNameParts[1]; + + string kbDownloadUrl = await GetKbDownloadUrlAsync(kbNumber, windowsVersion); + return kbDownloadUrl; + } + + /// + /// Fetches the download URL for a given KB number from the Microsoft + /// Update Catalog. + /// + /// The KB article to get the URL for. + /// + /// The Windows version to get the download URL for, since KB articles can + /// have versions for different Windows versions. It should be a string + /// like "ltsc2016", "ltsc2019", "ltsc2022" etc. + /// + /// KB article download URL + private async Task GetKbDownloadUrlAsync(string kb, string windowsVersion) + { + var browser = await _browser.Value; + var context = await browser.NewContextAsync(s_newBrowserOptions); + var page = await context.NewPageAsync(); + + await page.GotoAsync($"https://catalog.update.microsoft.com/Search.aspx?q={kb}"); + + // Some windows versions require a more precise regex to match the + // correct LCU in on the update catalog page. By convention, the + // Windows version is the second part of the version name. + var tableRowRegex = windowsVersion switch + { + "ltsc2022" => Server2022TableRowRegex, + _ => WindowsServerTableRowRegex + }; + + var downloadPopUpPage = await page.RunAndWaitForPopupAsync( + async () => + { + await page + .GetByRole(AriaRole.Row, new PageGetByRoleOptions() { NameRegex = tableRowRegex, Exact = true }) + .GetByRole(AriaRole.Button) + .ClickAsync(); + } + ); + + var url = await downloadPopUpPage + .GetByRole(AriaRole.Link, s_getDownloadLinkOptions) + .GetAttributeAsync("href"); + + await context.CloseAsync(); + + Console.WriteLine($"{kb} download URL: {url}"); + + return url ?? ""; + } + + public async ValueTask DisposeAsync() + { + if (_browser.IsValueCreated) + { + var browser = await _browser.Value; + await browser.DisposeAsync(); + } + + if (_playwright.IsValueCreated) + { + var playwright = await _playwright.Value; + playwright.Dispose(); + } + } + + private static readonly PageGetByRoleOptions s_getDownloadLinkOptions = new() + { + NameRegex = DownloadLinkRegex, + }; + + [GeneratedRegex(@"^windows.*\.msu$")] + private static partial Regex DownloadLinkRegex { get; } + + [GeneratedRegex(@"server.*x64", RegexOptions.IgnoreCase, "en-US")] + private static partial Regex WindowsServerTableRowRegex { get; } + + [GeneratedRegex(@"server.*21H2.*x64", RegexOptions.IgnoreCase, "en-US")] + private static partial Regex Server2022TableRowRegex { get; } +} diff --git a/eng/update-dependencies/ManifestVariableContext.cs b/eng/update-dependencies/ManifestVariableContext.cs new file mode 100644 index 000000000..74bb8eed9 --- /dev/null +++ b/eng/update-dependencies/ManifestVariableContext.cs @@ -0,0 +1,168 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Text.Json; +using System.Text.Json.Nodes; +using System.Text.RegularExpressions; + +namespace Microsoft.DotNet.Framework.UpdateDependencies; + +/// +/// Manages variables stored in a manifest JSON file. Variables can reference +/// other variables using the $(name) syntax. Changes are automatically +/// synchronized back to the original JSON text data via . +/// +internal partial class ManifestVariableContext : IVariableContext +{ + private static readonly JsonDocumentOptions s_jsonDocumentOptions = new() + { + CommentHandling = JsonCommentHandling.Skip, + AllowTrailingCommas = true, + }; + + private readonly JsonObject _variables; + + /// + /// Initializes a new variable context from manifest JSON content. The JSON + /// must contain a root object with a "variables" property whose value is + /// an object mapping variable names to their string values. + /// + /// + /// Complete JSON content of the manifest file, which will be parsed and + /// modified as variables change. + /// + public ManifestVariableContext(string manifestJsonContent) + { + Content = manifestJsonContent; + + JsonNode manifest = JsonNode.Parse(Content, documentOptions: s_jsonDocumentOptions) ?? + throw new InvalidOperationException($""" + Failed to serialize variables manifest from content: + + {Content} + """ + ); + + _variables = (JsonObject?)manifest["variables"] ?? + throw new InvalidOperationException($""" + Manifest JSON does not contain 'variables' section: + + {Content} + """ + ); + } + + /// + /// The current JSON content of the manifest file, automatically updated + /// whenever variables are modified through the indexer. This content + /// preserves the original formatting and structure while reflecting any + /// variable changes. + /// + public string Content { get; private set; } + + /// + /// Enumerates all variable names defined in the manifest's variables + /// section. + /// + public IEnumerable AllVariables => _variables.Select(kvp => kvp.Key); + + /// + /// Retrieves or updates a variable by name. Embedded variable references + /// using $(variableName) syntax are resolved recursively. When modifying, + /// is updated to reflect the changes. + /// + public string this[string key] + { + get => GetVariable(key); + set => SetVariable(key, value); + } + + /// + /// Updates all variables that match 's + /// rules. + /// + /// + /// The updater that defines which variables to modify and calculates their + /// new values. + /// + public async Task ApplyAsync(IVariableUpdater variableUpdater) + { + foreach (string variableName in AllVariables) + { + if (variableUpdater.ShouldUpdate(variableName, this) && !ReferencesOtherVariable(variableName)) + { + string newValue = await variableUpdater.GetNewValueAsync(variableName, this); + this[variableName] = newValue; + } + } + } + + /// + /// Resolves a variable's value, including any nested variable references. + /// Variable references use the $(variableName) syntax and are resolved + /// recursively. + /// + /// + /// The name of the variable to resolve. + /// + /// + /// The fully resolved value, or an empty string if the variable is not + /// found. + /// + private string GetVariable(string key) + { + string value = _variables[key]?.ToString() ?? ""; + + // Look through any variables in this variable's value. If there are + // any, resolve them recursively. + var matchedSubVariables = VariableRegex.Matches(value); + foreach (Match match in matchedSubVariables) + { + string subVariableName = match.Groups["name"].Value; + string subVariableValue = GetVariable(subVariableName); + value = value.Replace(match.Value, subVariableValue); + } + + return value; + } + + private void SetVariable(string key, string value) + { + // Update the variable in the json object representation + _variables[key] = value; + + // Update the variable in the file contents. Use regex to preserve formatting. + string jsonPropertyPattern = $@" + ""{Regex.Escape(key)}"" # property name in quotes + \s*:\s* # colon with optional whitespace + ""[^""]*"" # value in quotes (no inner quotes) + "; + + var regex = new Regex(jsonPropertyPattern, RegexOptions.IgnorePatternWhitespace); + Content = regex.Replace(Content, $"\"{key}\": \"{value}\""); + } + + /// + /// Tells whether or not the specified variable is a direct reference to + /// another variable. + /// + /// Name of the variable to check. + /// + /// True if the variable references another variable, false if it doesn't + /// exist or has its own value. + /// + private bool ReferencesOtherVariable(string key) + { + string rawVariableValue = _variables[key]?.ToString() ?? ""; + return VariableRegex.IsMatch(rawVariableValue); + } + + /// + /// Matches variable reference patterns in the format $(variableName) for + /// recursive resolution. Has one named group, "name" which captures the + /// variable name inside the parentheses. + /// + [GeneratedRegex(@"\$\((?.*?)\)")] + private static partial Regex VariableRegex { get; } +} diff --git a/eng/update-dependencies/Microsoft.DotNet.Framework.UpdateDependencies.csproj b/eng/update-dependencies/Microsoft.DotNet.Framework.UpdateDependencies.csproj index c6e47d25a..8ff60a5fa 100644 --- a/eng/update-dependencies/Microsoft.DotNet.Framework.UpdateDependencies.csproj +++ b/eng/update-dependencies/Microsoft.DotNet.Framework.UpdateDependencies.csproj @@ -5,13 +5,14 @@ net9.0 latest enable + enable Microsoft.DotNet.Framework.UpdateDependencies update-dependencies - - - + + + diff --git a/eng/update-dependencies/Options.cs b/eng/update-dependencies/Options.cs deleted file mode 100644 index ce4a9c047..000000000 --- a/eng/update-dependencies/Options.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Collections.Generic; -using System.CommandLine; - -namespace Microsoft.DotNet.Framework.UpdateDependencies -{ - public class Options - { - public string? DateStampAll { get; private set; } - - public string? DateStampRuntime { get; private set; } - - public string? DateStampSdk { get; private set; } - - public string? DateStampAspnet { get; private set; } - - public string? DateStampWcf { get; private set; } - - public string? GitHubEmail { get; private set; } - - public string? GitHubPassword { get; private set; } - - public string GitHubProject => "dotnet-framework-docker"; - - public string GitHubUpstreamBranch => "main"; - - public string GitHubUpstreamOwner => "Microsoft"; - - public string? GitHubUser { get; private set; } - - public bool UpdateOnly => GitHubEmail == null || GitHubPassword == null || GitHubUser == null; - - public Options(string? datestampAll, string? datestampRuntime, string? datestampSdk, string? datestampAspnet, string? datestampWcf, string? email, - string? password, string? user) - { - DateStampAll = datestampAll; - DateStampRuntime = datestampRuntime; - DateStampSdk = datestampSdk; - DateStampAspnet = datestampAspnet; - DateStampWcf = datestampWcf; - GitHubEmail = email; - GitHubPassword = password; - GitHubUser = user; - } - - public static IEnumerable GetCliSymbols() => - new Symbol[] - { - new Option("--datestamp-all", "Tag date stamp to assign to all image types"), - new Option("--datestamp-runtime", "Tag date stamp to assign to runtime image types (overrides datestamp-all)"), - new Option("--datestamp-sdk", "Tag date stamp to assign to SDK image types (overrides datestamp-all)"), - new Option("--datestamp-aspnet", "Tag date stamp to assign to ASP.NET image types (overrides datestamp-all)"), - new Option("--datestamp-wcf", "Tag date stamp to assign to WCF image types (overrides datestamp-all)"), - new Option("--email", "GitHub email used to make PR (if not specified, a PR will not be created)"), - new Option("--password", "GitHub password used to make PR (if not specified, a PR will not be created)"), - new Option("--user", "GitHub user used to make PR (if not specified, a PR will not be created)") - }; - } -} diff --git a/eng/update-dependencies/Program.cs b/eng/update-dependencies/Program.cs index fb7e72d49..dc083370b 100644 --- a/eng/update-dependencies/Program.cs +++ b/eng/update-dependencies/Program.cs @@ -2,47 +2,47 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +using Microsoft.DotNet.Framework.UpdateDependencies; using System.CommandLine; -using System.CommandLine.Invocation; -using System.Diagnostics; -using System.IO; -using System.Threading.Tasks; -namespace Microsoft.DotNet.Framework.UpdateDependencies +// Command-line tool for updating dependency variables in .NET Framework Docker +// manifest files. +// +// Before running, you may need to build the app and then run: +// pwsh bin/Debug/net*/playwright.ps1 install +// +// Usage: dotnet run -- --help + +var manifestFileOption = new Argument("manifest file path") { - public static class Program - { - public static string RepoRoot { get; } = Directory.GetCurrentDirectory(); + DefaultValueFactory = _ => "manifest.versions.json", +}; - public static Task Main(string[] args) - { - RootCommand command = new RootCommand(); - foreach (Symbol symbol in Options.GetCliSymbols()) - { - command.Add(symbol); - }; +var updateLcusCommand = new Command( + name: "update-lcus", + description: "Update all LCU variables in the specified manifest file.") +{ + manifestFileOption +}; - command.Handler = CommandHandler.Create(ExecuteAsync); +var rootCommand = new RootCommand() { updateLcusCommand }; - return command.InvokeAsync(args); - } +updateLcusCommand.SetAction( + async parseResult => + { + string manifestFilePath = parseResult.GetValue(manifestFileOption) ?? + throw new ArgumentException("Manifest file path is required."); + + var manifestVersionsContent = await File.ReadAllTextAsync(manifestFilePath); + var manifestVersionsContext = new ManifestVariableContext(manifestVersionsContent); - private static async Task ExecuteAsync(Options options) + await using (var lcuUpdater = new LcuVariableUpdater()) { - try - { - Trace.Listeners.Add(new TextWriterTraceListener(Console.Out)); - - await new DependencyUpdater(options).ExecuteAsync(); - } - catch (Exception e) - { - Console.Error.WriteLine($"Failed to update dependencies:{Environment.NewLine}{e.ToString()}"); - Environment.Exit(1); - } - - Environment.Exit(0); + await manifestVersionsContext.ApplyAsync(lcuUpdater); } + + await File.WriteAllTextAsync(manifestFilePath, manifestVersionsContext.Content); } -} +); + +return rootCommand.Parse(args).Invoke(); diff --git a/eng/update-dependencies/ScriptRunnerUpdater.cs b/eng/update-dependencies/ScriptRunnerUpdater.cs deleted file mode 100644 index b9ea3a3ff..000000000 --- a/eng/update-dependencies/ScriptRunnerUpdater.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; -using System.Linq; -using Microsoft.DotNet.VersionTools.Dependencies; - -namespace Microsoft.DotNet.Framework.UpdateDependencies -{ - /// - /// An IDependencyUpdater that executes a PowerShell script to perform the update. - /// - public class ScriptRunnerUpdater : IDependencyUpdater - { - private readonly string _scriptPath; - - private ScriptRunnerUpdater(string scriptPath) - { - _scriptPath = scriptPath; - } - - public static IDependencyUpdater GetDockerfileUpdater(string repoRoot) => - new ScriptRunnerUpdater(Path.Combine(repoRoot, "eng", "dockerfile-templates", "Get-GeneratedDockerfiles.ps1")); - - public static IDependencyUpdater GetReadMeUpdater(string repoRoot) => - new ScriptRunnerUpdater(Path.Combine(repoRoot, "eng", "readme-templates", "Get-GeneratedReadmes.ps1")); - - public IEnumerable GetUpdateTasks(IEnumerable dependencyInfos) - { - return new DependencyUpdateTask[] { - new DependencyUpdateTask( - () => ExecuteScript(), - Enumerable.Empty(), - Enumerable.Empty() - ) - }; - } - - private void ExecuteScript() - { - Trace.TraceInformation($"Executing '{_scriptPath}'"); - - // Support both execution within Windows 10, Nano Server and Linux environments. - Process process; - try - { - process = Process.Start("pwsh", _scriptPath); - process.WaitForExit(); - } - catch (Win32Exception) - { - process = Process.Start("powershell", _scriptPath); - process.WaitForExit(); - } - - if (process.ExitCode != 0) - { - throw new InvalidOperationException($"Unable to successfully execute '{_scriptPath}'"); - } - } - } -} diff --git a/manifest.datestamps.json b/manifest.datestamps.json index e7ca2cd4d..6ad662c71 100644 --- a/manifest.datestamps.json +++ b/manifest.datestamps.json @@ -1,6 +1,6 @@ { "variables": { - "CurrentReleaseDateStamp": "20250408", + "CurrentReleaseDateStamp": "20250708", "RuntimeReleaseDateStamp": "$(CurrentReleaseDateStamp)", "AspnetReleaseDateStamp": "$(CurrentReleaseDateStamp)", @@ -16,9 +16,6 @@ "3.5-ltsc2022-Runtime-DateStamp": "$(RuntimeReleaseDateStamp)", "3.5-ltsc2022-Aspnet-DateStamp": "$(AspnetReleaseDateStamp)", "3.5-ltsc2022-Sdk-DateStamp": "$(SdkReleaseDateStamp)", - "3.5-ltsc2025-Runtime-DateStamp": "$(RuntimeReleaseDateStamp)", - "3.5-ltsc2025-Aspnet-DateStamp": "$(AspnetReleaseDateStamp)", - "3.5-ltsc2025-Sdk-DateStamp": "$(SdkReleaseDateStamp)", "4.6.2-ltsc2016-Runtime-DateStamp": "$(RuntimeReleaseDateStamp)", "4.6.2-ltsc2016-Aspnet-DateStamp": "$(AspnetReleaseDateStamp)", "4.6.2-ltsc2016-Wcf-DateStamp": "$(WcfReleaseDateStamp)", diff --git a/manifest.json b/manifest.json index 146023f5d..c1833ceba 100644 --- a/manifest.json +++ b/manifest.json @@ -265,16 +265,6 @@ "3.5-$(3.5-ltsc2022-Runtime-DateStamp)-windowsservercore-ltsc2022": {}, "3.5-windowsservercore-ltsc2022": {} } - }, - { - "dockerfile": "src/runtime/3.5/windowsservercore-ltsc2025", - "dockerfileTemplate": "eng/dockerfile-templates/runtime/Dockerfile", - "os": "windows", - "osVersion": "windowsservercore-ltsc2025", - "tags": { - "3.5-$(3.5-ltsc2025-Runtime-DateStamp)-windowsservercore-ltsc2025": {}, - "3.5-windowsservercore-ltsc2025": {} - } } ] } @@ -428,19 +418,6 @@ "3.5-$(3.5-ltsc2022-Sdk-DateStamp)-windowsservercore-ltsc2022": {}, "3.5-windowsservercore-ltsc2022": {} } - }, - { - "buildArgs": { - "REPO": "$(Repo:runtime)" - }, - "dockerfile": "src/sdk/3.5/windowsservercore-ltsc2025", - "dockerfileTemplate": "eng/dockerfile-templates/sdk/Dockerfile", - "os": "windows", - "osVersion": "windowsservercore-ltsc2025", - "tags": { - "3.5-$(3.5-ltsc2025-Sdk-DateStamp)-windowsservercore-ltsc2025": {}, - "3.5-windowsservercore-ltsc2025": {} - } } ] } @@ -691,19 +668,6 @@ "3.5-$(3.5-ltsc2022-Aspnet-DateStamp)-windowsservercore-ltsc2022": {}, "3.5-windowsservercore-ltsc2022": {} } - }, - { - "buildArgs": { - "REPO": "$(Repo:runtime)" - }, - "dockerfile": "src/aspnet/3.5/windowsservercore-ltsc2025", - "dockerfileTemplate": "eng/dockerfile-templates/aspnet/Dockerfile", - "os": "windows", - "osVersion": "windowsservercore-ltsc2025", - "tags": { - "3.5-$(3.5-ltsc2025-Aspnet-DateStamp)-windowsservercore-ltsc2025": {}, - "3.5-windowsservercore-ltsc2025": {} - } } ] } diff --git a/manifest.versions.json b/manifest.versions.json index 133f585d1..ea552b2c4 100644 --- a/manifest.versions.json +++ b/manifest.versions.json @@ -1,13 +1,13 @@ { "variables": { - "kb|ltsc2016|3.5": "KB5055521", - "lcu|ltsc2016|3.5": "https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2025/04/windows10.0-kb5055521-x64_41090eb90fce0c94b6a9e1a986b0c4810befeea1.msu", - "kb|ltsc2019|3.5": "KB5054695", - "lcu|ltsc2019|3.5": "https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/03/windows10.0-kb5054695-x64_afdd257a714567eef1c721a9b16b04396d9975a0.msu", - "kb|ltsc2022|3.5": "KB5055169", - "lcu|ltsc2022|3.5": "https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/updt/2025/03/windows10.0-kb5055169-x64-ndp48_07015721a8fc001c5b1946fc49584bb649a4aa49.msu", - "kb|ltsc2025|3.5": "KB5054979", - "lcu|ltsc2025|3.5": "https://catalog.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/02cd9c83-8312-424d-9a06-b042095804a8/public/windows11.0-kb5054979-x64-ndp481_8e2f730bc747de0f90aaee95d4862e4f88751c07.msu", + "kb|ltsc2016|3.5": "KB5062560", + "lcu|ltsc2016|3.5": "https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2025/07/windows10.0-kb5062560-x64_eab2ba1274fcf4fc3169e7dcfff8be1aeca1de08.msu", + "kb|ltsc2019|3.5": "KB5062070", + "lcu|ltsc2019|3.5": "https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062070-x64_73462c4700dd2c386548f3c61e79e60eef0eab92.msu", + "kb|ltsc2022|3.5": "KB5062063", + "lcu|ltsc2022|3.5": "https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062063-x64-ndp48_72cc83da771f25d2ec68a4565fe7711e99e47d19.msu", + "kb|ltsc2025|3.5": "KB5056579", + "lcu|ltsc2025|3.5": "https://catalog.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/66baa9bc-4fa3-4f4b-97b1-af6dc17c64d9/public/windows11.0-kb5056579-x64-ndp481_a062e62bdedd9a2a4b0cbf4e26ff1652a240f1ee.msu", // All of these versions are patched by the same corresponding KB labeled as 3.5 above. "kb|ltsc2016|4.7.2": "$(kb|ltsc2016|3.5)", @@ -21,14 +21,14 @@ "4.8-is-security-release": true, "4.8-is-security-release|ltsc2022": "$(4.8-is-security-release)", - "kb|ltsc2016|4.8": "KB5055170", - "lcu|ltsc2016|4.8": "https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/updt/2025/03/windows10.0-kb5055170-x64-ndp48_72a6e45b3bb4da01a3bcf0379e263ef2bb23b034.msu", - "kb|ltsc2019|4.8": "KB5055175", - "lcu|ltsc2019|4.8": "https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/03/windows10.0-kb5055175-x64-ndp48_df5de1b5f2a6394b4d40391d6ea8fed4415f806f.msu", + "kb|ltsc2016|4.8": "KB5062064", + "lcu|ltsc2016|4.8": "https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062064-x64-ndp48_18aba29dce7a03be5c07d0e6e636011349217573.msu", + "kb|ltsc2019|4.8": "KB5062068", + "lcu|ltsc2019|4.8": "https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062068-x64-ndp48_cb967cb87cc31dd75c78517493cfec3b81a6fc38.msu", "kb|ltsc2022|4.8": "$(kb|ltsc2022|3.5)", "lcu|ltsc2022|4.8": "$(lcu|ltsc2022|3.5)", - "kb|ltsc2022|4.8.1": "KB5054693", - "lcu|ltsc2022|4.8.1": "https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/updt/2025/03/windows10.0-kb5054693-x64-ndp481_e81e514fe650aee149be6b260b44d97b134a1b2b.msu", + "kb|ltsc2022|4.8.1": "KB5062061", + "lcu|ltsc2022|4.8.1": "https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062061-x64-ndp481_e65eb8b476a8b9172416d965066dba2664817993.msu", "kb|ltsc2025|4.8.1": "$(kb|ltsc2025|3.5)", "lcu|ltsc2025|4.8.1": "$(lcu|ltsc2025|3.5)", @@ -40,13 +40,13 @@ "kb|ltsc2025|default": "$(kb|ltsc2025|4.8.1)", "lcu|ltsc2025|default": "$(lcu|ltsc2025|4.8.1)", - "nuget|version": "6.13.2", + "nuget|version": "6.14.0", "referenceassemblies|version": "1.0.3", "servicemonitor|version": "2.0.1.10", "servicemonitor|url": "https://github.com/microsoft/IIS.ServiceMonitor/releases/download/v$(servicemonitor|version)/ServiceMonitor.exe", - "vs|version": "17.13", + "vs|version": "17.14", "vs|testAgentUrl": "https://aka.ms/vs/17/release/vs_TestAgent.exe", "vs|buildToolsUrl": "https://aka.ms/vs/17/release/vs_BuildTools.exe", diff --git a/src/aspnet/3.5/windowsservercore-ltsc2016/Dockerfile b/src/aspnet/3.5/windowsservercore-ltsc2016/Dockerfile index 5002bc65d..2b0ed0ff1 100644 --- a/src/aspnet/3.5/windowsservercore-ltsc2016/Dockerfile +++ b/src/aspnet/3.5/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:3.5-20250408-windowsservercore-ltsc2016 +FROM $REPO:3.5-20250708-windowsservercore-ltsc2016 RUN powershell -Command ` $ErrorActionPreference = 'Stop'; ` diff --git a/src/aspnet/3.5/windowsservercore-ltsc2019/Dockerfile b/src/aspnet/3.5/windowsservercore-ltsc2019/Dockerfile index e5a162fcb..097cfdf90 100644 --- a/src/aspnet/3.5/windowsservercore-ltsc2019/Dockerfile +++ b/src/aspnet/3.5/windowsservercore-ltsc2019/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:3.5-20250408-windowsservercore-ltsc2019 +FROM $REPO:3.5-20250708-windowsservercore-ltsc2019 RUN powershell -Command ` $ErrorActionPreference = 'Stop'; ` diff --git a/src/aspnet/3.5/windowsservercore-ltsc2022/Dockerfile b/src/aspnet/3.5/windowsservercore-ltsc2022/Dockerfile index 5b5975309..02e766fd1 100644 --- a/src/aspnet/3.5/windowsservercore-ltsc2022/Dockerfile +++ b/src/aspnet/3.5/windowsservercore-ltsc2022/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:3.5-20250408-windowsservercore-ltsc2022 +FROM $REPO:3.5-20250708-windowsservercore-ltsc2022 RUN dism /Online /Quiet /Enable-Feature /All /FeatureName:IIS-WebServerRole /FeatureName:IIS-ASPNET ` && dism /Online /Quiet /Disable-Feature /FeatureName:IIS-WebServerManagementTools ` diff --git a/src/aspnet/3.5/windowsservercore-ltsc2025/Dockerfile b/src/aspnet/3.5/windowsservercore-ltsc2025/Dockerfile index 701ee772c..bdbac1e40 100644 --- a/src/aspnet/3.5/windowsservercore-ltsc2025/Dockerfile +++ b/src/aspnet/3.5/windowsservercore-ltsc2025/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:3.5-20250408-windowsservercore-ltsc2025 +FROM $REPO:3.5-20250424-windowsservercore-ltsc2025 RUN dism /Online /Quiet /Enable-Feature /All /FeatureName:IIS-WebServerRole /FeatureName:IIS-ASPNET ` && dism /Online /Quiet /Disable-Feature /FeatureName:IIS-WebServerManagementTools ` diff --git a/src/aspnet/4.6.2/windowsservercore-ltsc2016/Dockerfile b/src/aspnet/4.6.2/windowsservercore-ltsc2016/Dockerfile index dddc40240..d88d10104 100644 --- a/src/aspnet/4.6.2/windowsservercore-ltsc2016/Dockerfile +++ b/src/aspnet/4.6.2/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.6.2-20250408-windowsservercore-ltsc2016 +FROM $REPO:4.6.2-20250708-windowsservercore-ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/src/aspnet/4.7.1/windowsservercore-ltsc2016/Dockerfile b/src/aspnet/4.7.1/windowsservercore-ltsc2016/Dockerfile index b428d5ab4..3ef9212ba 100644 --- a/src/aspnet/4.7.1/windowsservercore-ltsc2016/Dockerfile +++ b/src/aspnet/4.7.1/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.7.1-20250408-windowsservercore-ltsc2016 +FROM $REPO:4.7.1-20250708-windowsservercore-ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/src/aspnet/4.7.2/windowsservercore-ltsc2016/Dockerfile b/src/aspnet/4.7.2/windowsservercore-ltsc2016/Dockerfile index 2c59df6d6..f51c36ee5 100644 --- a/src/aspnet/4.7.2/windowsservercore-ltsc2016/Dockerfile +++ b/src/aspnet/4.7.2/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.7.2-20250408-windowsservercore-ltsc2016 +FROM $REPO:4.7.2-20250708-windowsservercore-ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/src/aspnet/4.7.2/windowsservercore-ltsc2019/Dockerfile b/src/aspnet/4.7.2/windowsservercore-ltsc2019/Dockerfile index 14493d7c7..3c6434001 100644 --- a/src/aspnet/4.7.2/windowsservercore-ltsc2019/Dockerfile +++ b/src/aspnet/4.7.2/windowsservercore-ltsc2019/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.7.2-20250408-windowsservercore-ltsc2019 +FROM $REPO:4.7.2-20250708-windowsservercore-ltsc2019 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/src/aspnet/4.7/windowsservercore-ltsc2016/Dockerfile b/src/aspnet/4.7/windowsservercore-ltsc2016/Dockerfile index a6b532a0f..eb50f7426 100644 --- a/src/aspnet/4.7/windowsservercore-ltsc2016/Dockerfile +++ b/src/aspnet/4.7/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.7-20250408-windowsservercore-ltsc2016 +FROM $REPO:4.7-20250708-windowsservercore-ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/src/aspnet/4.8.1/windowsservercore-ltsc2022/Dockerfile b/src/aspnet/4.8.1/windowsservercore-ltsc2022/Dockerfile index e1938c2ef..8c52edd07 100644 --- a/src/aspnet/4.8.1/windowsservercore-ltsc2022/Dockerfile +++ b/src/aspnet/4.8.1/windowsservercore-ltsc2022/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.8.1-20250408-windowsservercore-ltsc2022 +FROM $REPO:4.8.1-20250708-windowsservercore-ltsc2022 RUN dism /Online /Quiet /Enable-Feature /All /FeatureName:IIS-WebServerRole /FeatureName:NetFx4Extended-ASPNET45 /FeatureName:IIS-ASPNET45 ` && dism /Online /Quiet /Disable-Feature /FeatureName:IIS-WebServerManagementTools ` diff --git a/src/aspnet/4.8.1/windowsservercore-ltsc2025/Dockerfile b/src/aspnet/4.8.1/windowsservercore-ltsc2025/Dockerfile index 68346b412..5ace054ba 100644 --- a/src/aspnet/4.8.1/windowsservercore-ltsc2025/Dockerfile +++ b/src/aspnet/4.8.1/windowsservercore-ltsc2025/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.8.1-20250408-windowsservercore-ltsc2025 +FROM $REPO:4.8.1-20250708-windowsservercore-ltsc2025 RUN dism /Online /Quiet /Enable-Feature /All /FeatureName:IIS-WebServerRole /FeatureName:NetFx4Extended-ASPNET45 /FeatureName:IIS-ASPNET45 ` && dism /Online /Quiet /Disable-Feature /FeatureName:IIS-WebServerManagementTools ` diff --git a/src/aspnet/4.8/windowsservercore-ltsc2016/Dockerfile b/src/aspnet/4.8/windowsservercore-ltsc2016/Dockerfile index a736e940d..038a0a872 100644 --- a/src/aspnet/4.8/windowsservercore-ltsc2016/Dockerfile +++ b/src/aspnet/4.8/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.8-20250408-windowsservercore-ltsc2016 +FROM $REPO:4.8-20250708-windowsservercore-ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/src/aspnet/4.8/windowsservercore-ltsc2019/Dockerfile b/src/aspnet/4.8/windowsservercore-ltsc2019/Dockerfile index 83ca7444f..1fd0be12f 100644 --- a/src/aspnet/4.8/windowsservercore-ltsc2019/Dockerfile +++ b/src/aspnet/4.8/windowsservercore-ltsc2019/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.8-20250408-windowsservercore-ltsc2019 +FROM $REPO:4.8-20250708-windowsservercore-ltsc2019 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/src/aspnet/4.8/windowsservercore-ltsc2022/Dockerfile b/src/aspnet/4.8/windowsservercore-ltsc2022/Dockerfile index 5e4c5de41..838b32f04 100644 --- a/src/aspnet/4.8/windowsservercore-ltsc2022/Dockerfile +++ b/src/aspnet/4.8/windowsservercore-ltsc2022/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.8-20250408-windowsservercore-ltsc2022 +FROM $REPO:4.8-20250708-windowsservercore-ltsc2022 RUN dism /Online /Quiet /Enable-Feature /All /FeatureName:IIS-WebServerRole /FeatureName:NetFx4Extended-ASPNET45 /FeatureName:IIS-ASPNET45 ` && dism /Online /Quiet /Disable-Feature /FeatureName:IIS-WebServerManagementTools ` diff --git a/src/runtime/3.5/windowsservercore-ltsc2016/Dockerfile b/src/runtime/3.5/windowsservercore-ltsc2016/Dockerfile index 1203f2d22..fdf3aec48 100644 --- a/src/runtime/3.5/windowsservercore-ltsc2016/Dockerfile +++ b/src/runtime/3.5/windowsservercore-ltsc2016/Dockerfile @@ -18,12 +18,12 @@ RUN ` [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` Invoke-WebRequest ` -UseBasicParsing ` - -Uri https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2025/04/windows10.0-kb5055521-x64_41090eb90fce0c94b6a9e1a986b0c4810befeea1.msu ` + -Uri https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2025/07/windows10.0-kb5062560-x64_eab2ba1274fcf4fc3169e7dcfff8be1aeca1de08.msu ` -OutFile patch.msu; ` && mkdir patch ` && expand patch.msu patch -F:* ` && del patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5055521-x64.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5062560-x64.cab ` && rmdir /S /Q patch ` ` # ngen .NET Fx diff --git a/src/runtime/3.5/windowsservercore-ltsc2019/Dockerfile b/src/runtime/3.5/windowsservercore-ltsc2019/Dockerfile index 7370e4e16..8a257a135 100644 --- a/src/runtime/3.5/windowsservercore-ltsc2019/Dockerfile +++ b/src/runtime/3.5/windowsservercore-ltsc2019/Dockerfile @@ -13,11 +13,11 @@ RUN ` && sc config wuauserv start= disabled ` ` # Apply latest patch - && curl -fSLo patch.msu https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/03/windows10.0-kb5054695-x64_afdd257a714567eef1c721a9b16b04396d9975a0.msu ` + && curl -fSLo patch.msu https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062070-x64_73462c4700dd2c386548f3c61e79e60eef0eab92.msu ` && mkdir patch ` && expand patch.msu patch -F:* ` && del /F /Q patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5054695-x64.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5062070-x64.cab ` && rmdir /S /Q patch ` ` # ngen .NET Fx diff --git a/src/runtime/3.5/windowsservercore-ltsc2022/Dockerfile b/src/runtime/3.5/windowsservercore-ltsc2022/Dockerfile index 3c5817d1a..c84588307 100644 --- a/src/runtime/3.5/windowsservercore-ltsc2022/Dockerfile +++ b/src/runtime/3.5/windowsservercore-ltsc2022/Dockerfile @@ -12,11 +12,11 @@ RUN ` dism /Online /Add-Capability /CapabilityName:NetFx3 ` ` # Apply latest 3.5 patch - && curl -fSLo patch.msu https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/updt/2025/03/windows10.0-kb5055169-x64-ndp48_07015721a8fc001c5b1946fc49584bb649a4aa49.msu ` + && curl -fSLo patch.msu https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062063-x64-ndp48_72cc83da771f25d2ec68a4565fe7711e99e47d19.msu ` && mkdir patch ` && expand patch.msu patch -F:* ` && del /F /Q patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5055169-x64-ndp48.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5062063-x64-ndp48.cab ` && rmdir /S /Q patch ` ` # Ngen top of assembly graph to optimize a set of frequently used assemblies diff --git a/src/runtime/4.7.1/windowsservercore-ltsc2016/Dockerfile b/src/runtime/4.7.1/windowsservercore-ltsc2016/Dockerfile index e344c0b6b..19166f510 100644 --- a/src/runtime/4.7.1/windowsservercore-ltsc2016/Dockerfile +++ b/src/runtime/4.7.1/windowsservercore-ltsc2016/Dockerfile @@ -23,12 +23,12 @@ RUN ` [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` Invoke-WebRequest ` -UseBasicParsing ` - -Uri https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2025/04/windows10.0-kb5055521-x64_41090eb90fce0c94b6a9e1a986b0c4810befeea1.msu ` + -Uri https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2025/07/windows10.0-kb5062560-x64_eab2ba1274fcf4fc3169e7dcfff8be1aeca1de08.msu ` -OutFile patch.msu; ` && mkdir patch ` && expand patch.msu patch -F:* ` && del patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5055521-x64.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5062560-x64.cab ` && rmdir /S /Q patch ` ` # ngen .NET Fx diff --git a/src/runtime/4.7.2/windowsservercore-ltsc2016/Dockerfile b/src/runtime/4.7.2/windowsservercore-ltsc2016/Dockerfile index 99460eb84..38bf7b3bd 100644 --- a/src/runtime/4.7.2/windowsservercore-ltsc2016/Dockerfile +++ b/src/runtime/4.7.2/windowsservercore-ltsc2016/Dockerfile @@ -23,12 +23,12 @@ RUN ` [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` Invoke-WebRequest ` -UseBasicParsing ` - -Uri https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2025/04/windows10.0-kb5055521-x64_41090eb90fce0c94b6a9e1a986b0c4810befeea1.msu ` + -Uri https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2025/07/windows10.0-kb5062560-x64_eab2ba1274fcf4fc3169e7dcfff8be1aeca1de08.msu ` -OutFile patch.msu; ` && mkdir patch ` && expand patch.msu patch -F:* ` && del patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5055521-x64.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5062560-x64.cab ` && rmdir /S /Q patch ` ` # ngen .NET Fx diff --git a/src/runtime/4.7/windowsservercore-ltsc2016/Dockerfile b/src/runtime/4.7/windowsservercore-ltsc2016/Dockerfile index 8046b4a9e..d0ba3d194 100644 --- a/src/runtime/4.7/windowsservercore-ltsc2016/Dockerfile +++ b/src/runtime/4.7/windowsservercore-ltsc2016/Dockerfile @@ -23,12 +23,12 @@ RUN ` [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` Invoke-WebRequest ` -UseBasicParsing ` - -Uri https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2025/04/windows10.0-kb5055521-x64_41090eb90fce0c94b6a9e1a986b0c4810befeea1.msu ` + -Uri https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2025/07/windows10.0-kb5062560-x64_eab2ba1274fcf4fc3169e7dcfff8be1aeca1de08.msu ` -OutFile patch.msu; ` && mkdir patch ` && expand patch.msu patch -F:* ` && del patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5055521-x64.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5062560-x64.cab ` && rmdir /S /Q patch ` ` # ngen .NET Fx diff --git a/src/runtime/4.8.1/windowsservercore-ltsc2022/Dockerfile b/src/runtime/4.8.1/windowsservercore-ltsc2022/Dockerfile index 0ae01e967..417c7e1cd 100644 --- a/src/runtime/4.8.1/windowsservercore-ltsc2022/Dockerfile +++ b/src/runtime/4.8.1/windowsservercore-ltsc2022/Dockerfile @@ -16,11 +16,11 @@ RUN ` && powershell Remove-Item -Force -Recurse ${Env:TEMP}\* ` ` # Apply latest patch - && curl -fSLo patch.msu https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/updt/2025/03/windows10.0-kb5054693-x64-ndp481_e81e514fe650aee149be6b260b44d97b134a1b2b.msu ` + && curl -fSLo patch.msu https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062061-x64-ndp481_e65eb8b476a8b9172416d965066dba2664817993.msu ` && mkdir patch ` && expand patch.msu patch -F:* ` && del /F /Q patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5054693-x64-ndp481.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5062061-x64-ndp481.cab ` && rmdir /S /Q patch ` ` # Ngen top of assembly graph to optimize a set of frequently used assemblies diff --git a/src/runtime/4.8.1/windowsservercore-ltsc2025/Dockerfile b/src/runtime/4.8.1/windowsservercore-ltsc2025/Dockerfile index 17cb676f0..c9a1a4ac7 100644 --- a/src/runtime/4.8.1/windowsservercore-ltsc2025/Dockerfile +++ b/src/runtime/4.8.1/windowsservercore-ltsc2025/Dockerfile @@ -10,11 +10,11 @@ ENV ` RUN ` # Apply latest patch - curl -fSLo patch.msu https://catalog.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/02cd9c83-8312-424d-9a06-b042095804a8/public/windows11.0-kb5054979-x64-ndp481_8e2f730bc747de0f90aaee95d4862e4f88751c07.msu ` + curl -fSLo patch.msu https://catalog.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/66baa9bc-4fa3-4f4b-97b1-af6dc17c64d9/public/windows11.0-kb5056579-x64-ndp481_a062e62bdedd9a2a4b0cbf4e26ff1652a240f1ee.msu ` && mkdir patch ` && expand patch.msu patch -F:* ` && del /F /Q patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows11.0-KB5054979-x64-ndp481.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows11.0-KB5056579-x64-ndp481.cab ` && rmdir /S /Q patch ` ` # Ngen top of assembly graph to optimize a set of frequently used assemblies diff --git a/src/runtime/4.8/windowsservercore-ltsc2016/Dockerfile b/src/runtime/4.8/windowsservercore-ltsc2016/Dockerfile index a1c22ba97..5aaf54de6 100644 --- a/src/runtime/4.8/windowsservercore-ltsc2016/Dockerfile +++ b/src/runtime/4.8/windowsservercore-ltsc2016/Dockerfile @@ -23,12 +23,12 @@ RUN ` [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` Invoke-WebRequest ` -UseBasicParsing ` - -Uri https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/updt/2025/03/windows10.0-kb5055170-x64-ndp48_72a6e45b3bb4da01a3bcf0379e263ef2bb23b034.msu ` + -Uri https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062064-x64-ndp48_18aba29dce7a03be5c07d0e6e636011349217573.msu ` -OutFile patch.msu; ` && mkdir patch ` && expand patch.msu patch -F:* ` && del patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5055170-x64-ndp48.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5062064-x64-ndp48.cab ` && rmdir /S /Q patch ` ` # ngen .NET Fx diff --git a/src/runtime/4.8/windowsservercore-ltsc2019/Dockerfile b/src/runtime/4.8/windowsservercore-ltsc2019/Dockerfile index 4fe7d0b3b..5248802c5 100644 --- a/src/runtime/4.8/windowsservercore-ltsc2019/Dockerfile +++ b/src/runtime/4.8/windowsservercore-ltsc2019/Dockerfile @@ -15,11 +15,11 @@ RUN ` && powershell Remove-Item -Force -Recurse ${Env:TEMP}\* ` ` # Apply latest patch - && curl -fSLo patch.msu https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/03/windows10.0-kb5055175-x64-ndp48_df5de1b5f2a6394b4d40391d6ea8fed4415f806f.msu ` + && curl -fSLo patch.msu https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062068-x64-ndp48_cb967cb87cc31dd75c78517493cfec3b81a6fc38.msu ` && mkdir patch ` && expand patch.msu patch -F:* ` && del /F /Q patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5055175-x64-ndp48.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5062068-x64-ndp48.cab ` && rmdir /S /Q patch ` ` # ngen .NET Fx diff --git a/src/sdk/3.5/windowsservercore-ltsc2016/Dockerfile b/src/sdk/3.5/windowsservercore-ltsc2016/Dockerfile index 592a56911..d1f657443 100644 --- a/src/sdk/3.5/windowsservercore-ltsc2016/Dockerfile +++ b/src/sdk/3.5/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:3.5-20250408-windowsservercore-ltsc2016 +FROM $REPO:3.5-20250708-windowsservercore-ltsc2016 RUN ` # Install .NET 4.8 Fx @@ -22,12 +22,12 @@ RUN ` [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` Invoke-WebRequest ` -UseBasicParsing ` - -Uri https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/updt/2025/03/windows10.0-kb5055170-x64-ndp48_72a6e45b3bb4da01a3bcf0379e263ef2bb23b034.msu ` + -Uri https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062064-x64-ndp48_18aba29dce7a03be5c07d0e6e636011349217573.msu ` -OutFile patch.msu; ` && mkdir patch ` && expand patch.msu patch -F:* ` && del patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5055170-x64-ndp48.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5062064-x64-ndp48.cab ` && rmdir /S /Q patch ` ` # ngen .NET Fx @@ -36,7 +36,7 @@ RUN ` && %windir%\Microsoft.NET\Framework\v4.0.30319\ngen update # Install NuGet CLI -ENV NUGET_VERSION=6.13.2 +ENV NUGET_VERSION=6.14.0 RUN mkdir "%ProgramFiles%\NuGet\latest" ` && powershell -Command ` $ProgressPreference = 'SilentlyContinue'; ` diff --git a/src/sdk/3.5/windowsservercore-ltsc2019/Dockerfile b/src/sdk/3.5/windowsservercore-ltsc2019/Dockerfile index ce940f2b8..f156e5536 100644 --- a/src/sdk/3.5/windowsservercore-ltsc2019/Dockerfile +++ b/src/sdk/3.5/windowsservercore-ltsc2019/Dockerfile @@ -1,13 +1,13 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:3.5-20250408-windowsservercore-ltsc2019 +FROM $REPO:3.5-20250708-windowsservercore-ltsc2019 ENV ` # Do not generate certificate DOTNET_GENERATE_ASPNET_CERTIFICATE=false ` # NuGet version to install - NUGET_VERSION=6.13.2 ` + NUGET_VERSION=6.14.0 ` # Install location of Roslyn ROSLYN_COMPILER_LOCATION="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\Roslyn" @@ -19,11 +19,11 @@ RUN ` && powershell Remove-Item -Force -Recurse ${Env:TEMP}\* ` ` # Apply latest patch - && curl -fSLo patch.msu https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/03/windows10.0-kb5055175-x64-ndp48_df5de1b5f2a6394b4d40391d6ea8fed4415f806f.msu ` + && curl -fSLo patch.msu https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/updt/2025/06/windows10.0-kb5062068-x64-ndp48_cb967cb87cc31dd75c78517493cfec3b81a6fc38.msu ` && mkdir patch ` && expand patch.msu patch -F:* ` && del /F /Q patch.msu ` - && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5055175-x64-ndp48.cab ` + && dism /Online /Quiet /Add-Package /PackagePath:C:\patch\windows10.0-KB5062068-x64-ndp48.cab ` && rmdir /S /Q patch ` ` # ngen .NET Fx diff --git a/src/sdk/3.5/windowsservercore-ltsc2022/Dockerfile b/src/sdk/3.5/windowsservercore-ltsc2022/Dockerfile index 22b20be22..4b225872a 100644 --- a/src/sdk/3.5/windowsservercore-ltsc2022/Dockerfile +++ b/src/sdk/3.5/windowsservercore-ltsc2022/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:3.5-20250408-windowsservercore-ltsc2022 +FROM $REPO:3.5-20250708-windowsservercore-ltsc2022 ENV ` # Do not generate certificate @@ -9,7 +9,7 @@ ENV ` # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true ` # NuGet version to install - NUGET_VERSION=6.13.2 ` + NUGET_VERSION=6.14.0 ` # Install location of Roslyn ROSLYN_COMPILER_LOCATION="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\Roslyn" diff --git a/src/sdk/3.5/windowsservercore-ltsc2025/Dockerfile b/src/sdk/3.5/windowsservercore-ltsc2025/Dockerfile index ef5485db6..4f214c86d 100644 --- a/src/sdk/3.5/windowsservercore-ltsc2025/Dockerfile +++ b/src/sdk/3.5/windowsservercore-ltsc2025/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:3.5-20250408-windowsservercore-ltsc2025 +FROM $REPO:3.5-20250424-windowsservercore-ltsc2025 ENV ` # Do not generate certificate diff --git a/src/sdk/4.8.1/windowsservercore-ltsc2022/Dockerfile b/src/sdk/4.8.1/windowsservercore-ltsc2022/Dockerfile index 17f0f8491..7647ce8fe 100644 --- a/src/sdk/4.8.1/windowsservercore-ltsc2022/Dockerfile +++ b/src/sdk/4.8.1/windowsservercore-ltsc2022/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.8.1-20250408-windowsservercore-ltsc2022 +FROM $REPO:4.8.1-20250708-windowsservercore-ltsc2022 ENV ` # Do not generate certificate @@ -9,7 +9,7 @@ ENV ` # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true ` # NuGet version to install - NUGET_VERSION=6.13.2 ` + NUGET_VERSION=6.14.0 ` # Install location of Roslyn ROSLYN_COMPILER_LOCATION="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\Roslyn" diff --git a/src/sdk/4.8.1/windowsservercore-ltsc2025/Dockerfile b/src/sdk/4.8.1/windowsservercore-ltsc2025/Dockerfile index b3b7bd3cd..6e55c21b3 100644 --- a/src/sdk/4.8.1/windowsservercore-ltsc2025/Dockerfile +++ b/src/sdk/4.8.1/windowsservercore-ltsc2025/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.8.1-20250408-windowsservercore-ltsc2025 +FROM $REPO:4.8.1-20250708-windowsservercore-ltsc2025 ENV ` # Do not generate certificate @@ -9,7 +9,7 @@ ENV ` # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true ` # NuGet version to install - NUGET_VERSION=6.13.2 ` + NUGET_VERSION=6.14.0 ` # Install location of Roslyn ROSLYN_COMPILER_LOCATION="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\Roslyn" diff --git a/src/sdk/4.8/windowsservercore-ltsc2016/Dockerfile b/src/sdk/4.8/windowsservercore-ltsc2016/Dockerfile index 73f25fb9a..94d2938bc 100644 --- a/src/sdk/4.8/windowsservercore-ltsc2016/Dockerfile +++ b/src/sdk/4.8/windowsservercore-ltsc2016/Dockerfile @@ -1,10 +1,10 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.8-20250408-windowsservercore-ltsc2016 +FROM $REPO:4.8-20250708-windowsservercore-ltsc2016 # Install NuGet CLI -ENV NUGET_VERSION=6.13.2 +ENV NUGET_VERSION=6.14.0 RUN mkdir "%ProgramFiles%\NuGet\latest" ` && powershell -Command ` $ProgressPreference = 'SilentlyContinue'; ` diff --git a/src/sdk/4.8/windowsservercore-ltsc2019/Dockerfile b/src/sdk/4.8/windowsservercore-ltsc2019/Dockerfile index 0bd3074d0..8bcd3b3b6 100644 --- a/src/sdk/4.8/windowsservercore-ltsc2019/Dockerfile +++ b/src/sdk/4.8/windowsservercore-ltsc2019/Dockerfile @@ -1,13 +1,13 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.8-20250408-windowsservercore-ltsc2019 +FROM $REPO:4.8-20250708-windowsservercore-ltsc2019 ENV ` # Do not generate certificate DOTNET_GENERATE_ASPNET_CERTIFICATE=false ` # NuGet version to install - NUGET_VERSION=6.13.2 ` + NUGET_VERSION=6.14.0 ` # Install location of Roslyn ROSLYN_COMPILER_LOCATION="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\Roslyn" diff --git a/src/sdk/4.8/windowsservercore-ltsc2022/Dockerfile b/src/sdk/4.8/windowsservercore-ltsc2022/Dockerfile index a55d6791e..7a82cf608 100644 --- a/src/sdk/4.8/windowsservercore-ltsc2022/Dockerfile +++ b/src/sdk/4.8/windowsservercore-ltsc2022/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/runtime -FROM $REPO:4.8-20250408-windowsservercore-ltsc2022 +FROM $REPO:4.8-20250708-windowsservercore-ltsc2022 ENV ` # Do not generate certificate @@ -9,7 +9,7 @@ ENV ` # Enable correct mode for dotnet watch (only mode supported in a container) DOTNET_USE_POLLING_FILE_WATCHER=true ` # NuGet version to install - NUGET_VERSION=6.13.2 ` + NUGET_VERSION=6.14.0 ` # Install location of Roslyn ROSLYN_COMPILER_LOCATION="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\Roslyn" diff --git a/src/wcf/4.6.2/windowsservercore-ltsc2016/Dockerfile b/src/wcf/4.6.2/windowsservercore-ltsc2016/Dockerfile index d6792d704..891d50140 100644 --- a/src/wcf/4.6.2/windowsservercore-ltsc2016/Dockerfile +++ b/src/wcf/4.6.2/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/aspnet -FROM $REPO:4.6.2-20250408-windowsservercore-ltsc2016 +FROM $REPO:4.6.2-20250708-windowsservercore-ltsc2016 # Install Windows components required for WCF service hosted on IIS RUN Add-WindowsFeature NET-WCF-TCP-Activation45; ` diff --git a/src/wcf/4.7.1/windowsservercore-ltsc2016/Dockerfile b/src/wcf/4.7.1/windowsservercore-ltsc2016/Dockerfile index 7f48be169..944f5fe30 100644 --- a/src/wcf/4.7.1/windowsservercore-ltsc2016/Dockerfile +++ b/src/wcf/4.7.1/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/aspnet -FROM $REPO:4.7.1-20250408-windowsservercore-ltsc2016 +FROM $REPO:4.7.1-20250708-windowsservercore-ltsc2016 # Install Windows components required for WCF service hosted on IIS RUN Add-WindowsFeature NET-WCF-TCP-Activation45; ` diff --git a/src/wcf/4.7.2/windowsservercore-ltsc2016/Dockerfile b/src/wcf/4.7.2/windowsservercore-ltsc2016/Dockerfile index d3a31313f..ee6893c2f 100644 --- a/src/wcf/4.7.2/windowsservercore-ltsc2016/Dockerfile +++ b/src/wcf/4.7.2/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/aspnet -FROM $REPO:4.7.2-20250408-windowsservercore-ltsc2016 +FROM $REPO:4.7.2-20250708-windowsservercore-ltsc2016 # Install Windows components required for WCF service hosted on IIS RUN Add-WindowsFeature NET-WCF-TCP-Activation45; ` diff --git a/src/wcf/4.7.2/windowsservercore-ltsc2019/Dockerfile b/src/wcf/4.7.2/windowsservercore-ltsc2019/Dockerfile index 38c26531e..182004df8 100644 --- a/src/wcf/4.7.2/windowsservercore-ltsc2019/Dockerfile +++ b/src/wcf/4.7.2/windowsservercore-ltsc2019/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/aspnet -FROM $REPO:4.7.2-20250408-windowsservercore-ltsc2019 +FROM $REPO:4.7.2-20250708-windowsservercore-ltsc2019 # Install Windows components required for WCF service hosted on IIS RUN Add-WindowsFeature NET-WCF-TCP-Activation45; ` diff --git a/src/wcf/4.7/windowsservercore-ltsc2016/Dockerfile b/src/wcf/4.7/windowsservercore-ltsc2016/Dockerfile index 1729bc9a1..2a3e4b1e0 100644 --- a/src/wcf/4.7/windowsservercore-ltsc2016/Dockerfile +++ b/src/wcf/4.7/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/aspnet -FROM $REPO:4.7-20250408-windowsservercore-ltsc2016 +FROM $REPO:4.7-20250708-windowsservercore-ltsc2016 # Install Windows components required for WCF service hosted on IIS RUN Add-WindowsFeature NET-WCF-TCP-Activation45; ` diff --git a/src/wcf/4.8.1/windowsservercore-ltsc2022/Dockerfile b/src/wcf/4.8.1/windowsservercore-ltsc2022/Dockerfile index a5e6a6d94..184011969 100644 --- a/src/wcf/4.8.1/windowsservercore-ltsc2022/Dockerfile +++ b/src/wcf/4.8.1/windowsservercore-ltsc2022/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/aspnet -FROM $REPO:4.8.1-20250408-windowsservercore-ltsc2022 +FROM $REPO:4.8.1-20250708-windowsservercore-ltsc2022 # Install Windows components required for WCF service hosted on IIS RUN dism /Online /Quiet /Enable-Feature /All /FeatureName:WCF-HTTP-Activation45 /FeatureName:WCF-TCP-Activation45 /FeatureName:IIS-WebSockets diff --git a/src/wcf/4.8.1/windowsservercore-ltsc2025/Dockerfile b/src/wcf/4.8.1/windowsservercore-ltsc2025/Dockerfile index c52344b73..088dadef1 100644 --- a/src/wcf/4.8.1/windowsservercore-ltsc2025/Dockerfile +++ b/src/wcf/4.8.1/windowsservercore-ltsc2025/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/aspnet -FROM $REPO:4.8.1-20250408-windowsservercore-ltsc2025 +FROM $REPO:4.8.1-20250708-windowsservercore-ltsc2025 # Install Windows components required for WCF service hosted on IIS RUN dism /Online /Quiet /Enable-Feature /All /FeatureName:WCF-HTTP-Activation45 /FeatureName:WCF-TCP-Activation45 /FeatureName:IIS-WebSockets diff --git a/src/wcf/4.8/windowsservercore-ltsc2016/Dockerfile b/src/wcf/4.8/windowsservercore-ltsc2016/Dockerfile index f239fbeef..3e0e94635 100644 --- a/src/wcf/4.8/windowsservercore-ltsc2016/Dockerfile +++ b/src/wcf/4.8/windowsservercore-ltsc2016/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/aspnet -FROM $REPO:4.8-20250408-windowsservercore-ltsc2016 +FROM $REPO:4.8-20250708-windowsservercore-ltsc2016 # Install Windows components required for WCF service hosted on IIS RUN Add-WindowsFeature NET-WCF-TCP-Activation45; ` diff --git a/src/wcf/4.8/windowsservercore-ltsc2019/Dockerfile b/src/wcf/4.8/windowsservercore-ltsc2019/Dockerfile index 0d29b5725..3dda5b8f8 100644 --- a/src/wcf/4.8/windowsservercore-ltsc2019/Dockerfile +++ b/src/wcf/4.8/windowsservercore-ltsc2019/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/aspnet -FROM $REPO:4.8-20250408-windowsservercore-ltsc2019 +FROM $REPO:4.8-20250708-windowsservercore-ltsc2019 # Install Windows components required for WCF service hosted on IIS RUN Add-WindowsFeature NET-WCF-TCP-Activation45; ` diff --git a/src/wcf/4.8/windowsservercore-ltsc2022/Dockerfile b/src/wcf/4.8/windowsservercore-ltsc2022/Dockerfile index fc37f1b70..0ad047045 100644 --- a/src/wcf/4.8/windowsservercore-ltsc2022/Dockerfile +++ b/src/wcf/4.8/windowsservercore-ltsc2022/Dockerfile @@ -1,7 +1,7 @@ # escape=` ARG REPO=mcr.microsoft.com/dotnet/framework/aspnet -FROM $REPO:4.8-20250408-windowsservercore-ltsc2022 +FROM $REPO:4.8-20250708-windowsservercore-ltsc2022 # Install Windows components required for WCF service hosted on IIS RUN dism /Online /Quiet /Enable-Feature /All /FeatureName:WCF-HTTP-Activation45 /FeatureName:WCF-TCP-Activation45 /FeatureName:IIS-WebSockets diff --git a/tests/Microsoft.DotNet.Framework.Docker.Tests/TestData.cs b/tests/Microsoft.DotNet.Framework.Docker.Tests/TestData.cs index 1d030ec66..ec0281267 100644 --- a/tests/Microsoft.DotNet.Framework.Docker.Tests/TestData.cs +++ b/tests/Microsoft.DotNet.Framework.Docker.Tests/TestData.cs @@ -12,7 +12,6 @@ internal static class TestData new ImageDescriptor { Version = "3.5", SdkVersion = "3.5", OsVariant = OsVersion.WSC_LTSC2016 }, new ImageDescriptor { Version = "3.5", SdkVersion = "3.5", OsVariant = OsVersion.WSC_LTSC2019 }, new ImageDescriptor { Version = "3.5", SdkVersion = "3.5", OsVariant = OsVersion.WSC_LTSC2022 }, - new ImageDescriptor { Version = "3.5", SdkVersion = "3.5", OsVariant = OsVersion.WSC_LTSC2025 }, new ImageDescriptor { Version = "4.6.2", SdkVersion = "4.8", OsVariant = OsVersion.WSC_LTSC2016 }, new ImageDescriptor { Version = "4.7", SdkVersion = "4.8", OsVariant = OsVersion.WSC_LTSC2016 }, new ImageDescriptor { Version = "4.7.1", SdkVersion = "4.8", OsVariant = OsVersion.WSC_LTSC2016 },