Run pipeline only on changes in one dir

烂漫一生 提交于 2020-08-27 21:33:42

问题


So I've got a project with some structure. And whenever I push changes to any file pipeline is run. But I want it to run only when there are changes in particular directory. Is it even possible?


回答1:


This may help you:

Determine If Any File Changed In Directory For Latest Git Commit

that way if there are no changes in your directory you could finish the build early.




回答2:


The JIRA issue that refers to this situation was recently updated with the following solution that can be straightforward applied.

Example from bitbucket blog 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"


来源:https://stackoverflow.com/questions/49652286/run-pipeline-only-on-changes-in-one-dir

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!