Commit
3c3e9f56093d0a23651a0f6014828f718f12de98
by noreplychore(tekton/v1): add release-8.5 branch and tag support for pingcap/ticdc next-gen builds (#3840)
## Overview
This PR enables building and pushing next-gen artifacts for
`pingcap/ticdc` on the `release-8.5` branch and on tags, as requested in
the issue.
## Changes
Created standalone trigger files for `pingcap/ticdc` in
`tekton/v1/triggers/triggers/pingcap/ticdc/`:
1. **`git-push-branch-build-ng.yaml`** - Handles branch push events for
the `release-8.5` branch, `master`, and `release-nextgen-*` branches
specifically for the `pingcap/ticdc` repository.
2. **`git-create-tag-build-ng.yaml`** - Handles tag creation events for
`pingcap/ticdc` to support both nextgen tags and hotfix tags in the
range [v8.5.4-9, ∞).
3. **`kustomization.yaml`** - Updated to include the new standalone
trigger files.
### Implementation Approach
The triggers are implemented as standalone files following the same
pattern as the existing `tikv/tikv` triggers, rather than modifying
shared trigger files. This approach:
- Isolates ticdc-specific configuration
- Avoids impacting other repositories
- Makes maintenance easier
### Branch Trigger
Matches the following branch patterns for `pingcap/ticdc`:
```yaml
body.repository.full_name == 'pingcap/ticdc'
&&
body.ref.matches('^refs/heads/(master|release-nextgen-[0-9]+|release-8\.5)$')
```
### Tag Trigger
Supports two tag formats for `pingcap/ticdc`:
- **Nextgen tags**: `v*.*.*-nextgen.YYMMDD.N` (e.g.,
`v8.5.0-nextgen.241022.1`)
- **Hotfix tags >= v8.5.4-9**: `vX.Y.Z-N` where version >= 8.5.4-9
(e.g., `v8.5.4-9`, `v8.5.5-1`, `v9.0.0-1`)
## Functionality
With this change:
1. **Branch builds**: Pushes to the `release-8.5`, `master`, and
`release-nextgen-*` branches in `pingcap/ticdc` will trigger next-gen
artifact builds
2. **Tag builds**:
- Nextgen tags with pattern `v*.*.*-nextgen.YYMMDD.N`
- Hotfix/build tags in range [v8.5.4-9, ∞) with pattern `vX.Y.Z-N`
### Supported Tag Examples
✅ Will trigger builds:
- `v8.5.4-9`, `v8.5.4-10` (exact and above threshold)
- `v8.5.5-1`, `v8.6.0-1` (higher patch/minor versions)
- `v9.0.0-1` and all future versions
- `v8.5.0-nextgen.241022.1` (nextgen format)
✗ Won't trigger builds:
- `v8.5.4-8` (below threshold)
- `v8.5.3-10` (patch version too low)
## Build Configuration
When triggered, builds will use:
- Profile: `next-gen`
- Registry: `us-docker.pkg.dev/pingcap-testing-account/hub`
- Resources: 4 CPU, 16Gi memory, 50Gi workspace
- Timeout: 20 minutes
- Architectures: amd64 and arm64
## Validation
- ✅ YAML syntax validated
- ✅ Branch pattern tested: correctly matches `release-8.5`, `master`,
and `release-nextgen-*` for ticdc
- ✅ Tag patterns verified: supports both nextgen and hotfix tag formats
- ✅ Version comparison logic tested with 12 test cases
- ✅ Standalone files follow existing pattern (tikv/tikv)
- ✅ No impact on other repositories
Fixes PingCAP-QE/ci#3838
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>[Next-Gen] build and push next-gen artifacts for
`pingcap/ticdc` on `release-8.5` branch and on tags.</issue_title>
> <issue_description></issue_description>
>
> <agent_instructions>implement it in `tekton/v1`
folder</agent_instructions>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
Fixes PingCAP-QE/ci#3838
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute
survey](https://survey3.medallia.com/?EAHeSx-AP01bZqG0Ld9QLQ).
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wuhuizuo <2574558+wuhuizuo@users.noreply.github.com>
Co-authored-by: wuhuizuo <wuhuizuo@126.com>
(commit: 3c3e9f5)