Configuration of includedRegions in Jenkinsfile?

后端 未结 2 2193
无人共我
无人共我 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: ''],
        [$class: 'DisableRemotePoll']
      ],
      submoduleCfg: [],
      userRemoteConfigs: [[url: "", credentialsId: "$GIT_KEY"]]])
    

提交回复
热议问题