Upgrade to Develocity extension 1.21

This commit is contained in:
Jerome Prinet 2024-04-05 10:35:11 +02:00
parent 4b8a27a5d5
commit da905eb7b6
No known key found for this signature in database
GPG Key ID: 101BA71B2F530F0A
7 changed files with 26 additions and 24 deletions

View File

@ -50,7 +50,7 @@ env:
DB_USER: hibernate_orm_test
DB_PASSWORD: hibernate_orm_test
DB_NAME: hibernate_orm_test
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}
defaults:

2
.gitignore vendored
View File

@ -40,5 +40,5 @@ nb-configuration.xml
/lsp/
.envrc
.jekyll-cache
.mvn/.gradle-enterprise
.mvn/.develocity
.quarkus

View File

@ -1,7 +1,6 @@
<gradleEnterprise>
<develocity>
<server>
<url>https://ge.quarkus.io</url>
<allowUntrusted>false</allowUntrusted>
</server>
<buildScan>
<!-- adjust conditions ?
@ -18,9 +17,6 @@
<!-- Don't share ip addresses-->
<ipAddresses>#{{'0.0.0.0'}}</ipAddresses>
</obfuscation>
<capture>
<goalInputFiles>true</goalInputFiles>
</capture>
<!-- https://docs.gradle.com/enterprise/maven-extension/#manual_access_key_configuration -->
<backgroundBuildScanUpload>#{env['CI'] == null}</backgroundBuildScanUpload>
</buildScan>
@ -30,7 +26,7 @@
</local>
<remote>
<enabled>#{env['RELEASE_GITHUB_TOKEN'] == null and properties['no-build-cache'] == null}</enabled>
<storeEnabled>#{env['CI'] != null and env['GRADLE_ENTERPRISE_ACCESS_KEY'] != null and env['GRADLE_ENTERPRISE_ACCESS_KEY'] != '' and env['RELEASE_GITHUB_TOKEN'] == null}</storeEnabled>
<storeEnabled>#{env['CI'] != null and env['DEVELOCITY_ACCESS_KEY'] != null and env['DEVELOCITY_ACCESS_KEY'] != '' and env['RELEASE_GITHUB_TOKEN'] == null}</storeEnabled>
</remote>
</buildCache>
</gradleEnterprise>
</develocity>

View File

@ -1,8 +1,8 @@
<extensions>
<extension>
<groupId>com.gradle</groupId>
<artifactId>gradle-enterprise-maven-extension</artifactId>
<version>1.20.1</version>
<artifactId>develocity-maven-extension</artifactId>
<version>1.21</version>
</extension>
<extension>
<groupId>com.gradle</groupId>
@ -12,7 +12,7 @@
<extension>
<groupId>com.gradle</groupId>
<artifactId>quarkus-build-caching-extension</artifactId>
<version>0.12</version>
<version>1.0</version>
</extension>
<extension>
<groupId>io.quarkus.develocity</groupId>

View File

@ -544,17 +544,17 @@ It is only relevant for members of the Quarkus team and you should contact eithe
When you have the account set up, from the root of your local Quarkus workspace, run:
```
./mvnw gradle-enterprise:provision-access-key
./mvnw develocity:provision-access-key
```
and log in in the browser window it will open (if not already logged in).
Your access key will be stored in the `~/.m2/.gradle-enterprise/keys.properties` file.
Your access key will be stored in the `~/.m2/.develocity/keys.properties` file.
From then your build scans will be sent to the Develocity instance and you will be able to benefit from the build cache.
You can alternatively also generate an API key from the Develocity UI and then use an environment variable like this:
```
export GRADLE_ENTERPRISE_ACCESS_KEY=ge.quarkus.io=a_secret_key
export DEVELOCITY_ACCESS_KEY=ge.quarkus.io=a_secret_key
```
When debugging a test (and especially flaky tests), you might want to temporarily disable the build cache.
@ -564,7 +564,7 @@ The remote cache is stored on the Develocity server and is populated by CI.
To be able to benefit from the remote cache, you need to use a Java version tested on CI (at the moment, either 17 or 21) and the same Maven version (thus why it is recommended to use the Maven wrapper aka `./mvnw`).
Note that the local cache alone should bring you a significant speedup.
The local cache is stored in the `~/.m2/.gradle-enterprise/build-cache/` directory.
The local cache is stored in the `~/.m2/.develocity/build-cache/` directory.
If you have problems with your local cache, you can delete this directory.
###### -Dquickly

View File

@ -1,14 +1,20 @@
plugins {
id("com.gradle.enterprise") version "3.17"
id("com.gradle.develocity") version "3.17"
}
gradleEnterprise {
develocity {
val isAuthenticated = !System.getenv("DEVELOCITY_ACCESS_KEY").isNullOrEmpty()
if(isAuthenticated) {
server = "https://ge.quarkus.io"
}
buildScan {
// plugin configuration
//See also: https://docs.gradle.com/enterprise/gradle-plugin/
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishOnFailure()
if (!isAuthenticated) {
termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use")
termsOfUseAgree.set("yes")
}
publishing.onlyIf { it.buildResult.failures.isNotEmpty() }
uploadInBackground = System.getenv("CI").isNullOrEmpty()
}
}

View File

@ -699,7 +699,7 @@ Setting `quarkus.config-tracking.enabled` to `true` will enable a configuration
The `prod` part of the `quarkus-prod-config-dump` file name refers to the Quarkus build mode, indicating that the dump was taken for the production build.
The reason `${project.basedir}/.quarkus` directory was chosen as the default location was to make it easy to track build time configuration changes between builds and use that as an indicator to build output caching tools (such as https://maven.apache.org/extensions/maven-build-cache-extension/[Apache Maven Build Cache] and https://gradle.com/gradle-enterprise-solutions/build-cache/[Gradle Enterprise Build Cache]) whether the application binary has to be re-built.
The reason `${project.basedir}/.quarkus` directory was chosen as the default location was to make it easy to track build time configuration changes between builds and use that as an indicator to build output caching tools (such as https://maven.apache.org/extensions/maven-build-cache-extension/[Apache Maven Build Cache] and https://gradle.com/gradle-enterprise-solutions/build-cache/[Develocity Build Cache]) whether the application binary has to be re-built.
==== Filtering configuration options