Skip to content

Commit

Permalink
[ci] Fix build scan annotations on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders committed Nov 9, 2023
1 parent b7b5518 commit 7c606c9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,17 @@ buildScan {
// Add a build annotation
// See: https://buildkite.com/docs/agent/v3/cli-annotate
def body = """<div class="mb3"><span class="p1 border rounded">${System.getenv('BUILDKITE_LABEL')}</span> :gradle: ${result.failure ? 'failed' : 'successful'} build: <a href="${scan.buildScanUri}"><code>gradle ${gradle.startParameter.taskNames.join(' ')}</code></a></div>"""
new ProcessBuilder(
[
'buildkite-agent',
'annotate',
'--context',
result.failure ? 'gradle-build-scans-failed' : 'gradle-build-scans',
'--append',
'--style',
result.failure ? 'error' : 'info',
body
)
.start()
result.failure ? 'error' : 'info'
]
.execute()
.withWriter { write(body) } // passing the body in as an argument has issues on Windows, so let's use stdin of the process instead
.waitFor()
}
}
Expand Down

0 comments on commit 7c606c9

Please sign in to comment.