简体   繁体   English

Azure DevOps Git粒度触发器构建,用于持续集成和交付

[英]Azure DevOps Git Granular Trigger Build for Continuous Integration & Delivery

I have inherited a somewhat strange git repo that is structured as follows: 我继承了一个有点奇怪的git repo,其结构如下:

Some Client - Programme/
├── ClientName.Thing1/
│   ├── ClientName.Thing1.sln
│   └── ClientName.Thing1.ProjectX/
│       ├── ClientName.Thing1.ProjectX.csproj
│       ├── file1.cs
│       └── file2.cs
└── ClientName.Thing2/
    ├── ClientName.Thing2.sln
    ├── ClientName.Thing2.ProjectY/
    │   ├── ClientName.Thing2.ProjectY.csproj
    │   ├── file3.cs
    │   └── file4.cs
    └── ClientName.Thing2.ProjectZ/
        ├── ClientName.Thing2.ProjectZ.csproj
        ├── file5.cs
        └── file6.cs

So essentially, i have a single repo, that contains a bunch of folders; 基本上,我有一个单独的回购,包含一堆文件夹; ClientName.Thing1, ClientName.Thing2, etc.. and all of the code exists below these top level folders.. ClientName.Thing1, ClientName.Thing2, etc..所有代码都存在于这些顶级文件夹下面。

Workflow seems to be Person-A works on ClientName.Thing2 and Person-B works on ClientName.Thing1 at a time, independently... both can be opened in Visual Studio with the *.sln file. 工作流似乎是Person-A适用于ClientName.Thing2和Person-B一次在ClientName.Thing1上工作,独立...两者都可以在Visual Studio中使用* .sln文件打开。

What this means though, is that although they are both sort-of working on different areas.. they can "cross-pollinate" as it all comes from the same master branch, and technically Person-A even though they are not meant to, could edit something in the "area" of work that Person-B is looking at.. 但这意味着,尽管它们都在不同的领域工作......但是它们可以“交叉授粉”,因为它们都来自同一个master分支,技术上是Person-A,即使它们并不意味着,可以编辑Person-B正在查看的工作“区域”中的某些内容。

This is not the biggest issue though, the biggest issue is actually releasing things, and specifically getting a build of the aspect that you want to release. 这不是最大的问题,最大的问题是实际发布内容,特别是要获得要发布的方面的构建。 There's not really compiled code (python, sql, etc.) and therefore it is possible to 'get away' with simply connecting to the repo in CICD pipeline and deploying the stuff.. without a build, which i find a bit annoying... it means you can't guarantee that you are always deploying the same thing to each environment. 没有真正编译的代码(python,sql等),因此只需连接到CICD管道中的repo并部署这些东西就可以“逃脱”......没有构建,我觉得有点烦人..这意味着你无法保证你总是在每个环境中部署相同的东西。

So, to the question! 那么,对于这个问题!

Is there a way, that if Person-A commits some changes to anything that sits under ClientName.Thing2 folder, for it to trigger a build only for a specific build definition?? 有没有办法,如果Person-A对ClientName.Thing2文件夹下的任何内容进行一些更改,它是否只为特定的构建定义触发构建?

Right now... i can only see a way to trigger on a commit into the repo as a whole which will be super super noisy! 现在......我只能看到一种触发提交回购整体的方法,这将是超级超级嘈杂!

路径过滤器添加到构建定义的CI触发器中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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