Skip to content

Commit

Permalink
Update develocity-injection init script to v1.1 (#507)
Browse files Browse the repository at this point in the history
* Update develocity-injection init script to v1.1

Updates the develocity-injection init script to the latest reference script content
from https://github.com/gradle/develocity-ci-injection.

* Fix test assertion according to latest init script

* Fix test assertion according to latest init script

---------

Co-authored-by: Alexis Tual <atual@gradle.com>
  • Loading branch information
bot-githubaction and alextu authored Dec 12, 2024
1 parent cb3c34b commit abb4c3f
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.jenkinsci.test.acceptance.Matchers.containsRegexp;
import static org.jenkinsci.test.acceptance.Matchers.containsString;

public class GradleInjectionTest extends AbstractAcceptanceTest {
Expand Down Expand Up @@ -352,7 +353,7 @@ private void assertBuildScanPublished(Build build, boolean requireAppliedViaInit
String output = build.getConsole();

Matcher<String> appliedViaInitScriptMatcher =
containsString("Applying com.gradle.enterprise.gradleplugin.GradleEnterprisePlugin via init script");
containsRegexp("Applying com.gradle.enterprise.gradleplugin.GradleEnterprisePlugin with version (.*) via init script");
assertThat(output, requireAppliedViaInitScript ? appliedViaInitScriptMatcher : not(appliedViaInitScriptMatcher));
assertRequiredLogLines(output, requiredLogsLines);
assertThat(output, containsString("Publishing build scan..." + System.lineSeparator() + mockGeServer.publicBuildScanId()));
Expand Down
Loading

0 comments on commit abb4c3f

Please sign in to comment.