Open bitwit opened 10 years ago
Hmmm here are my thoughts
The scheduler plugin is well under way! -> https://github.com/bitwit/strider-scheduler
So a few things: (See webapp.js for reference to my comments below)
routes
as my init function and to grab a reference to the context, is this the best place to be doing this or is there an actual init
I can use much like the 'basic' plugin type offers?Cheers
Hmm yeah I don't think we have events emitted for "added to project" or "removed from project". And we'll also want "config saved for project", I imagine. Do you want to jump in and add those?
for "saved for project" we have https://github.com/Strider-CD/strider/blob/master/routes/index.js#L154 and for "added to/removed from", this should be the place: https://github.com/Strider-CD/strider/blob/master/routes/index.js#L180
Haha, good news, I have a PR ready for the 'added to/removed from' already and I'll add the other one too. Then I can revise this plugin. Will get back to you in a few days.
sounds great :)
So these emitter events are working great and helping the plugin run a tight scheduling process. At this point the plugin would be near ready if it just needed to run jobs on a schedule much like the cron job command can already accomplish.
However, I think adding the commit check capability is a pretty key feature. So the best I've been able to do so far is check the hash in worker.js right AFTER git clone during prepare
if it is at the top of the plugin order. Nice, but not ideal given the ordering requirement and overhead of starting a job only to kill it after a clone that takes 'x' long to pull down.
What would be ideal is to run a 'git ls-remote' command from the webapp.js, so I'm wondering how it would be best to go about working with the provider to access the git repo with adequate credentials and retrieve this information.
Thanks.
Okay, figured this out by reading into the strider-git repo which appears to have just about everything I need. Gonna take a few weeks to flesh it out as I'd like but I think I've got everything I need now.
Cheers
Finally had the chance to wrap up the first version of scheduler this weekend!
https://github.com/bitwit/strider-scheduler
You can schedule 3 different ways right now:
Strider scheduler is going to need whatever version is cut next after 1.5.0 since it uses the new plugin emitter events.
Also, I think the poller needs more testing with different versions of git. I've only tested this with GitHub so far.
Any feedback on the scheduler plugin is much appreciated. I'll keep testing on my side too and looking for hiccups.
Wow this looks awesome! I'm definitely in favour of a scheduler plugin being included in the default install.
On Mon, Oct 13, 2014 at 3:56 PM, Kyle Newsome notifications@github.com wrote:
Finally had the chance to wrap up the first version of scheduler this weekend!
https://github.com/bitwit/strider-scheduler
You can schedule 3 different ways right now:
- Set a branch to be polled every minute for new changes
- Set an hourly job to run for a branch
- Set a daily job to run for a branch, selecting the specific days you want to run. i.e. you can disable Saturdays and Sundays
Strider scheduler is going to need whatever version is cut next after 1.5.0 since it uses the new plugin emitter events.
Also, I think the poller needs more testing with different versions of git. I've only tested this with GitHub so far.
Any feedback on the scheduler plugin is much appreciated. I'll keep testing on my side too and looking for hiccups.
— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider/issues/538#issuecomment-58966966.
Niall O'Higgins W: http://niallohiggins.com E: n@niallo.me T: @niallohiggins
Awesome, definitely a feature I've been wishing for also.
Hey,
So I've been interested in helping get the command line tasks in order because we'd like to run scheduled test/deploys, but in the bigger picture a scheduler plugin is more in line with the mantra of simplicity that Strider embraces.
I'm happy to start taking a stab at it but wanted to open a discussion first for some guidance since you guys obviously know the anatomy of Strider (and likely CD best practices) better than I do. A couple things:
Thanks!