-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Why: - tidb-ctl only build for master branch --------- Signed-off-by: lijie <[email protected]>
- Loading branch information
lijie
authored
Feb 7, 2024
1 parent
4b5d6af
commit fb043cc
Showing
4 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
apps/prod/tekton/configs/triggers/triggers/pingcap/tidb-ctl/git-create-tag.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: triggers.tekton.dev/v1beta1 | ||
kind: Trigger | ||
metadata: | ||
name: tag-create-pingcap-tidb-ctl | ||
labels: | ||
type: github-tag-create | ||
github-owner: pingcap | ||
github-repo: tidb-ctl | ||
spec: | ||
interceptors: | ||
- name: filter on repo owner and name | ||
ref: | ||
name: cel | ||
params: | ||
- name: filter | ||
value: >- | ||
body.repository.owner.login == 'pingcap' && body.repository.name == 'tidb-ctl' && body.ref.matches('^v[0-9]+[.][0-9]+[.][0-9]+') | ||
bindings: | ||
- ref: github-tag-create | ||
- { name: component, value: $(body.repository.name) } | ||
- { name: profile, value: release } | ||
- { name: timeout, value: 1h } | ||
- { name: source-ws-size, value: 10Gi } | ||
- { name: builder-resources-memory, value: 4Gi } | ||
- { name: builder-resources-cpu, value: "2" } | ||
template: | ||
ref: build-component-all-platforms |
27 changes: 27 additions & 0 deletions
27
apps/prod/tekton/configs/triggers/triggers/pingcap/tidb-ctl/git-push.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: triggers.tekton.dev/v1beta1 | ||
kind: Trigger | ||
metadata: | ||
name: git-push-pingcap-tidb-ctl | ||
labels: | ||
type: github-branch-push | ||
github-owner: pingcap | ||
github-repo: tidb-ctl | ||
spec: | ||
interceptors: | ||
- name: filter on repo owner and name | ||
ref: | ||
name: cel | ||
params: | ||
- name: filter | ||
value: >- | ||
body.repository.owner.login == 'pingcap' && body.repository.name == 'tidb-ctl' && body.ref.matches('^refs/heads/(master)$') | ||
bindings: | ||
- ref: github-branch-push | ||
- { name: component, value: $(body.repository.name) } | ||
- { name: profile, value: release } | ||
- { name: timeout, value: 1h } | ||
- { name: source-ws-size, value: 10Gi } | ||
- { name: builder-resources-memory, value: 4Gi } | ||
- { name: builder-resources-cpu, value: "2" } | ||
template: | ||
ref: build-component-all-platforms |
40 changes: 40 additions & 0 deletions
40
apps/prod/tekton/configs/triggers/triggers/pingcap/tidb-ctl/test.http
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## You should run it firstly: | ||
## kubectl port-forward -n ee-cd svc/el-public 8080 | ||
|
||
### pingcap/tidb-ctl push on master branch | ||
POST http://127.0.0.1:8080 HTTP/1.1 | ||
Accept: */* | ||
content-type: application/json | ||
X-GitHub-Event: push | ||
|
||
{ | ||
"ref": "refs/heads/master", | ||
"before": "00000000000000000000000000000000000000000", | ||
"after": "9c165585d38e16591d459f21c0c82b9518747aba", | ||
"ref_type": "branch", | ||
"repository": { | ||
"name": "tidb-ctl", | ||
"clone_url": "https://github.com/pingcap/tidb-ctl", | ||
"owner": { | ||
"login": "pingcap" | ||
} | ||
} | ||
} | ||
|
||
### pingcap/tidb-ctl version tag created | ||
POST http://127.0.0.1:8080 HTTP/1.1 | ||
Accept: */* | ||
content-type: application/json | ||
X-GitHub-Event: create | ||
|
||
{ | ||
"ref": "v7.5.0", | ||
"ref_type": "tag", | ||
"repository": { | ||
"name": "tidb-ctl", | ||
"clone_url": "https://github.com/pingcap/tidb-ctl.git", | ||
"owner": { | ||
"login": "pingcap" | ||
} | ||
} | ||
} |