运行 管道仅在一个目录中发生变化

Run pipeline only on changes in one dir

所以我有一个具有一定结构的项目。每当我将更改推送到任何文件管道时,都是 运行。但我只希望它 运行 仅当特定目录发生变化时。有可能吗?

这可能对您有帮助:

这样,如果您的目录中没有任何更改,您就可以提前完成构建。

可以直接应用的JIRA issue that refers to this situation was recently updated with the following solution

来自 bitbucket 博客的示例 post:

- step:
          name: build-frontend-artifact
          condition:
              changesets:
                  includePaths:
                    # only xml files directly under resources directory
                    - "src/main/resources/*.xml"
                    # any changes in frontend directory
                    - "src/site/**"
          script:
             - echo "Building frontend artifact"