Skip to content

Commit

Permalink
Do not reference gradle objects from closure for CC compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
breskeby committed Nov 16, 2024
1 parent 8220e1a commit 784c443
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import static org.elasticsearch.gradle.internal.util.CiUtils.safeName
import java.lang.management.ManagementFactory
import java.time.LocalDateTime

// Resolving this early to avoid issues with the build scan plugin in combination with the configuration cache usage
def taskNames = gradle.startParameter.taskNames.join(' ')

develocity {

buildScan {
Expand Down Expand Up @@ -111,7 +114,7 @@ develocity {

// 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.failures ? 'failed' : 'successful'} build: <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.failures ? 'failed' : 'successful'} build: <a href="${scan.buildScanUri}"><code>gradle ${taskNames}</code></a></div>"""
def process = [
'buildkite-agent',
'annotate',
Expand Down

0 comments on commit 784c443

Please sign in to comment.