-
Type:
New Feature
-
Resolution: Won't Do
-
Priority:
Minor
-
Component/s: groovy-postbuild-plugin
-
None
It would be useful if the groovy postbuild plugin had a method to check if a file with a given pattern existed in the jenkins workspace. This could be used to easily determine the state of a build by looking for marker files.
Possible interface (If Jenkins has some concept of a FileTree / FileCollection that could be used):
Â
// searches the entire workspace for file names that match regexp fileExists(String regexp) Â // searches for files in dir recursively for file names that match regexp fileExists(File dir, String regexp)
Â
Example:
Â
if (manager.fileExists(new File("build/customverification/"), ".*\\.failed")) { manager.addBadge(...) manager.buildUnstable(); ... }
Â