Jenkins Git plugin included regions not working

后端 未结 4 1739
挽巷
挽巷 2021-02-05 08:12

I cannot get the \"included regions\" feature to work in Jenkins with the Git plugin. I want a job only to be built when there a changes in \"his\" directory. Example: the proje

相关标签:
4条回答
  • 2021-02-05 08:50

    For me it started working when checking "Force polling using workspace" under "Source-Code-Management - Additional Behaviours" in the job config. Smells like a bug - there are several open regarding the included/excluded regions feature of the git plugin.

    EDIT: it stopped working after updating jenkins and the git plugin. The cause is probably:

    https://issues.jenkins-ci.org/browse/JENKINS-20607

    I am thinking of moving to this method here

    0 讨论(0)
  • 2021-02-05 08:59

    I just had this problem, and the answer was slightly different than the other answers. That being said, the solution lay in the question itself. For me, I had paths in the "Included Regions" with the pattern:

    service/Search/AbstractSearchServices/master/**/*
    

    I changed the pattern to:

    service/Search/AbstractSearchServices/master/.*
    

    Once I changed to that pattern, it worked perfectly for me.

    0 讨论(0)
  • 2021-02-05 09:02

    Make sure under Build Trigger Poll SCM is checked, or you have some other way of letting Jenkins know there are changes.

    You are currently just defining the regions, but Jenkins still has to pull the updates before it can see a change.

    0 讨论(0)
  • 2021-02-05 09:11

    Just a note for others visiting this site because they have problems with included-regions as I had:

    I also had trouble with path pattern tools/mytool/.* which was not working as included-region. The reason was that I did enable the shallow clone option in git scm settings. When the option was disabled the included-region parameter worked as expected.

    0 讨论(0)
提交回复
热议问题