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

后端 未结 11 2019
时光取名叫无心
时光取名叫无心 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:14

    Through Groovy:

    
    <% changeSet = build.changeSet
    if (changeSet != null) {
    hadChanges = false %>
    

    Changes

      <% changeSet.each { cs -> hadChanges = true aUser = cs.author %>
    • Commit ${cs.revision} by <%= aUser != null ? aUser.displayName : it.author.displayName %>: (${cs.msg})
        <% cs.affectedFiles.each { %>
      • ${it.editType.name}: ${it.path}
      • <% } %>
    • <% } if (!hadChanges) { %>
    • No Changes !!
    • <% } %>
    <% } %>

提交回复
热议问题