2017-07-12 11 views

答えて

1

https://support.cloudbees.com/hc/en-us/articles/217630098-How-to-Access-Changelogs-in-a-Pipeline-Job

def changeLogSets = currentBuild.changeSets 
    for (int i = 0; i < changeLogSets.size(); i++) { 
def entries = changeLogSets[i].items 
for (int j = 0; j < entries.length; j++) { 
    def entry = entries[j] 
    echo "${entry.commitId} by ${entry.author} on ${new Date(entry.timestamp)}: ${entry.msg}" 
    def files = new ArrayList(entry.affectedFiles) 
    for (int k = 0; k < files.size(); k++) { 
     def file = files[k] 
     echo " ${file.editType.name} ${file.path}" 
    } 
} 

}

関連する問題