dancryer / PHPCI

PHPCI is a free and open source continuous integration tool specifically designed for PHP.
BSD 2-Clause "Simplified" License
2.42k stars 441 forks source link

NEEDS Webhook trigger!! for command deployment! #1272

Open skeeith opened 7 years ago

skeeith commented 7 years ago

PHP-CI needs a webhook trigger build by just posting on it. PHP-CI doesn't have it.

I'm using HipChat command to deploy projects on Jenkins USING Webhook. its not triggering on PHP-CI Webhook except when I push on Bitbucket.

does anyone know how?

cause I really like PHP-CI more than Jenkins

skeeith commented 7 years ago

I want to use PHP-CI instead of Jenkins. can someone help?

ptejada commented 7 years ago

@oitsem099 what do you mean by triggering a build by just posting on it? posting on where? If you mean triggering a build via a URL you can use PHPCI_URL/webhook/git/PROJECT_ID Ref: https://github.com/Block8/PHPCI/wiki/Autobuilding-From-Git

skeeith commented 7 years ago

just posting on it (webhook). posting on the webhook url. it will then trigger the build command for the project. which Jenkins can do.

like example. if I type "/yay" in the chat box were using. this will trigger the webhook url => (http://PHPCI/webhook//1) its like clicking the Build Button but you doing it on command

we've been using this for a long time on Jenkins. its making deployment VERY VERY EASY.

but Jenkins is a pain in the ass to setup good thing about it that its widely use and very much supported by almost every Repository Integration.

which makes PHP-CI the opposite of it. its VERY VERY EASY to use. downside its not much supported by Repositories Integration.

I would really much like to see PHP-CI overtake Jenkins, Travis and etc when it comes to PHP Continuous Integration.

but if anyone knows how to trigger the webhook by just posting. OR how to trigger it by this URI => http://phpci-url/project/build/project-number AKA that's the Build Button URL posting on it won't run it also you need to open it on the browser to make it run lol

if anyone knows how to trigger the webhook please teach me.

ptejada commented 7 years ago

@oitsem099 do not confuse queuing a build vs running the actual build. The webhook URL (http://phpci-url/webhook/git/project-number) will queue the build. Note that even a GET request will queue a build.

Once in queue the build will be run in the background by the daemon or worker, whichever you set up:

skeeith commented 7 years ago

yes I know Im not confused. Im referring to queuing the build so that it will build. everything is fine. its all running as it should. all I need it go trigger it by URL. which is not triggering anything at all.

what Im trying to do is. type a command in HipChat that will send a post request to PHP-CI url to queue the build. sadly PHP-CI doesnt support it. it needs to be opened on a tab to trigger the queue. cause webhooks depends on a push on the repo to be triggered.

Jenkins on the other hand queues it by just posting on the webhook url.

ptejada commented 7 years ago

At least on my end, sending a POST/GET to PHPCI_URL/webhook/git/PROJECT_ID queues the build for me.

skeeith commented 7 years ago

really??? haayyzz they need to update the webhook for the Bitbucket API its not queuing the build :( do you know who maintains, fix or update the PHP-CI?

skeeith commented 7 years ago

all I see in my webhook is {"status":"failed", "commit": []} -.- this is frustrating hahhaha

dancryer commented 7 years ago

Questions:

  1. What does the URL look like that you're entering into Bitbucket?
  2. Are you adding it as a Service or a Webhook?
  3. If a Webhook, which events have you added it for?