| Summary: | oc start-build --from-webhook failed with github webhook | ||
|---|---|---|---|
| Product: | OKD | Reporter: | XiaochuanWang <xiaocwan> |
| Component: | Build | Assignee: | Jim Minter <jminter> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Wang Haoran <haowang> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.x | CC: | aos-bugs, bparees, wewang |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-12-09 21:49:46 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
XiaochuanWang
2016-10-08 09:54:47 UTC
Tested against OCP openshift/oc 3.2.1.16, also reproduced this issue by Comment 1 steps. "--from-webhook" from both build config web page and `oc describe bc` lost the port, still github failed but generic succeed. # oc start-build --from-webhook=https://xxx.com/oapi/v1/namespaces/xiaocwan-p/buildconfigs/ruby-sample-build/webhooks/secret101/github -n xiaocwan-p error: server rejected our request 500 remote: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Internal error occurred: hook failed: missing X-GitHub-Event or X-Gogs-Event","reason":"InternalError","details":{"causes":[{"message":"hook failed: missing X-GitHub-Event or X-Gogs-Event"}]},"code":500} oc start-build --from-webhook is only meant to work with the generic webhook. The CLI help needs to be updated to make this clear. verified with: openshift v3.4.0.25+1f36858 kubernetes v1.4.0+776c994 etcd 3.1.0-rc.0 $ oc start-build --from-webhook=https://xxx.amazonaws.com:8443/oapi/v1/namespaces/xiaocwan-t/buildconfigs/ruby-sample-build/webhooks/secret101/github warning: the '--from-webhook' flag should be called with a generic webhook URL. error: server rejected our request 400 remote: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"missing X-GitHub-Event, X-Gogs-Event or X-Gitlab-Event","reason":"BadRequest","code":400} generic webhook works normally Verified on origin oc v1.4.0-alpha.1+afb4f8d-181 |