mirror of
https://github.com/gradle/actions.git
synced 2025-08-18 23:01:27 +08:00
Switch from com.gradle.enterprise to com.gradle.develocity
This commit is contained in:
parent
81b3a2db60
commit
518b14b196
@ -1,13 +1,12 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.enterprise" version "3.17"
|
id "com.gradle.develocity" version "3.17"
|
||||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.13"
|
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.13"
|
||||||
}
|
}
|
||||||
|
|
||||||
gradleEnterprise {
|
develocity {
|
||||||
buildScan {
|
buildScan {
|
||||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||||
termsOfServiceAgree = "yes"
|
termsOfUseAgree = "yes"
|
||||||
publishAlways()
|
|
||||||
uploadInBackground = false
|
uploadInBackground = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.gradle.enterprise") version "3.17"
|
id("com.gradle.develocity") version "3.17"
|
||||||
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.13"
|
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.13"
|
||||||
}
|
}
|
||||||
|
|
||||||
gradleEnterprise {
|
develocity {
|
||||||
buildScan {
|
buildScan {
|
||||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||||
termsOfServiceAgree = "yes"
|
termsOfUseAgree = "yes"
|
||||||
publishAlways()
|
uploadInBackground = false
|
||||||
isUploadInBackground = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.build-scan" version "3.17"
|
id "com.gradle.develocity" version "3.17"
|
||||||
}
|
}
|
||||||
|
|
||||||
gradleEnterprise {
|
develocity {
|
||||||
buildScan {
|
buildScan {
|
||||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||||
termsOfServiceAgree = "yes"
|
termsOfUseAgree = "yes"
|
||||||
publishAlways()
|
|
||||||
uploadInBackground = false
|
uploadInBackground = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.enterprise" version "3.17"
|
id "com.gradle.develocity" version "3.17"
|
||||||
}
|
}
|
||||||
|
|
||||||
gradleEnterprise {
|
develocity {
|
||||||
buildScan {
|
buildScan {
|
||||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||||
termsOfServiceAgree = "yes"
|
termsOfUseAgree = "yes"
|
||||||
publishAlways()
|
|
||||||
uploadInBackground = false
|
uploadInBackground = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.enterprise" version "3.17"
|
id "com.gradle.develocity" version "3.17"
|
||||||
}
|
}
|
||||||
|
|
||||||
gradleEnterprise {
|
develocity {
|
||||||
buildScan {
|
buildScan {
|
||||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||||
termsOfServiceAgree = "yes"
|
termsOfUseAgree = "yes"
|
||||||
publishAlways()
|
|
||||||
uploadInBackground = false
|
uploadInBackground = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,10 +31,10 @@ jobs:
|
|||||||
uses: ./setup-gradle
|
uses: ./setup-gradle
|
||||||
with:
|
with:
|
||||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||||
# Add "enterprise" to main cache entry but omit "notifications"
|
# Add "application" to main cache entry but omit "notifications"
|
||||||
gradle-home-cache-includes: |
|
gradle-home-cache-includes: |
|
||||||
caches
|
caches
|
||||||
enterprise
|
application
|
||||||
# Exclude build-cache from main cache entry
|
# Exclude build-cache from main cache entry
|
||||||
gradle-home-cache-excludes: |
|
gradle-home-cache-excludes: |
|
||||||
caches/build-cache-*
|
caches/build-cache-*
|
||||||
@ -61,7 +61,7 @@ jobs:
|
|||||||
# Use the same configuration as used in the seed build
|
# Use the same configuration as used in the seed build
|
||||||
gradle-home-cache-includes: |
|
gradle-home-cache-includes: |
|
||||||
caches
|
caches
|
||||||
enterprise
|
application
|
||||||
gradle-home-cache-excludes: |
|
gradle-home-cache-excludes: |
|
||||||
caches/build-cache-*
|
caches/build-cache-*
|
||||||
caches/*/executionHistory
|
caches/*/executionHistory
|
||||||
|
@ -660,11 +660,11 @@ jobs:
|
|||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
```
|
```
|
||||||
|
|
||||||
This configuration will automatically apply `v3.17` of the [Develocity Gradle plugin](https://docs.gradle.com/enterprise/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
|
This configuration will automatically apply `v3.17` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
|
||||||
|
|
||||||
This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans.
|
This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans.
|
||||||
In the likely scenario that your Develocity server requires authentication, you will also need to configure an additional environment variable
|
In the likely scenario that your Develocity server requires authentication, you will also need to configure an additional environment variable
|
||||||
with a valid [Develocity access key](https://docs.gradle.com/enterprise/gradle-plugin/#via_environment_variable).
|
with a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable).
|
||||||
|
|
||||||
## Configuring Develocity injection
|
## Configuring Develocity injection
|
||||||
|
|
||||||
@ -677,7 +677,7 @@ The `init-script` supports several additional configuration parameters that you
|
|||||||
| DEVELOCITY_ALLOW_UNTRUSTED_SERVER | | allow communication with an untrusted server; set to _true_ if your Develocity instance is using a self-signed certificate |
|
| DEVELOCITY_ALLOW_UNTRUSTED_SERVER | | allow communication with an untrusted server; set to _true_ if your Develocity instance is using a self-signed certificate |
|
||||||
| DEVELOCITY_CAPTURE_FILE_FINGERPRINTS | | enables capturing the paths and content hashes of each individual input file |
|
| DEVELOCITY_CAPTURE_FILE_FINGERPRINTS | | enables capturing the paths and content hashes of each individual input file |
|
||||||
| DEVELOCITY_ENFORCE_URL | | enforce the configured Develocity URL over a URL configured in the project's build; set to _true_ to enforce publication of build scans to the configured Develocity URL |
|
| DEVELOCITY_ENFORCE_URL | | enforce the configured Develocity URL over a URL configured in the project's build; set to _true_ to enforce publication of build scans to the configured Develocity URL |
|
||||||
| DEVELOCITY_PLUGIN_VERSION | :white_check_mark: | the version of the [Develocity Gradle plugin](https://docs.gradle.com/enterprise/gradle-plugin/) to apply |
|
| DEVELOCITY_PLUGIN_VERSION | :white_check_mark: | the version of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/) to apply |
|
||||||
| DEVELOCITY_CCUD_PLUGIN_VERSION | | the version of the [Common Custom User Data Gradle plugin](https://github.com/gradle/common-custom-user-data-gradle-plugin) to apply, if any |
|
| DEVELOCITY_CCUD_PLUGIN_VERSION | | the version of the [Common Custom User Data Gradle plugin](https://github.com/gradle/common-custom-user-data-gradle-plugin) to apply, if any |
|
||||||
| GRADLE_PLUGIN_REPOSITORY_URL | | the URL of the repository to use when resolving the Develocity and CCUD plugins; the Gradle Plugin Portal is used by default |
|
| GRADLE_PLUGIN_REPOSITORY_URL | | the URL of the repository to use when resolving the Develocity and CCUD plugins; the Gradle Plugin Portal is used by default |
|
||||||
| GRADLE_PLUGIN_REPOSITORY_USERNAME | | the username for the repository URL to use when resolving the Develocity and CCUD plugins |
|
| GRADLE_PLUGIN_REPOSITORY_USERNAME | | the username for the repository URL to use when resolving the Develocity and CCUD plugins |
|
||||||
|
@ -113,7 +113,7 @@ function renderBuildScan(result: BuildResult): string {
|
|||||||
return renderBuildScanBadge(
|
return renderBuildScanBadge(
|
||||||
'PUBLISH_FAILED',
|
'PUBLISH_FAILED',
|
||||||
'orange',
|
'orange',
|
||||||
'https://docs.gradle.com/enterprise/gradle-plugin/#troubleshooting'
|
'https://docs.gradle.com/develocity/gradle-plugin/#troubleshooting'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (result.buildScanUri) {
|
if (result.buildScanUri) {
|
||||||
|
@ -62,7 +62,7 @@ def captureUsingBuildScanPublished(buildScanExtension, rootProject, invocationId
|
|||||||
if (githubOutput) {
|
if (githubOutput) {
|
||||||
new File(githubOutput) << "build-scan-url=${buildScan.buildScanUri}\n"
|
new File(githubOutput) << "build-scan-url=${buildScan.buildScanUri}\n"
|
||||||
} else {
|
} else {
|
||||||
// Retained for compatibility with older GitHub Enterprise versions
|
// Retained for compatibility with older GHES versions
|
||||||
println("::set-output name=build-scan-url::${buildScan.buildScanUri}")
|
println("::set-output name=build-scan-url::${buildScan.buildScanUri}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.enterprise" version "3.17"
|
id "com.gradle.develocity" version "3.17"
|
||||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.13"
|
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.13"
|
||||||
}
|
}
|
||||||
|
|
||||||
gradleEnterprise {
|
develocity {
|
||||||
buildScan {
|
buildScan {
|
||||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||||
termsOfServiceAgree = "yes"
|
termsOfUseAgree = "yes"
|
||||||
publishAlways()
|
|
||||||
uploadInBackground = false
|
uploadInBackground = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,15 +171,12 @@ class TestBuildResultRecorder extends BaseInitScriptTest {
|
|||||||
when:
|
when:
|
||||||
settingsFile.text = """
|
settingsFile.text = """
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gradle.enterprise' version '3.17' apply(false)
|
id 'com.gradle.develocity' version '3.17' apply(false)
|
||||||
}
|
}
|
||||||
gradle.settingsEvaluated {
|
gradle.settingsEvaluated {
|
||||||
apply plugin: 'com.gradle.enterprise'
|
apply plugin: 'com.gradle.develocity'
|
||||||
gradleEnterprise {
|
develocity {
|
||||||
server = '$mockScansServer.address'
|
server = '$mockScansServer.address'
|
||||||
buildScan {
|
|
||||||
publishAlways()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""" + settingsFile.text
|
""" + settingsFile.text
|
||||||
|
@ -55,7 +55,7 @@ class TestDevelocityInjection extends BaseInitScriptTest {
|
|||||||
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
||||||
|
|
||||||
given:
|
given:
|
||||||
settingsFile.text = maybeAddGradleEnterprisePlugin(testGradleVersion.gradleVersion, '3.16.2')
|
settingsFile.text = maybeAddDevelocityPlugin(testGradleVersion.gradleVersion, '3.16.2')
|
||||||
buildFile.text = maybeAddBuildScanPlugin(testGradleVersion.gradleVersion, '3.16.2')
|
buildFile.text = maybeAddBuildScanPlugin(testGradleVersion.gradleVersion, '3.16.2')
|
||||||
|
|
||||||
when:
|
when:
|
||||||
@ -443,15 +443,15 @@ class TestDevelocityInjection extends BaseInitScriptTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String maybeAddGradleEnterprisePlugin(GradleVersion gradleVersion, String gePluginVersion) {
|
private String maybeAddDevelocityPlugin(GradleVersion gradleVersion, String gePluginVersion) {
|
||||||
if (gradleVersion < GradleVersion.version('6.0')) {
|
if (gradleVersion < GradleVersion.version('6.0')) {
|
||||||
'' // applied in build.gradle
|
'' // applied in build.gradle
|
||||||
} else {
|
} else {
|
||||||
"""
|
"""
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gradle.enterprise' version '${gePluginVersion}'
|
id 'com.gradle.develocity' version '${gePluginVersion}'
|
||||||
}
|
}
|
||||||
gradleEnterprise {
|
develocity {
|
||||||
server = '${mockScansServer.address}'
|
server = '${mockScansServer.address}'
|
||||||
buildScan {
|
buildScan {
|
||||||
publishAlways()
|
publishAlways()
|
||||||
@ -475,7 +475,7 @@ class TestDevelocityInjection extends BaseInitScriptTest {
|
|||||||
} else if (gradleVersion < GradleVersion.version('6.0')) {
|
} else if (gradleVersion < GradleVersion.version('6.0')) {
|
||||||
"""
|
"""
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gradle.build-scan' version '${buildScanPluginVersion}'
|
id 'com.gradle.develocity' version '${buildScanPluginVersion}'
|
||||||
}
|
}
|
||||||
buildScan {
|
buildScan {
|
||||||
server = '${mockScansServer.address}'
|
server = '${mockScansServer.address}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user