Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

Commit 9815b6b

Browse files
authored
Merge pull request #1222 from mikedanese/add-verify
make verify a blocking build
2 parents abcb7b5 + 54bf6ed commit 9815b6b

File tree

5 files changed

+20
-17
lines changed

5 files changed

+20
-17
lines changed

mungegithub/mungers/stale-green-ci.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ const (
3535
Tests are more than %d hours old. Re-running tests.`
3636
)
3737

38-
var (
39-
greenMsgBody = fmt.Sprintf(greenMsgFormat, staleGreenCIHours)
40-
requiredContexts = []string{jenkinsUnitContext, jenkinsE2EContext}
41-
)
38+
var greenMsgBody = fmt.Sprintf(greenMsgFormat, staleGreenCIHours)
4239

4340
// StaleGreenCI will re-run passed tests for LGTM PRs if they are more than
4441
// 96 hours old.

mungegithub/mungers/stale-green-ci_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var (
4040
func timePtr(t time.Time) *time.Time { return &t }
4141

4242
func NowStatus() *github.CombinedStatus {
43-
status := github_test.Status("mysha", []string{travisContext, jenkinsUnitContext, jenkinsE2EContext}, nil, nil, nil)
43+
status := github_test.Status("mysha", requiredContexts, nil, nil, nil)
4444
for i := range status.Statuses {
4545
s := &status.Statuses[i]
4646
s.CreatedAt = timePtr(time.Now())
@@ -50,7 +50,7 @@ func NowStatus() *github.CombinedStatus {
5050
}
5151

5252
func OldStatus() *github.CombinedStatus {
53-
return github_test.Status("mysha", []string{travisContext, jenkinsUnitContext, jenkinsE2EContext}, nil, nil, nil)
53+
return github_test.Status("mysha", requiredContexts, nil, nil, nil)
5454
}
5555

5656
func TestOldUnitTestMunge(t *testing.T) {

mungegithub/mungers/stale-pending-ci.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ func (StalePendingCI) AddFlags(cmd *cobra.Command, config *github.Config) {}
7676

7777
// Munge is the workhorse the will actually make updates to the PR
7878
func (StalePendingCI) Munge(obj *github.MungeObject) {
79-
requiredContexts := []string{jenkinsUnitContext, jenkinsE2EContext}
80-
8179
if !obj.IsPR() {
8280
return
8381
}

mungegithub/mungers/submit-queue.go

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ const (
5252
claYesLabel = "cla: yes"
5353
claHumanLabel = "cla: human-approved"
5454

55-
jenkinsE2EContext = "Jenkins GCE e2e"
56-
jenkinsUnitContext = "Jenkins unit/integration"
57-
jenkinsNodeContext = "Jenkins GCE Node e2e"
58-
travisContext = "continuous-integration/travis-ci/pr"
59-
sqContext = "Submit Queue"
55+
jenkinsE2EContext = "Jenkins GCE e2e"
56+
jenkinsUnitContext = "Jenkins unit/integration"
57+
jenkinsVerifyContext = "Jenkins verification"
58+
jenkinsNodeContext = "Jenkins GCE Node e2e"
59+
sqContext = "Submit Queue"
6060

6161
retestNotRequiredMergePriority = -1 // used for retestNotRequiredLabel
6262
defaultMergePriority = 3 // when an issue is unlabeled
@@ -68,6 +68,13 @@ var (
6868
_ = fmt.Print
6969
// This MUST cause a RETEST of everything in the sq.RequiredRetestContexts
7070
retestBody = fmt.Sprintf("@%s test this [submit-queue is verifying that this PR is safe to merge]", jenkinsBotName)
71+
72+
requiredContexts = []string{
73+
jenkinsUnitContext,
74+
jenkinsE2EContext,
75+
jenkinsNodeContext,
76+
jenkinsVerifyContext,
77+
}
7178
)
7279

7380
type submitStatus struct {
@@ -455,6 +462,7 @@ func (sq *SubmitQueue) AddFlags(cmd *cobra.Command, config *github.Config) {
455462
"kubelet-gce-e2e-ci",
456463
"kubernetes-build",
457464
"kubernetes-test-go",
465+
"kubernetes-verify-master",
458466
"kubernetes-e2e-gce",
459467
"kubernetes-e2e-gce-slow",
460468
"kubernetes-e2e-gce-serial",
@@ -468,7 +476,7 @@ func (sq *SubmitQueue) AddFlags(cmd *cobra.Command, config *github.Config) {
468476
[]string{},
469477
"Comma separated list of jobs in Jenkins to use for stability testing that needs only weak success")
470478
cmd.Flags().StringSliceVar(&sq.RequiredStatusContexts, "required-contexts", []string{}, "Comma separate list of status contexts required for a PR to be considered ok to merge")
471-
cmd.Flags().StringSliceVar(&sq.RequiredRetestContexts, "required-retest-contexts", []string{jenkinsE2EContext, jenkinsUnitContext, jenkinsNodeContext}, "Comma separate list of statuses which will be retested and which must come back green after the `retest-body` comment is posted to a PR")
479+
cmd.Flags().StringSliceVar(&sq.RequiredRetestContexts, "required-retest-contexts", requiredContexts, "Comma separate list of statuses which will be retested and which must come back green after the `retest-body` comment is posted to a PR")
472480
cmd.Flags().StringVar(&sq.retestBody, "retest-body", retestBody, "message which, when posted to the PR, will cause ALL `required-retest-contexts` to be re-tested")
473481
cmd.Flags().BoolVar(&sq.FakeE2E, "fake-e2e", false, "Whether to use a fake for testing E2E stability.")
474482
cmd.Flags().StringSliceVar(&sq.doNotMergeMilestones, "do-not-merge-milestones", []string{}, "List of milestones which, when applied, will cause the PR to not be merged")

mungegithub/mungers/submit-queue_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ func Commits() []github.RepositoryCommit {
142142
}
143143

144144
func SuccessStatus() *github.CombinedStatus {
145-
return github_test.Status("mysha", []string{travisContext, requiredReTestContext1, requiredReTestContext2, notRequiredReTestContext1, notRequiredReTestContext2}, nil, nil, nil)
145+
return github_test.Status("mysha", []string{requiredReTestContext1, requiredReTestContext2, notRequiredReTestContext1, notRequiredReTestContext2}, nil, nil, nil)
146146
}
147147

148148
func RetestFailStatus() *github.CombinedStatus {
149-
return github_test.Status("mysha", []string{travisContext, requiredReTestContext1, notRequiredReTestContext1, notRequiredReTestContext2}, []string{requiredReTestContext2}, nil, nil)
149+
return github_test.Status("mysha", []string{requiredReTestContext1, notRequiredReTestContext1, notRequiredReTestContext2}, []string{requiredReTestContext2}, nil, nil)
150150
}
151151

152152
func NoRetestFailStatus() *github.CombinedStatus {
153-
return github_test.Status("mysha", []string{travisContext, requiredReTestContext1, requiredReTestContext2, notRequiredReTestContext1}, []string{notRequiredReTestContext2}, nil, nil)
153+
return github_test.Status("mysha", []string{requiredReTestContext1, requiredReTestContext2, notRequiredReTestContext1}, []string{notRequiredReTestContext2}, nil, nil)
154154
}
155155

156156
func LastBuildNumber() int {

0 commit comments

Comments
 (0)