Commit
58a3c7b1b4e6f97e7b5c2004e341a444025c0fe8
by noreplyfeat: support builds for nextgen with git tag events (#3827)
This pull request introduces enhanced support for handling "nextgen"
pre-release tags and improves branch/tag resolution logic in both the
versioning strategy scripts and Tekton pipeline tasks. The changes
ensure that "nextgen" tags are properly recognized in release workflows
and that version tags are mapped to their most relevant containing
branch during pipeline execution.
**Versioning logic improvements:**
* Updated the `isReleaseBranch` function in `versioning-strategy.ts` to
recognize both standard and `nextgen` release branches, ensuring correct
identification for workflows involving these branches.
* Added logic to the `compute` function in `versioning-strategy.ts` to
explicitly handle `nextgen` pre-release tags, logging and skipping
further processing for these versions as intended.
* Expanded unit tests in `versioning-strategy.test.ts` to cover
scenarios involving `nextgen` tags on release and master branches, as
well as commits after such tags, improving test coverage.
**Tekton pipeline enhancements:**
* Improved the tag deletion logic in
`pingcap-get-set-release-version-v2.yaml` (both `v0` and `v1`) to
recognize and clean up `nextgen` tags, aligning with updated versioning
conventions.
[[1]](diffhunk://#diff-9904c8dfc5da304d83fed6591586b52d82f83f304bd7641f083791d98fb20451R40-R46)
[[2]](diffhunk://#diff-73a92c7100c05352eb4ee75aaa7114a55cb9ef1ef978218f79bc2b9ad422dbacR40-R46)
* Enhanced the branch resolution logic in `pingcap-git-clone-ext.yaml`
(both `v0` and `v1`) to intelligently map version tags to their
containing branch based on a priority order: exact minor release branch,
any release branch, master/main, or fallback to the tag itself. This
ensures more accurate context for builds triggered by tags.
[[1]](diffhunk://#diff-903e1ace50bb7ba99a3b822e016174019d13883ff31dcba175b633a96334936dR149-L149)
[[2]](diffhunk://#diff-651d163fcc0cbe7eab6f7fda672810ca1a0b2809822f43b595fe32482853a6ebR149-L150)
(commit: 58a3c7b)