Configuration of includedRegions in Jenkinsfile?

后端 未结 2 2126
无人共我
无人共我 2021-01-01 18:07

How can I limit the scope of a Jenkins pipeline project to only be built if a file in specific subdirectory is changed using Jenkinsfile?

I have a singl

相关标签:
2条回答
  • 2021-01-01 18:12

    There is an open issue preventing proper function: https://issues.jenkins-ci.org/browse/JENKINS-36195

    It has a workaround, which is to disable remote polling ([$class: 'DisableRemotePoll']):

    checkout([$class: 'GitSCM',
      branches: [[name: "*/master"]],
      extensions: [
        [$class: 'PathRestriction', excludedRegions: '', includedRegions: '<fill me in with regex \n delimited, leave excludedRegions as empty>'],
        [$class: 'DisableRemotePoll']
      ],
      submoduleCfg: [],
      userRemoteConfigs: [[url: "<my git url>", credentialsId: "$GIT_KEY"]]])
    
    0 讨论(0)
  • 2021-01-01 18:20

    This is not supported yet as this issue implies.

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