如何在Jenkins多分支管道作业中仅构建一个目录? [英] How to only build one directory in a Jenkins multi-branch pipeline job?

查看:357
本文介绍了如何在Jenkins多分支管道作业中仅构建一个目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个叫做multibranch-test的github存储库,带有两个子目录Project1,Project2.

I have a github repo called multibranch-test with two sub-directories Project1, Project2.

PS C:\Repos\multibranch-test> tree . Folder PATH listing for volume Windows Volume serial number is 2085-6D3D C:\REPOS\MULTIBRANCH-TEST ├───Project1 └───Project2

PS C:\Repos\multibranch-test> tree . Folder PATH listing for volume Windows Volume serial number is 2085-6D3D C:\REPOS\MULTIBRANCH-TEST ├───Project1 └───Project2

每个子目录都有一个Jenkins文件和该项目的代码.

Each sub-directory has a Jenkinsfile and the code for that project.

在詹金斯,我有两个多分支管道工作-一个用于Project1,一个用于Project2.在Project1的配置中,如果在Project2的子目录中推送了提交,则我不希望通过推送通知或轮询来构建Project1.

In Jenkins I have two multibranch pipeline jobs - one for Project1 and one for Project2. In the configuration for Project1 I don't want a push notification or polling to build Project1 if a commit was pushed in sub-directory for Project2.

因此在Project1中,我配置了其他行为:

So in Project1 I have configured Additional Behaviours:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆