Skip to content

Commit

Permalink
build(pingcap/ticdc): add build triggers (#1402)
Browse files Browse the repository at this point in the history
This pull request includes updates to several Tekton configuration files
to add support for the `pingcap/ticdc` repository. The changes involve
adding `pingcap/ticdc` to various filters and updating resource
specifications for the repository.

Key changes include:

### Adding `pingcap/ticdc` to filters:
*
[`apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-branch-push.yaml`](diffhunk://#diff-568be39468441f09f11d91d4c71d77c96952fb478d3695735af6b02f24cb8969L14-R20):
Added `pingcap/ticdc` to the repository filter and updated resource
specifications for timeout, source-ws-size, builder-resources-cpu, and
builder-resources-memory.
[[1]](diffhunk://#diff-568be39468441f09f11d91d4c71d77c96952fb478d3695735af6b02f24cb8969L14-R20)
[[2]](diffhunk://#diff-568be39468441f09f11d91d4c71d77c96952fb478d3695735af6b02f24cb8969R31)
[[3]](diffhunk://#diff-568be39468441f09f11d91d4c71d77c96952fb478d3695735af6b02f24cb8969R42)
[[4]](diffhunk://#diff-568be39468441f09f11d91d4c71d77c96952fb478d3695735af6b02f24cb8969R53)
*
[`apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-pr.yaml`](diffhunk://#diff-16116bc799a164aec2da92871c9b9f6e55fc88587d954afb5d13c261f014fefcL14-R20):
Added `pingcap/ticdc` to the repository filter and updated resource
specifications for timeout, source-ws-size, builder-resources-cpu, and
builder-resources-memory.
[[1]](diffhunk://#diff-16116bc799a164aec2da92871c9b9f6e55fc88587d954afb5d13c261f014fefcL14-R20)
[[2]](diffhunk://#diff-16116bc799a164aec2da92871c9b9f6e55fc88587d954afb5d13c261f014fefcR31)
[[3]](diffhunk://#diff-16116bc799a164aec2da92871c9b9f6e55fc88587d954afb5d13c261f014fefcR42)
[[4]](diffhunk://#diff-16116bc799a164aec2da92871c9b9f6e55fc88587d954afb5d13c261f014fefcR53)
*
[`apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-tag-create.yaml`](diffhunk://#diff-91cd5bc58ced2d97dfd4052e5009edbe7fffbe44f7427f2bb0a0d084636dc615L14-R22):
Added `pingcap/ticdc` to the repository filter and updated resource
specifications for timeout, source-ws-size, builder-resources-cpu, and
builder-resources-memory.
[[1]](diffhunk://#diff-91cd5bc58ced2d97dfd4052e5009edbe7fffbe44f7427f2bb0a0d084636dc615L14-R22)
[[2]](diffhunk://#diff-91cd5bc58ced2d97dfd4052e5009edbe7fffbe44f7427f2bb0a0d084636dc615R33)
[[3]](diffhunk://#diff-91cd5bc58ced2d97dfd4052e5009edbe7fffbe44f7427f2bb0a0d084636dc615R44)
[[4]](diffhunk://#diff-91cd5bc58ced2d97dfd4052e5009edbe7fffbe44f7427f2bb0a0d084636dc615R55)
*
[`apps/prod/tekton/configs/triggers/triggers/pingcap/_/git-create-branch.yaml`](diffhunk://#diff-9ddef8103f3cf2e639a5b0e93a7ad4530d28df90305b47ab5af9e861bb22aa38R19):
Updated repository filter to use `body.repository.full_name`.
*
[`apps/prod/tekton/configs/triggers/triggers/pingcap/_/git-create-tag.yaml`](diffhunk://#diff-2097aacd14bf070cf62cf28ef32eebed0c578e8304018a44d0dc358b8077c91bL15-R20):
Updated repository filter to use `body.repository.full_name`.

### New configuration for `pingcap/ticdc`:
*
[`apps/prod/tekton/configs/triggers/triggers/pingcap/ticdc/git-push.yaml`](diffhunk://#diff-d257e1812c73bd9af64b8bd869e047e0ca005d582cf296709afdba42d6f66328R1-R32):
Added a new trigger configuration for `pingcap/ticdc` to handle Git push
events.

### General updates:
*
[`apps/prod/tekton/configs/triggers/triggers/kustomization.yaml`](diffhunk://#diff-9e987d6a977b5e794b91feff8d5f43c02c6113ba625f9a545a16845de78e456eR21):
Included `pingcap/ticdc/git-push.yaml` in the resources list.

These changes ensure that the `pingcap/ticdc` repository is properly
integrated into the Tekton pipeline configurations, allowing it to be
processed similarly to other repositories in the `pingcap` organization.

---------

Signed-off-by: wuhuizuo <[email protected]>
  • Loading branch information
wuhuizuo authored Jan 9, 2025
1 parent bb96f4c commit 0128e25
Show file tree
Hide file tree
Showing 8 changed files with 224 additions and 151 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,54 +11,58 @@ spec:
params:
- name: filter
value: >-
body.repository.full_name in ['pingcap/tidb', 'pingcap/tiflow', 'pingcap/tiflash', 'pingcap/tidb-dashboard', 'tikv/tikv', 'tikv/pd']
body.repository.full_name in ['pingcap/ticdc', 'pingcap/tidb', 'pingcap/tiflow', 'pingcap/tiflash', 'pingcap/tidb-dashboard', 'tikv/tikv', 'tikv/pd']
- name: overlays
value:
- key: timeout
expression: >-
{
'pingcap/tidb': '40m',
'pingcap/tiflash': '2h',
'pingcap/tiflow': '40m',
'pingcap/tidb-dashboard': '40m',
'tikv/pd': '40m',
'tikv/tikv': '2h30m',
}[body.repository.full_name]
- key: source-ws-size
expression: >-
{
'pingcap/tidb': '50Gi',
'pingcap/tiflash': '100Gi',
'pingcap/tiflow': '50Gi',
'pingcap/tidb-dashboard': '8Gi',
'tikv/pd': '50Gi',
'tikv/tikv': '100Gi',
}[body.repository.full_name]
- key: builder-resources-cpu
expression: >-
{
'pingcap/tidb': '8',
'pingcap/tiflash': '16',
'pingcap/tiflow': '8',
'pingcap/tidb-dashboard': '2',
'tikv/pd': '8',
'tikv/tikv': '16',
}[body.repository.full_name]
- key: builder-resources-memory
expression: >-
{
'pingcap/tidb': '32Gi',
'pingcap/tiflash': '64Gi',
'pingcap/tiflow': '32Gi',
'pingcap/tidb-dashboard': '4Gi',
'tikv/pd': '32Gi',
'tikv/tikv': '64Gi',
}[body.repository.full_name]
- key: custom-params
expression: >-
{
'builder-image': header.canonical('ce-paramBuilderImage')
}
- key: timeout
expression: >-
{
'pingcap/ticdc': '20m',
'pingcap/tidb': '40m',
'pingcap/tiflash': '2h',
'pingcap/tiflow': '40m',
'pingcap/tidb-dashboard': '40m',
'tikv/pd': '40m',
'tikv/tikv': '2h30m',
}[body.repository.full_name]
- key: source-ws-size
expression: >-
{
'pingcap/ticdc': '50Gi',
'pingcap/tidb': '50Gi',
'pingcap/tiflash': '100Gi',
'pingcap/tiflow': '50Gi',
'pingcap/tidb-dashboard': '8Gi',
'tikv/pd': '50Gi',
'tikv/tikv': '100Gi',
}[body.repository.full_name]
- key: builder-resources-cpu
expression: >-
{
'pingcap/ticdc': '4',
'pingcap/tidb': '8',
'pingcap/tiflash': '16',
'pingcap/tiflow': '8',
'pingcap/tidb-dashboard': '2',
'tikv/pd': '8',
'tikv/tikv': '16',
}[body.repository.full_name]
- key: builder-resources-memory
expression: >-
{
'pingcap/ticdc': '16Gi',
'pingcap/tidb': '32Gi',
'pingcap/tiflash': '64Gi',
'pingcap/tiflow': '32Gi',
'pingcap/tidb-dashboard': '4Gi',
'tikv/pd': '32Gi',
'tikv/tikv': '64Gi',
}[body.repository.full_name]
- key: custom-params
expression: >-
{
'builder-image': header.canonical('ce-paramBuilderImage')
}
bindings:
- ref: github-branch-push
- ref: ce-context
Expand All @@ -67,8 +71,14 @@ spec:
- { name: timeout, value: $(extensions.timeout) }
- { name: source-ws-size, value: $(extensions.source-ws-size) }
- { name: builder-resources-cpu, value: $(extensions.builder-resources-cpu) }
- { name: builder-resources-memory, value: $(extensions.builder-resources-memory) }
- {
name: builder-resources-memory,
value: $(extensions.builder-resources-memory),
}
- { name: registry, value: hub.pingcap.net/devbuild }
- { name: force-builder-image, value: $(extensions.custom-params.builder-image) }
- {
name: force-builder-image,
value: $(extensions.custom-params.builder-image),
}
template:
ref: build-component-all-platforms
Original file line number Diff line number Diff line change
Expand Up @@ -11,64 +11,77 @@ spec:
params:
- name: filter
value: >-
body.repository.full_name in ['pingcap/tidb', 'pingcap/tiflow', 'pingcap/tiflash', 'pingcap/tidb-dashboard', 'tikv/tikv', 'tikv/pd']
body.repository.full_name in ['pingcap/ticdc', 'pingcap/tidb', 'pingcap/tiflow', 'pingcap/tiflash', 'pingcap/tidb-dashboard', 'tikv/tikv', 'tikv/pd']
- name: overlays
value:
- key: timeout
expression: >-
{
'pingcap/tidb': '40m',
'pingcap/tiflash': '2h',
'pingcap/tiflow': '40m',
'pingcap/tidb-dashboard': '40m',
'tikv/pd': '40m',
'tikv/tikv': '2h30m',
}[body.repository.full_name]
- key: source-ws-size
expression: >-
{
'pingcap/tidb': '50Gi',
'pingcap/tiflash': '100Gi',
'pingcap/tiflow': '50Gi',
'pingcap/tidb-dashboard': '8Gi',
'tikv/pd': '50Gi',
'tikv/tikv': '100Gi',
}[body.repository.full_name]
- key: builder-resources-cpu
expression: >-
{
'pingcap/tidb': '8',
'pingcap/tiflash': '16',
'pingcap/tiflow': '8',
'pingcap/tidb-dashboard': '2',
'tikv/pd': '8',
'tikv/tikv': '16',
}[body.repository.full_name]
- key: builder-resources-memory
expression: >-
{
'pingcap/tidb': '32Gi',
'pingcap/tiflash': '64Gi',
'pingcap/tiflow': '32Gi',
'pingcap/tidb-dashboard': '4Gi',
'tikv/pd': '32Gi',
'tikv/tikv': '64Gi',
}[body.repository.full_name]
- key: custom-params
expression: >-
{
'builder-image': header.canonical('ce-paramBuilderImage')
}
- key: timeout
expression: >-
{
'pingcap/ticdc': '20m',
'pingcap/tidb': '40m',
'pingcap/tiflash': '2h',
'pingcap/tiflow': '40m',
'pingcap/tidb-dashboard': '40m',
'tikv/pd': '40m',
'tikv/tikv': '2h30m',
}[body.repository.full_name]
- key: source-ws-size
expression: >-
{
'pingcap/ticdc': '50Gi',
'pingcap/tidb': '50Gi',
'pingcap/tiflash': '100Gi',
'pingcap/tiflow': '50Gi',
'pingcap/tidb-dashboard': '8Gi',
'tikv/pd': '50Gi',
'tikv/tikv': '100Gi',
}[body.repository.full_name]
- key: builder-resources-cpu
expression: >-
{
'pingcap/ticdc': '4',
'pingcap/tidb': '8',
'pingcap/tiflash': '16',
'pingcap/tiflow': '8',
'pingcap/tidb-dashboard': '2',
'tikv/pd': '8',
'tikv/tikv': '16',
}[body.repository.full_name]
- key: builder-resources-memory
expression: >-
{
'pingcap/ticdc': '16Gi',
'pingcap/tidb': '32Gi',
'pingcap/tiflash': '64Gi',
'pingcap/tiflow': '32Gi',
'pingcap/tidb-dashboard': '4Gi',
'tikv/pd': '32Gi',
'tikv/tikv': '64Gi',
}[body.repository.full_name]
- key: custom-params
expression: >-
{
'builder-image': header.canonical('ce-paramBuilderImage')
}
bindings:
- ref: github-pr
- ref: ce-context
- { name: component, value: $(body.repository.name) }
- { name: profile, value: release }
- { name: timeout, value: $(extensions.timeout) }
- { name: source-ws-size, value: $(extensions.source-ws-size) }
- { name: builder-resources-cpu, value: $(extensions.builder-resources-cpu) }
- { name: builder-resources-memory, value: $(extensions.builder-resources-memory) }
- {
name: builder-resources-cpu,
value: $(extensions.builder-resources-cpu),
}
- {
name: builder-resources-memory,
value: $(extensions.builder-resources-memory),
}
- { name: registry, value: hub.pingcap.net/devbuild }
- { name: force-builder-image, value: $(extensions.custom-params.builder-image) }
- {
name: force-builder-image,
value: $(extensions.custom-params.builder-image),
}
template:
ref: build-component-all-platforms
Original file line number Diff line number Diff line change
Expand Up @@ -11,66 +11,79 @@ spec:
params:
- name: filter
value: >-
body.repository.full_name in ['pingcap/tidb', 'pingcap/tiflow', 'pingcap/tiflash', 'pingcap/tidb-dashboard', 'tikv/tikv', 'tikv/pd']
body.repository.full_name in ['pingcap/ticdc', 'pingcap/tidb', 'pingcap/tiflow', 'pingcap/tiflash', 'pingcap/tidb-dashboard', 'tikv/tikv', 'tikv/pd']
&&
body.ref.matches('^v[0-9]+[.][0-9]+[.][0-9]+$')
- name: overlays
value:
- key: timeout
expression: >-
{
'pingcap/tidb': '40m',
'pingcap/tiflash': '2h',
'pingcap/tiflow': '40m',
'pingcap/tidb-dashboard': '40m',
'tikv/pd': '40m',
'tikv/tikv': '2h30m',
}[body.repository.full_name]
- key: source-ws-size
expression: >-
{
'pingcap/tidb': '50Gi',
'pingcap/tiflash': '100Gi',
'pingcap/tiflow': '50Gi',
'pingcap/tidb-dashboard': '8Gi',
'tikv/pd': '50Gi',
'tikv/tikv': '100Gi',
}[body.repository.full_name]
- key: builder-resources-cpu
expression: >-
{
'pingcap/tidb': '8',
'pingcap/tiflash': '16',
'pingcap/tiflow': '8',
'pingcap/tidb-dashboard': '2',
'tikv/pd': '8',
'tikv/tikv': '16',
}[body.repository.full_name]
- key: builder-resources-memory
expression: >-
{
'pingcap/tidb': '32Gi',
'pingcap/tiflash': '64Gi',
'pingcap/tiflow': '32Gi',
'pingcap/tidb-dashboard': '4Gi',
'tikv/pd': '32Gi',
'tikv/tikv': '64Gi',
}[body.repository.full_name]
- key: custom-params
expression: >-
{
'builder-image': header.canonical('ce-paramBuilderImage')
}
- key: timeout
expression: >-
{
'pingcap/ticdc': '20m',
'pingcap/tidb': '40m',
'pingcap/tiflash': '2h',
'pingcap/tiflow': '40m',
'pingcap/tidb-dashboard': '40m',
'tikv/pd': '40m',
'tikv/tikv': '2h30m',
}[body.repository.full_name]
- key: source-ws-size
expression: >-
{
'pingcap/ticdc': '50Gi',
'pingcap/tidb': '50Gi',
'pingcap/tiflash': '100Gi',
'pingcap/tiflow': '50Gi',
'pingcap/tidb-dashboard': '8Gi',
'tikv/pd': '50Gi',
'tikv/tikv': '100Gi',
}[body.repository.full_name]
- key: builder-resources-cpu
expression: >-
{
'pingcap/ticdc': '4',
'pingcap/tidb': '8',
'pingcap/tiflash': '16',
'pingcap/tiflow': '8',
'pingcap/tidb-dashboard': '2',
'tikv/pd': '8',
'tikv/tikv': '16',
}[body.repository.full_name]
- key: builder-resources-memory
expression: >-
{
'pingcap/ticdc': '16Gi',
'pingcap/tidb': '32Gi',
'pingcap/tiflash': '64Gi',
'pingcap/tiflow': '32Gi',
'pingcap/tidb-dashboard': '4Gi',
'tikv/pd': '32Gi',
'tikv/tikv': '64Gi',
}[body.repository.full_name]
- key: custom-params
expression: >-
{
'builder-image': header.canonical('ce-paramBuilderImage')
}
bindings:
- ref: github-tag-create
- ref: ce-context
- { name: component, value: $(body.repository.name) }
- { name: profile, value: release }
- { name: timeout, value: $(extensions.timeout) }
- { name: source-ws-size, value: $(extensions.source-ws-size) }
- { name: builder-resources-cpu, value: $(extensions.builder-resources-cpu) }
- { name: builder-resources-memory, value: $(extensions.builder-resources-memory) }
- {
name: builder-resources-cpu,
value: $(extensions.builder-resources-cpu),
}
- {
name: builder-resources-memory,
value: $(extensions.builder-resources-memory),
}
- { name: registry, value: hub.pingcap.net/devbuild }
- { name: force-builder-image, value: $(extensions.custom-params.builder-image) }
- {
name: force-builder-image,
value: $(extensions.custom-params.builder-image),
}
template:
ref: build-component-all-platforms
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
- name: filter
value: >-
body.event_data.repository.repo_full_name.matches('^(pingcap|tikv)/')
&&
&&
body.event_data.repository.repo_full_name.matches('/package(s)?')
&&
body.event_data.resources[0].tag.matches('^(master|main|v[0-9]+[.][0-9]+[.][0-9]+)_(darwin|linux)_(amd64|arm64)$')
Expand All @@ -39,7 +39,7 @@ spec:
- name: filter
value: >-
body.event_data.repository.repo_full_name.matches('^(pingcap|tikv)/')
&&
&&
body.event_data.repository.repo_full_name.matches('/package(s)?')
&&
body.event_data.resources[0].tag.matches('^(release-[0-9]+[.][0-9]+)_(linux|darwin)_(amd64|arm64)$')
Expand Down
Loading

0 comments on commit 0128e25

Please sign in to comment.