Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore Build Scan Capability #15120

Closed
jzheaux opened this issue May 20, 2024 · 3 comments · Fixed by #15152
Closed

Restore Build Scan Capability #15120

jzheaux opened this issue May 20, 2024 · 3 comments · Fixed by #15152
Assignees
Labels
in: build An issue in the build type: bug A general bug
Milestone

Comments

@jzheaux
Copy link
Contributor

jzheaux commented May 20, 2024

For the 5.8.x branch, using the --scan attribute does not work per the following from Gradle:

Gradle versions older than 8.4 do not recognize the Develocity plugin as the replacement for deprecated Gradle Enterprise and Build Scan plugins. When --scan argument is used, Gradle attempts to apply its version of the plugin which may conflict with the Develocity plugin explicitly applied to your project. If the plugin applied by Gradle wins, the new functionality provided by the Develocity plugin will not be available.

As such, --scan needs to be removed for the moment and likely replaced with a recommendation like the following:

develocity {
    buildScan {
        if (System.getenv("IS_A_PULL_REQUEST")) {
            publishing.onlyIf { true }
            server = "https://scans.gradle.com"
        }
    }
}
@jzheaux jzheaux added in: build An issue in the build type: bug A general bug labels May 20, 2024
@jzheaux jzheaux added this to the 5.8.13 milestone May 20, 2024
@jzheaux jzheaux self-assigned this May 20, 2024
jzheaux added a commit that referenced this issue May 20, 2024
Currently, --scan is preventing PR builds from completing.

Issue gh-15120
@jzheaux
Copy link
Contributor Author

jzheaux commented May 23, 2024

The above did not quite work since the Spring Gradle Enterprise Conventions plugin needs to set the server value and the Develocity plugin does not allow it to be overridden.

@jzheaux
Copy link
Contributor Author

jzheaux commented May 23, 2024

Another way to do this is to only apply the Spring Gradle Enterprise Conventions plugin when enterprise credentials are present:

if (System.getenv("DEVELOCITY_ACCESS_KEY")) {
	apply plugin: "io.spring.ge.conventions"
}

This works because the DEVELOCITY_ACCESS_KEY credential is not available to PRs. GIven that, it can't exercise the Conventions feature set anyway.

@jzheaux
Copy link
Contributor Author

jzheaux commented May 23, 2024

Closed in ca67634

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: build An issue in the build type: bug A general bug
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant