Strider-CD / strider-git

Basic git provider
12 stars 16 forks source link

Polling trigger #13

Open knownasilya opened 10 years ago

knownasilya commented 10 years ago

Since plain git doesn't have any hooks, would be nice to add this feature.

jaredly commented 10 years ago

This might be best as a separate plugin.

knownasilya commented 10 years ago

When would you use it otherwise?

jaredly commented 10 years ago

We could well have other providers that don't support webhooks (a generic strider-mercurial, for example), and I don't think that polling would be vcs-dependent.

knownasilya commented 10 years ago

Seems like it would make sense to add polling to those, instead of trying to build a generic polling plugin to handle all cases. Thoughts?

jaredly commented 10 years ago

Perhaps. What you envision the polling trigger would do? I was thinking it would just start a job periodically.

knownasilya commented 10 years ago

I was thinking more along the lines of seeing if anything changed in a repo, maybe with an md5 checksum, and run only if it has.

jaredly commented 10 years ago

ok, yeah that sounds like it belongs here

knownasilya commented 10 years ago

Maybe even just check the commit history..

jagregory commented 10 years ago

+1 we're currently punching a hole in our firewall so our otherwise private build server can receive notifications from Github. Less than ideal.

yonjah commented 9 years ago

:+1:

arkoak commented 9 years ago

I believe polling is not nice if you have a lot of repos, its better to use git post-commit or post-update hooks alongwith strider-cli , you may need to install it npm install strider-cli I have my git repos pushed to my strider server, Im using the following content in my post-update file in all git repos so whenever i push a changeset, it gets tested.

strider runTest -l <user> -p <password> -j <proj/name> -m git-update

jagregory commented 9 years ago

That's fine if you're able (and happy) to expose your CI server to the world. A lot of us aren't in a position to do that.

On Saturday, 22 November 2014, arkoak notifications@github.com wrote:

I believe polling is not nice if you have a lot of repos, its better to use git post-commit or post-update hooks alongwith strider-cli . I have my git repos pushed to my strider server, Im using the following content in my post-update file in all git repos so whenever i push a changeset, it gets tested.

strider runTest -l -p -j <proj/name>-m git-update

— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-git/issues/13#issuecomment-64070892 .

James Gregory

Tel: +61 (0) 411 619 513 Website: http://jagregory.com Twitter: @jagregory http://twitter.com/jagregory

arkoak commented 9 years ago

You only need to expose it to your private git repo and it requires a login to trigger, if your git repo hooks are secure enough, I don't see a problem with this approach

shaunc commented 9 years ago

+1 ... @arkoak fine with your approach as an alternate (it would be better if there was an API rather than triggering a shell process, so the git repo could do "curl..." to ping strider server) -- but for me is much better to poll as currently running strider on node unaccessible from git server. I think this is an issue where both push and poll are each sometimes best.

shaunc commented 9 years ago

OTOH, in partial support of @arkoak, if you don't want to support polling internally, and don't want to expose your strider server, you can have a cron job on the strider server that does a git pull periodically, and then have post-update as suggested. Of course, internal support would be convenient.

cerw commented 9 years ago

Hi so is there a hook that can trigger test/deploy? Really need this :)

knownasilya commented 9 years ago

@cerw your best bet is to use https://github.com/Strider-CD/strider-cli/#runtest