strider icon indicating copy to clipboard operation
strider copied to clipboard

trigger build when a dependency changes

Open jaredly opened this issue 12 years ago • 14 comments

That would be so cool. In a project I'm working on, a module we depended on w/ semver'd "N.N.x" made a bugfix release that broke our code, and we didn't realize this until days later.

If we could automatically trigger a build any time a dependency issues a new release (that's still within the version requirements we supplied), that would be such a killer feature, especially for node projects.

jaredly avatar Jul 17 '13 16:07 jaredly

This would also be great for JVM projects. Jenkins is able to track dependencies between projects that it builds and can fire downstream builds if an upstream dependency changes.

blalor avatar Aug 03 '13 13:08 blalor

@blalor for internal dependencies, it would be super easy to write a plugin that would do this. We have a global job:done event, and the plugin could watch for that and kick off any necessary jobs. Getting the DB and UI right would require a bit of thought though. Would it be a two-way binding? As in projects store both their upstream and downstream peers? This would make queries a lot simpler. And does the UI display both as well? And do you put that on the build page? Or the configure page? Granted, these questions are more "nice to have"s; you could get a totally working solution up and running without that.

jaredly avatar Aug 03 '13 18:08 jaredly

Does this require Strider to poll?

Might it make sense to simply do this as a "scheduled full test run every N hours", which would pull all dependencies from latest, rather than trying to add complex logic to poll dependencies for each project?

niallo avatar Aug 04 '13 03:08 niallo

Not for what @blalor was suggesting; he's talking about the build of one of your projects triggering another.

I was thinking about a polling solution for external dependencies, but maybe it would make sense to just have scheduled builds.

jaredly avatar Aug 04 '13 03:08 jaredly

Any workaround?

nafg avatar Jan 24 '14 06:01 nafg

Perhaps via webhooks? Do I understaand that strider can hit a webhook on success? Can that webhook be some strider url that tells it to build something?

nafg avatar Jan 24 '14 06:01 nafg

@nafg what's your use case? webhooks would probably do it for you, yeah.

jaredly avatar Jan 24 '14 08:01 jaredly

I develop an open source library, and I have an app that currently depends on a -SNAPSHOT version of it. I would like that whenever I git push the library, if it succeeds strider would then start a build of the app.

On Fri, Jan 24, 2014 at 3:42 AM, Jared Forsyth [email protected]:

@nafg https://github.com/nafg what's you use case? webhooks would probably do it for you, yeah.

— Reply to this email directly or view it on GitHubhttps://github.com/Strider-CD/strider/issues/114#issuecomment-33205842 .

nafg avatar Jan 24 '14 08:01 nafg

What would the webhook endpoint be, to trigger a strider build?

On Fri, Jan 24, 2014 at 3:44 AM, Naftoli Gugenheim [email protected]:

I develop an open source library, and I have an app that currently depends on a -SNAPSHOT version of it. I would like that whenever I git push the library, if it succeeds strider would then start a build of the app.

On Fri, Jan 24, 2014 at 3:42 AM, Jared Forsyth [email protected]:

@nafg https://github.com/nafg what's you use case? webhooks would probably do it for you, yeah.

— Reply to this email directly or view it on GitHubhttps://github.com/Strider-CD/strider/issues/114#issuecomment-33205842 .

nafg avatar Jan 24 '14 08:01 nafg

well you'd need to use basic auth, and I believe the strider endpoint is /project/name/start.

So the webhook post url would be https://user:[email protected]/downstream/project/start. I think.

jaredly avatar Jan 24 '14 08:01 jaredly

Is this already possible or still in the plans? It would be awesome something that could detect dependencies through the package.json file and automatically upstream/downstream things.

magalhas avatar Jun 22 '15 12:06 magalhas

I'm guessing it's still planned. Maybe once http://libraries.io has an API..

knownasilya avatar Jun 22 '15 12:06 knownasilya

@knownasilya

IMHO, managing downstream dependencies is a basic feature of CI/CD platforms.

While it is not straightforward to trigger build of downstream projects (managed by Strider) of a project managed outside of Strider, it by far more feasible to do so for a Strider-managed projects.

I highly vote for this feature in Strider.

ouadi avatar Oct 15 '15 14:10 ouadi

http://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm?utm_source=package&utm_medium=below%20header&utm_term=announcing%20webhooks&utm_campaign=20160601

knownasilya avatar Jun 02 '16 12:06 knownasilya

http://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm?utm_source=package&utm_medium=below%20header&utm_term=announcing%20webhooks&utm_campaign=20160601

knownasilya avatar Jun 02 '16 12:06 knownasilya