File tree 2 files changed +23
-5
lines changed
build-tools-internal/src/main
java/org/elasticsearch/gradle/internal/util
2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,14 @@ import java.time.LocalDateTime;
12
12
13
13
import org.elasticsearch.gradle.Architecture
14
14
import org.elasticsearch.gradle.OS
15
+ import static org.elasticsearch.gradle.internal.util.CiUtils.safeName
15
16
16
17
import java.lang.management.ManagementFactory
17
18
import java.time.LocalDateTime
18
19
20
+ // Resolving this early to avoid issues with the build scan plugin in combination with the configuration cache usage
21
+ def taskNames = gradle. startParameter. taskNames. join(' ' )
22
+
19
23
develocity {
20
24
21
25
buildScan {
@@ -112,7 +116,7 @@ develocity {
112
116
113
117
// Add a build annotation
114
118
// See: https://buildkite.com/docs/agent/v3/cli-annotate
115
- 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>"""
119
+ 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>"""
116
120
def process = [
117
121
' buildkite-agent' ,
118
122
' annotate' ,
@@ -133,7 +137,3 @@ develocity {
133
137
}
134
138
}
135
139
}
136
-
137
- static def safeName (String string ) {
138
- return string. replaceAll(/ [^a-zA-Z0-9_\-\. ]+/ , ' ' ). trim(). replaceAll(' ' , ' _' ). toLowerCase()
139
- }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the "Elastic License
4
+ * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5
+ * Public License v 1"; you may not use this file except in compliance with, at
6
+ * your election, the "Elastic License 2.0", the "GNU Affero General Public
7
+ * License v3.0 only", or the "Server Side Public License, v 1".
8
+ */
9
+
10
+ package org .elasticsearch .gradle .internal .util ;
11
+
12
+ public class CiUtils {
13
+
14
+ static String safeName (String input ) {
15
+ return input .replaceAll ("[^a-zA-Z0-9_\\ -\\ .]+" , " " ).trim ().replaceAll (" " , "_" ).toLowerCase ();
16
+ }
17
+
18
+ }
You can’t perform that action at this time.
0 commit comments