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

Pass SQS messages to webhook plugin #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Pass SQS messages to webhook plugin #18

wants to merge 1 commit into from

Conversation

thomaslorentsen
Copy link

Prevents a null value error when an SQS message can be treated
as a SNS message which does not contain the expected
json payload

Prevents a null error when an SQS message can be treated
as a SNS message which does not contain the expected
json payload
@kramachandran1980
Copy link

Can someone please review and merge this? we seem to be hitting this issue.

@nemo83
Copy link
Collaborator

nemo83 commented Oct 19, 2018

@kramachandran1980 did you have a chance to test/regressions test this PR ? I've stopped using this plugin a while ago and I am not able to test it.

@thomaslorentsen
Copy link
Author

@kramachandran1980 We managed to get round this issue by only passing the GitHook messages to SNS. You just need to ensure that the header X-GitHub-Event is being added to the SNS message.

That should get around the problem without this fix.

@kramachandran1980
Copy link

@nemo83 - No. not yet. I am new to building plugins and trying to build and deploy it in my linux host which runs jenkins. If there is any way, you can provide the jar file - i can test it quickly in my setup.

@thomaslorentsen: My github webhook payload contains: X-GitHub-Event: push. My setup is:
github PR's call a webhook on commit. This webhook puts the payload in an AWS SQS queue. Jenkins is configured to read from this queue and call a job. Observing the "null value error" sometimes. When i try to redeliver the webhook from github 3/4 times, it passes intermittently. How can i get SNS into this now? I see that github services are being deprecated. Any feedback would be appreciated.

@thomaslorentsen
Copy link
Author

thomaslorentsen commented Oct 19, 2018

@kramachandran1980 yes, the error is because you are inserting directly into SQS with GitHub.

Due to GitHub deprecating the feature, I’m now pointing a webhook to a AWS Lambda app that puts the payload into an SNS queue with the X-GitHub-Event added to the header.

This is allowing me to not expose my Jenkins to the Internet.

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

Successfully merging this pull request may close these issues.

3 participants