Skip to content

Commit

Permalink
Tweak bk ui for failed builds and buildscans
Browse files Browse the repository at this point in the history
  • Loading branch information
breskeby committed Nov 1, 2023
1 parent a6c1756 commit e29aad4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ buildScan {
// Add a build annotation
// See: https://buildkite.com/docs/agent/v3/cli-annotate
buildFinished { BuildResult result ->
def body = """<div class="mb3"><span class="p1 border rounded">${System.getenv('BUILDKITE_LABEL')}</span> :gradle: build ran: <a href="${scan.buildScanUri}"><code>gradle ${gradle.startParameter.taskNames.join(' ')}</code></a></div>"""
def body = """<div class="mb3"><span class="p1 border rounded">${System.getenv('BUILDKITE_LABEL')}</span> :gradle: ${result.failure ? 'failed': 'succesful'} build: <a href="${scan.buildScanUri}"><code>gradle ${gradle.startParameter.taskNames.join(' ')}</code></a></div>"""
new ProcessBuilder('buildkite-agent', 'annotate', '--context', 'gradle-build-scans', '--append', '--style', result.failure ? 'error': 'info', body)
.start()
.waitFor()
Expand Down

0 comments on commit e29aad4

Please sign in to comment.