Gitlab-plugin: Trigger only on change in a subdirectory

Created on 31 Oct 2017  路  5Comments  路  Source: jenkinsci/gitlab-plugin

Hi,

Is it a way to trigger a build only when a file in a specific subfolder of my git repo has changed?
For example, is it possible to define a include (or exclude) path, in the Gitlab Trigger?

Because in my case, I have a git repo like this one: https://github.com/kbastani/spring-cloud-event-sourcing-example, and each folder is a jenkins job. But if a do a fix in account-service, I don't want to rebuild all my other artefacts

Thanks for your help, and to add this feature if it not exists :)

feature request

Most helpful comment

It would be possible to filter on the added/modified/removed arrays inside each commit that is sent in the GitLab webhook. I will mark this as a feature request.

All 5 comments

It would be possible to filter on the added/modified/removed arrays inside each commit that is sent in the GitLab webhook. I will mark this as a feature request.

This would be really nice to have. I'm currently searching a way of triggering job only for changes in specific directory. Is this feature planned to be implemented sometime this year ?

@fairmonk at this point the plugin is basically volunteer/PR-supported. I'm the only maintainer and I'm not doing feature or bug-fix work myself, just triaging issues and PRs and releasing when appropriate. So, "patches welcome" basically :)

@tomasbjerre Sometimes webhooks are not possible. In fact, webhooks are not available in the general (git) case. In my case, our Jenkins is behind a VPN shielded off from any webhook form our github, but it could be the case that I was just using some git repo without webhooks availability.

A solution independent of webhooks would be nice. Currently, we can specify the branches to check out. Why not specify a subdir too?

Was this page helpful?
0 / 5 - 0 ratings