Jenkins groovy recursively get the list of files under the folder

Jenkins pipeline groovy can't use eachFileRecurse method, so it can only help with shell. /path and *.txt are replaceable parameters.

 

files=sh(returnStdout: true, script: 'find /path -name "*.txt"')

 

    

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326992364&siteId=291194637