diff --git a/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-branch-push.yaml b/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-branch-push.yaml index 74724afbb..26bdd3587 100644 --- a/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-branch-push.yaml +++ b/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-branch-push.yaml @@ -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 @@ -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 diff --git a/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-pr.yaml b/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-pr.yaml index 1bfe1e792..399b67715 100644 --- a/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-pr.yaml +++ b/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-pr.yaml @@ -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-pr - ref: ce-context @@ -66,9 +70,18 @@ spec: - { 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 diff --git a/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-tag-create.yaml b/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-tag-create.yaml index 6ca199554..9ee29255e 100644 --- a/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-tag-create.yaml +++ b/apps/prod/tekton/configs/triggers/triggers/_/fake-github/fake-github-tag-create.yaml @@ -11,56 +11,60 @@ 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 @@ -68,9 +72,18 @@ spec: - { 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 diff --git a/apps/prod/tekton/configs/triggers/triggers/_/harbor/artifact-push-on-harbor.yaml b/apps/prod/tekton/configs/triggers/triggers/_/harbor/artifact-push-on-harbor.yaml index b27454602..f080a096f 100644 --- a/apps/prod/tekton/configs/triggers/triggers/_/harbor/artifact-push-on-harbor.yaml +++ b/apps/prod/tekton/configs/triggers/triggers/_/harbor/artifact-push-on-harbor.yaml @@ -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)$') @@ -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)$') diff --git a/apps/prod/tekton/configs/triggers/triggers/kustomization.yaml b/apps/prod/tekton/configs/triggers/triggers/kustomization.yaml index eda8c9b44..262d66e1b 100644 --- a/apps/prod/tekton/configs/triggers/triggers/kustomization.yaml +++ b/apps/prod/tekton/configs/triggers/triggers/kustomization.yaml @@ -18,6 +18,7 @@ resources: - pingcap/advanced-statefulset/git-push.yaml - pingcap/monitoring/git-push.yaml - pingcap/ng-monitoring/git-push.yaml + - pingcap/ticdc/git-push.yaml - pingcap/tidb-binlog/git-push.yaml - pingcap/tidb-ctl/git-create-tag.yaml - pingcap/tidb-ctl/git-push.yaml diff --git a/apps/prod/tekton/configs/triggers/triggers/pingcap/_/git-create-branch.yaml b/apps/prod/tekton/configs/triggers/triggers/pingcap/_/git-create-branch.yaml index 1dada0b1b..8fdf5bbda 100644 --- a/apps/prod/tekton/configs/triggers/triggers/pingcap/_/git-create-branch.yaml +++ b/apps/prod/tekton/configs/triggers/triggers/pingcap/_/git-create-branch.yaml @@ -16,6 +16,7 @@ spec: 'pingcap/tidb', 'pingcap/tiflash', 'pingcap/tiflow', + 'pingcap/ticdc', 'pingcap/tidb-binlog', 'pingcap/tidb-dashboard', 'pingcap/tidb-tools', diff --git a/apps/prod/tekton/configs/triggers/triggers/pingcap/_/git-create-tag.yaml b/apps/prod/tekton/configs/triggers/triggers/pingcap/_/git-create-tag.yaml index 3c7a6d8c7..028156b56 100644 --- a/apps/prod/tekton/configs/triggers/triggers/pingcap/_/git-create-tag.yaml +++ b/apps/prod/tekton/configs/triggers/triggers/pingcap/_/git-create-tag.yaml @@ -12,9 +12,12 @@ spec: params: - name: filter value: >- - body.repository.owner.login == 'pingcap' - && - body.repository.name in ['monitoring', 'ng-monitoring', 'tidb-binlog', 'tidb-dashboard'] + body.repository.full_name in [ + 'pingcap/monitoring', + 'pingcap/ng-monitoring', + 'pingcap/tidb-binlog', + 'pingcap/tidb-dashboard', + ] && body.ref.matches('^v[0-9]+[.][0-9]+[.][0-9]+(-alpha)?$') bindings: diff --git a/apps/prod/tekton/configs/triggers/triggers/pingcap/ticdc/git-push.yaml b/apps/prod/tekton/configs/triggers/triggers/pingcap/ticdc/git-push.yaml new file mode 100644 index 000000000..387dcfcb7 --- /dev/null +++ b/apps/prod/tekton/configs/triggers/triggers/pingcap/ticdc/git-push.yaml @@ -0,0 +1,32 @@ +apiVersion: triggers.tekton.dev/v1beta1 +kind: Trigger +metadata: + name: git-push-pingcap-ticdc + labels: + type: github-branch-push + github-owner: pingcap + github-repo: ticdc +spec: + interceptors: + - name: filter on repo owner and name and branches + ref: { name: cel } + params: + - name: filter + # support branches: + # - master + # - release-6.1, release-6.5, release-7.1, release-7.5 + value: >- + body.repository.full_name == 'pingcap/ticdc' + && + body.ref.matches('^refs/heads/(master|release-[0-9]+[.][0-9]+)$') + + bindings: + - ref: github-branch-push + - { name: component, value: $(body.repository.name) } + - { name: profile, value: release } + - { name: timeout, value: 20m } + - { name: source-ws-size, value: 50Gi } + - { name: builder-resources-memory, value: 16Gi } + - { name: builder-resources-cpu, value: "4" } + template: + ref: build-component-all-platforms