简体   繁体   中英

How Jenkins can determine change in a specific folder for a GIT repo?

I have a Git Repo which has multiple folders. Each folder is a component of an application. We want to detect commits in a specific folder so that we can build individual component which had the latest commit. How can we achieve the same in Jenkins?

Ideally all of the components should be a specific repo, however, we don't have the flexibility to break from existing architecture.

You can solve this using git sparse checkout. Under advanced options of git of your job, you can specify what files/folders you want to checkout. Jenkins中的Git稀疏签出

In addition, you also need to make sure your webhooks are set correctly, for automatic triggering of builds. which i assume you already have them configured.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM