How to get list of changed files since last build in Jenkins/Hudson

后端 未结 11 2010
时光取名叫无心
时光取名叫无心 2020-11-28 09:35

I have set up Jenkins, but I would like to find out what files were added/changed between the current build and the previous build. I\'d like to run some long running tests

11条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 10:31

    Using the Build Flow plugin and Git:

    final changeSet = build.getChangeSet()
    final changeSetIterator = changeSet.iterator()
    while (changeSetIterator.hasNext()) {
      final gitChangeSet = changeSetIterator.next()
      for (final path : gitChangeSet.getPaths()) {
        println path.getPath()
      }
    }
    

提交回复
热议问题