Skip to content

Commit

Permalink
ci: add rerere (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 committed Dec 15, 2020
1 parent 0a54305 commit efbefdd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- v*
branches:
- master
- rerere
pull_request:
tags:
- v*
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- rerere
pull_request:
branches:
- master
Expand Down
25 changes: 25 additions & 0 deletions .prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,31 @@ presubmits:
- --warnings=validate-urls
- --warnings=unknown-fields
- --warnings=duplicate-job-refs
- name: pull-ti-community-prow-rerere
decorate: true
always_run: true
branches:
- ^master$
spec:
containers:
- image: rustinliu/rerere-component:latest
command:
- rerere
args:
- --github-token-path=/etc/github/token
- --dry-run=false
- --github-endpoint=https://api.github.com
- --requireContexts=build
- --requireContexts=lint
- --labels=status/can-merge
volumeMounts:
- name: github-token
mountPath: /etc/github
readOnly: true
volumes:
- name: github-token
secret:
secretName: github-token
postsubmits:
- name: post-ti-community-prow-deploy-prow
run_if_changed: 'configs/prow-dev/cluster/'
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/rerere/rerere.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ type RetestingOptions struct {
func (o *RetestingOptions) AddFlags(fs *flag.FlagSet) {
fs.StringVar(&o.RetestingBranch, "retesting-branch", defaultRetestingBranch, "Retesting target branch.")
fs.IntVar(&o.Retry, "retry", defaultRetestingTimes, "Retry testing times.")
// TODO: it should be require-contexts.
fs.Var(&o.Contexts, "requireContexts", "Required requireContexts that must be green to merge.")
fs.DurationVar(&o.Timeout, "timeout", defaultTimeOut, "Test timeout time.")
}
Expand Down

0 comments on commit efbefdd

Please sign in to comment.