【发布时间】:2018-09-14 02:11:06
【问题描述】:
所以我有一个具有某种结构的项目。每当我将更改推送到任何文件管道时都会运行。但我希望它仅在特定目录发生更改时运行。有没有可能?
【问题讨论】:
所以我有一个具有某种结构的项目。每当我将更改推送到任何文件管道时都会运行。但我希望它仅在特定目录发生更改时运行。有没有可能?
【问题讨论】:
引用这种情况的JIRA issue最近更新为可以直接应用的following solution。
来自 bitbucket 博客文章的示例:
- 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"
【讨论】:
这可能会对您有所帮助:
Determine If Any File Changed In Directory For Latest Git Commit
这样,如果您的目录中没有更改,您可以提前完成构建。
【讨论】: