handler: add Ref check to WebhookHandler#293
Conversation
|
@rhalat what if |
Codecov Report
@@ Coverage Diff @@
## master #293 +/- ##
=========================================
+ Coverage 0.00% 5.55% +5.55%
=========================================
Files 1 2 +1
Lines 52 108 +56
=========================================
+ Hits 0 6 +6
- Misses 52 102 +50
Continue to review full report at Codecov.
|
|
@seanmalloy is it supposed to handle something different than branches? When it comes to sha1, I believe it won't trigger job and when it comes to tags we can think of it and I can include it in unit tests, but what in case where branch and tag have same names? In GitOpsConfig CR we are not distinguish them. |
|
@seanmalloy @rhalat Maybe we could just modify README telling users to set Ref to |
|
I updated README.md and I'm close to finish with unit tests. |
|
@rhalat Please add an extra commit increasing the timeout in e2e-test.sh for hello-world-yaml-cr1. Please make sure the commit message explains the reasons: from CI logs, we see that one run barely completes in time: https://travis-ci.com/KohlsTechnology/eunomia/jobs/288138640#L2471 so the failure in the other run will probably disappear if we increase timeout: https://travis-ci.com/KohlsTechnology/eunomia/jobs/288138641#L2469 As a side note, personally, I hate that the tests are taking so long now; I hope we'll find some way(s) to speed them up at some point. [optional] It could also be nice to squash some of the commits in this PR now (e.g.
|
GitHub webhook is triggered on all Push events and without checking branch in WebhookHandler new job is created every time there is push to repo, no matter what branch. In this PR I added check, so job is created only when URI and Ref matches in push event and GitOpsConfig CR. Fixes #252
Travis CI is failing on hello-world-yaml-cr1 test from time to time. When it succeeds it barely completes in time, so increasing timeout should solve the issue.
Description
GitHub webhook is triggered on all Push events and without checking
branch in WebhookHandler new job is created every time there is push to
repo, no matter what branch. In this PR I added check, so job is created
only when URI and Ref matches in push event and GitOpsConfig CR.
Additionally it's fixing Travis CI that was failing on hello-world-yaml-cr1 test by increasing timeout.
Fixes #252
Type of change
Checklist