Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhooks for PR Builds #247

Open
pcarney8 opened this issue Jan 2, 2019 · 3 comments
Open

Webhooks for PR Builds #247

pcarney8 opened this issue Jan 2, 2019 · 3 comments
Milestone

Comments

@pcarney8
Copy link
Contributor

pcarney8 commented Jan 2, 2019

Our Jenkinsfile needs to be kicked off and get information from the GitHub PR Webhook: https://developer.github.com/v3/activity/events/types/#pullrequestevent

Currently that is not supported in OCP for multibranch or github specific webhooks. It appears that using a generic webhook is possible, but would require something to translate it: openshift/origin#13970 (comment)
their reasoning here: openshift/origin#15455 (comment)

The other option is to go directly to Jenkins and use something like this: https://github.com/jenkinsci/generic-webhook-trigger-plugin/

@mcanoy
Copy link
Contributor

mcanoy commented Jan 3, 2019

they way we handled it with hf was to with an app that took accepted the webhook and update / invoked the PR / MR pipeline config.

There is also this card in trello that is getting a bit stale https://trello.com/c/ucGKOKnt/1158-5-support-folders-organization-folders-and-multibranch-pipelines-pipelineintegration-evg

@pcarney8
Copy link
Contributor Author

pcarney8 commented Jan 3, 2019

@mcanoy cool, sounds the "translate it" solution. Hmm yeah that was moved to devtools candidates in July it looks like.

Have you tried the generic-webhook-trigger-plugin with GH webhooks? i haven't tried that yet, but it looked promising.

@mcanoy
Copy link
Contributor

mcanoy commented Jan 3, 2019

I haven't tried it. Looks interesting but seems like there still has to be something in the middle to get the ref or commit value set, right? I am assuming if that was changed to the value we wanted - the pr - then it will build that instead of the ref that is in the pipeline bc.

git:
  uri: "<url to git repository>"
  ref: "<optional git reference>"
  commit: "<commit hash identifying a specific git commit>"
  author:
    name: "<author name>"
    email: "<author e-mail>"
  committer:
    name: "<committer name>"
    email: "<committer e-mail>"
  message: "<commit message>"
env: 
   - name: "<variable name>"
     value: "<variable value>"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants