-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Build] Migrate Build Scan to Develocity APIs #21234
Conversation
For more info see: - Connecting to scans.gradle.com: https://docs.gradle.com/develocity/ gradle-plugin/current/#connecting_to_scans_gradle_com - Using Build Scans: https://docs.gradle.com/develocity/ gradle-plugin/current/#using_build_scans
For more info see: - Publishing every build: https://docs.gradle.com/develocity/ gradle-plugin/current/#controlling_when_build_scans_are_published
Previously, it wasn't possible to apply this 'gradle_build_scan.gradle' file from the 'settings.gradle' file, but now, after the Develocity migration, it seems that it is now perfectly possible, most probably because of the added 'develocity { ... }' block.
👋 @nbradbury and just an FYI for you here; it seems that we actually missed all that work above and we had to do a minor migration on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you for the research, TIL! Good idea to adjust this as well in the measure-builds plugin.
Quality Gate passedIssues Measures |
Btw @wzieba and after we review/merge this work, it is maybe worth it to update all other projects we maintain to |
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
@ParaskP7 Just a side note that we have this dependabot PR that has a minor update to the Develocity plugin. Would that be something to include here? |
👋 @nbradbury , thanks and sure, but I recommend updating |
Relates To: #21164
Description:
In our previous attempt to upgrade
com.gradle.enterprise
from3.15
to3.18
we had to also upgrade to the plugin id tocom.gradle.develocity
(#21164). Although testing CI didn't show anything fishy about this migration, and build scans continue to work as expected, when running any task locally it now started to asking for a build scan license agreement:Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Use defined at https://gradle.com/help/legal-terms-of-use. Do you accept these terms? [yes, no]
After researching quickly on the matter, it seems that
Develocity
is now publishing every build by default (see Publishing every build). Previously, we only accepted the build scan agreement on CI and ignored any local configuration, it defaulting to NOT publishing on every build.FYI: Also, as part of this change, the
buildScan
APIs were migrated to the newdevelocity
ones, which are being accessible from the includingdevelocity { ... }
block, and then, the whole script got applied on thesettings.gradle
level, just like it is already done forbuildCache
.Additionally, you would notice the below (related) warning:
After running with the
-Ddevelocity.deprecation.captureOrigin=true
parameter further information reveals that this is related to the com.automattic.android.measure-builds, so maybe, it is worth updating this plugin toDevelocity
at some point as well:To Test:
./gradlew assembleJetpackJalapenoDebug
and make sure that the build is not blocked by the license agreement at the end../gradlew assembleJetpackJalapenoDebug --scan
and make sure that issuing a build scan on demand still works as expected.Prototype Build
job, any of the two, or any job for that matter, and make sure that at the end of that job a build scan is being publishing as expected.Regression Notes:
N/A
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):
N/A