Skip to content

Conversation

@arturcic
Copy link
Member

This pull request updates the build and test scripts to consistently use the latest supported .NET LTS version and the latest supported Docker distribution when specified. It introduces new constants for these "latest" values and updates logic and run configurations to recognize and substitute the new keywords (lts-latest and distro-latest) for the correct version identifiers. This ensures that builds and tests will always use the most recent LTS .NET and Docker images when requested, improving maintainability and future-proofing the build system.

Build and Docker configuration improvements:

  • Updated all run configuration XML files under build/.run/ to accept --dotnet_version=lts-latest and --docker_distro=distro-latest parameters, replacing hardcoded version and distro values. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Constants and version handling:

  • Introduced new constant DotnetLtsLatest in Constants.cs and replaced usages of VersionLatest with this new constant throughout the codebase. Also updated arrays and logic to use the new constant for LTS version handling.
  • Updated logic in build lifetimes (BuildLifetime.cs, BuildLifetimeBase.cs, BuildPrepare.cs, PackagePrepare.cs, UnitTest.cs, DockerContextExtensions.cs, Docker/BuildLifetime.cs, ContextExtensions.cs) to recognize lts-latest and distro-latest as special keywords and substitute them with the correct version/distro values. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Codebase consistency and maintainability:

  • Ensured all places where .NET or Docker versions are referenced now use the new constants and logic, reducing the risk of mismatches and simplifying future upgrades. (All references above)

These changes make it easier to keep the build infrastructure up to date with the latest supported platforms and simplify the process for developers to use the newest LTS versions.

Abstracts common docker build setup logic into `DockerBuildContext` and `DockerBuildLifetime` base classes. Simplifies `BuildContext` and `BuildLifetime` implementations in `artifacts` and `docker` by reusing the shared base classes.
@arturcic arturcic marked this pull request as ready for review October 26, 2025 23:41
Copilot AI review requested due to automatic review settings October 26, 2025 23:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces a standardized approach for specifying .NET and Docker versions using "latest" keywords (lts-latest and distro-latest) instead of hardcoded version strings, improving maintainability and ensuring builds automatically use the most recent supported versions.

Key changes:

  • Renamed constant from VersionLatest to DotnetLtsLatest for clarity
  • Added logic to recognize and substitute lts-latest and distro-latest keywords with actual version values
  • Consolidated Docker build setup code by introducing shared DockerBuildLifetime and DockerBuildContext base classes

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
build/common/Utilities/Constants.cs Renamed constant from VersionLatest to DotnetLtsLatest
build/common/Lifetime/DockerBuildLifetime.cs New base class with logic to handle lts-latest and distro-latest keywords
build/common/Context/DockerBuildContext.cs New shared context class for Docker-related build properties
build/docker/BuildLifetime.cs Refactored to inherit from DockerBuildLifetime
build/artifacts/BuildLifetime.cs Refactored to inherit from DockerBuildLifetime
build/build/Tasks/Test/UnitTest.cs Added keyword substitution logic for lts-latest
build/.run/*.run.xml Updated run configurations to use new keywords
build/docker/Dockerfile Updated VERSION argument (unrelated version bump)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 26, 2025

Quality Gate Passed Quality Gate passed

Issues
0 New issues
2 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@arturcic arturcic added this to the 6.x milestone Oct 26, 2025
@arturcic arturcic added the build label Oct 26, 2025
@arturcic arturcic merged commit 51a4fb0 into GitTools:main Oct 27, 2025
85 checks passed
@mergify
Copy link
Contributor

mergify bot commented Oct 27, 2025

Thank you @arturcic for your contribution!

@arturcic arturcic modified the milestones: 6.x, 6.5.0 Nov 5, 2025
@gittools-bot
Copy link
Contributor

🎉 This issue has been resolved in version 6.5.0 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants