Webhook not posting anything through Cloudflare WAF

darkcode's Avatar

darkcode

03 Jul, 2015 10:07 PM

I've got a webhook setup, and a notification hook. For whatever reason, it's not actually doing anything at all.

What am I doing wrong?

deploy:
- provider: Webhook
  url: https://domain.com/api/push_build
  authorization:
    secure: wzN3/0mMzFM6sEayzxF2NQ==
  on_build_success: true
  on_build_failure: true
notifications:
- provider: Webhook
  url: https://domain.com/api/push_build
  on_build_success: true
  on_build_failure: true
  on_build_status_changed: true

It event says "OK" during the build process.

Discovering tests...OK
Packaging artifacts...OK
Uploading artifact blah.exe (16.4 MB)...OK
Deploying using Webhook provider
Calling webhook https://domain.comk/api/push_build...OK
Build success

I'm not getting any requests in my access log, so it's definitely not even hitting my server.

  1. Support Staff 1 Posted by Feodor Fitsner on 03 Jul, 2015 10:14 PM

    Feodor Fitsner's Avatar

    on_build_status_changed: true might be the key - it's called when build status changes from failed to success or success to failed. Remove it.

  2. 2 Posted by darkcode on 03 Jul, 2015 10:41 PM

    darkcode's Avatar

    Thanks Feodor Fitsner, sadly that didn't work. Still not getting any notifications to my rest api.

  3. Support Staff 3 Posted by Feodor Fitsner on 03 Jul, 2015 10:45 PM

    Feodor Fitsner's Avatar

    What do you get a build log?

  4. 4 Posted by darkcode on 03 Jul, 2015 10:48 PM

    darkcode's Avatar
  5. Support Staff 5 Posted by Feodor Fitsner on 03 Jul, 2015 10:52 PM

    Feodor Fitsner's Avatar

    Have you tried testing with http://requestb.in/?

  6. 6 Posted by darkcode on 03 Jul, 2015 11:05 PM

    darkcode's Avatar

    Wow, looks like that worked. For some reason Cloudflare is blocking you access to my origin server.

    Do you have a list of IP's I can whitelist? Do they only come from 138.91.141.243?

  7. Support Staff 7 Posted by Feodor Fitsner on 03 Jul, 2015 11:09 PM

    Feodor Fitsner's Avatar
  8. 8 Posted by darkcode on 03 Jul, 2015 11:12 PM

    darkcode's Avatar

    Perfect, Problem solved, that was the issue! Thanks!

  9. 9 Posted by darkcode on 04 Jul, 2015 02:56 AM

    darkcode's Avatar

    Well, it seems like it was a lucky shot.. For some reason my latest build didn't get sent through the WebHook... Ugh!

  10. Support Staff 10 Posted by Feodor Fitsner on 04 Jul, 2015 03:00 AM

    Feodor Fitsner's Avatar

    Your builds are running on a new environment. Make sure you've added 75.126.44.186 to the firewall. I'm going to add this IP to docs.

  11. 11 Posted by darkcode on 04 Jul, 2015 02:17 PM

    darkcode's Avatar

    Added to WAF, thanks.

    Also - I noticed when we break builds, i don't get a webhook.

    https://ci.appveyor.com/project/emoose/eldorito/build/0.4.7.167

    EDIT:

    Uh, so sometimes it does the notification and deploy, and sometimes I just get the deploy hook, and sometimes it does nothing at all.

  12. Support Staff 12 Posted by Feodor Fitsner on 04 Jul, 2015 10:59 PM

    Feodor Fitsner's Avatar

    Deployment is not called on failed builds.

    I think you should leave notifications only. You can also define headers there like:

    notifications:
    - provider: Webhook
      url: https://domain.com/api/push_build
      headers:
        Authorization:
          secure: wzN3/0mMzFM6sEayzxF2NQ==
      on_build_success: true
      on_build_failure: true
    
  13. 13 Posted by darkcode on 06 Jul, 2015 12:55 AM

    darkcode's Avatar

    Hmm, when I try to download the exe from the url i'm getting the following:

    {"message":"Artifact not found or access denied."}

    That's even with the most recent builds. What's the deal?

  14. Support Staff 14 Posted by Feodor Fitsner on 06 Jul, 2015 01:50 AM

    Feodor Fitsner's Avatar

    Artifact URL expires in 60 minutes. If you need download them after that time use API with authentication: http://www.appveyor.com/docs/api/samples/download-artifacts-ps

  15. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:57 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac