kubernetes-retired / service-catalog

Consume services in Kubernetes using the Open Service Broker API
https://svc-cat.io
Apache License 2.0
1.05k stars 385 forks source link

Let PR authors re-run Jenkins job #1029

Closed nilebox closed 7 years ago

nilebox commented 7 years ago

Occasionally the jobs in Jenkins fail because of some flakiness. The only way to re-run the Jenkins build is to push some changes to the branch to trigger a new build. It would be useful to be able to manually force re-run of the Jenkins build.

As an example https://github.com/kubernetes/kubernetes has a bot with commands /retest and /test testName, and it is really convenient. We don't have to do something as fancy, but at least some way of manually triggering the build is very important.

Example of flaky build failure: https://service-catalog-jenkins.appspot.com/job/service-catalog-PR-testing2/1151/console

[service-catalog] Running shell script
+ /var/lib/jenkins/workspace/service-catalog-PR-testing2/src/github.com/kubernetes-incubator/service-catalog/contrib/jenkins/cleanup_cluster.sh --kubeconfig /var/lib/jenkins/workspace/service-catalog-PR-testing2/src/github.com/kubernetes-incubator/service-catalog/k8s-kubeconfig
error: current-context is not set
[Pipeline] echo
Exception caught during cleanup.
nilebox commented 7 years ago

/cc @kibbles-n-bytes

kibbles-n-bytes commented 7 years ago

For that specific failure, what actually happened was that the cluster initialization code failed due to the issue fixed in the following PR: https://github.com/kubernetes-incubator/service-catalog/pull/1023 . If you rebase on master, that should fix everything. (EDIT: I see now that it has since been rerun.)

The error reporting at the bottom of the Jenkins log is misleading though, sorry about that. Cluster initialization pretty much never fails so we haven't seen many results of the non-happy paths. I will fix that.

As to the re-running issue, I just looked into it and may actually be able to get something like /retest working. Let me test some things.

kibbles-n-bytes commented 7 years ago

Submitting /retest as a comment on a PR should now rerun the Jenkins tests! I tested it on your PR and it worked, though I'd like to see a couple more examples of it working from others before I close this.

kibbles-n-bytes commented 7 years ago

Seems to be working!

nilebox commented 7 years ago

Awesome, thanks