Created
December 18, 2017 11:40
-
-
Save jakub-bochenski/da6e49bab8c80c351170cda5042ed470 to your computer and use it in GitHub Desktop.
Add summary with build artifacts matching a pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def filter = /.log$/ | |
def icon = 'attribute.png' | |
def header = "<h2>Artifacts matching ${filter}</h2>" | |
def body = manager.build.artifacts | |
.findAll { it.relativePath =~ filter } | |
.collect { "<a href='artifact/${it.href}'>${it.name}</a>" } | |
.collect { "<li>${it}</li>" } | |
.join('\\n') | |
manager.createSummary(icon) | |
.appendText( "${header} <ul>${body}</ul>", false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment