mirror of
https://github.com/gradle/actions
synced 2024-11-27 11:52:24 +00:00
Switch from com.gradle.enterprise to com.gradle.develocity
This commit is contained in:
parent
81b3a2db60
commit
518b14b196
12 changed files with 41 additions and 50 deletions
|
@ -1,13 +1,12 @@
|
|||
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"
|
||||
}
|
||||
|
||||
gradleEnterprise {
|
||||
develocity {
|
||||
buildScan {
|
||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||
termsOfServiceAgree = "yes"
|
||||
publishAlways()
|
||||
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||
termsOfUseAgree = "yes"
|
||||
uploadInBackground = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
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"
|
||||
}
|
||||
|
||||
gradleEnterprise {
|
||||
develocity {
|
||||
buildScan {
|
||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||
termsOfServiceAgree = "yes"
|
||||
publishAlways()
|
||||
isUploadInBackground = false
|
||||
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||
termsOfUseAgree = "yes"
|
||||
uploadInBackground = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
plugins {
|
||||
id "com.gradle.build-scan" version "3.17"
|
||||
id "com.gradle.develocity" version "3.17"
|
||||
}
|
||||
|
||||
gradleEnterprise {
|
||||
develocity {
|
||||
buildScan {
|
||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||
termsOfServiceAgree = "yes"
|
||||
publishAlways()
|
||||
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||
termsOfUseAgree = "yes"
|
||||
uploadInBackground = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
plugins {
|
||||
id "com.gradle.enterprise" version "3.17"
|
||||
id "com.gradle.develocity" version "3.17"
|
||||
}
|
||||
|
||||
gradleEnterprise {
|
||||
develocity {
|
||||
buildScan {
|
||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||
termsOfServiceAgree = "yes"
|
||||
publishAlways()
|
||||
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||
termsOfUseAgree = "yes"
|
||||
uploadInBackground = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
plugins {
|
||||
id "com.gradle.enterprise" version "3.17"
|
||||
id "com.gradle.develocity" version "3.17"
|
||||
}
|
||||
|
||||
gradleEnterprise {
|
||||
develocity {
|
||||
buildScan {
|
||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||
termsOfServiceAgree = "yes"
|
||||
publishAlways()
|
||||
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||
termsOfUseAgree = "yes"
|
||||
uploadInBackground = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,10 +31,10 @@ jobs:
|
|||
uses: ./setup-gradle
|
||||
with:
|
||||
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: |
|
||||
caches
|
||||
enterprise
|
||||
application
|
||||
# Exclude build-cache from main cache entry
|
||||
gradle-home-cache-excludes: |
|
||||
caches/build-cache-*
|
||||
|
@ -61,7 +61,7 @@ jobs:
|
|||
# Use the same configuration as used in the seed build
|
||||
gradle-home-cache-includes: |
|
||||
caches
|
||||
enterprise
|
||||
application
|
||||
gradle-home-cache-excludes: |
|
||||
caches/build-cache-*
|
||||
caches/*/executionHistory
|
||||
|
|
|
@ -660,11 +660,11 @@ jobs:
|
|||
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.
|
||||
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
|
||||
|
||||
|
@ -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_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_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 |
|
||||
| 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 |
|
||||
|
|
|
@ -113,7 +113,7 @@ function renderBuildScan(result: BuildResult): string {
|
|||
return renderBuildScanBadge(
|
||||
'PUBLISH_FAILED',
|
||||
'orange',
|
||||
'https://docs.gradle.com/enterprise/gradle-plugin/#troubleshooting'
|
||||
'https://docs.gradle.com/develocity/gradle-plugin/#troubleshooting'
|
||||
)
|
||||
}
|
||||
if (result.buildScanUri) {
|
||||
|
|
|
@ -62,7 +62,7 @@ def captureUsingBuildScanPublished(buildScanExtension, rootProject, invocationId
|
|||
if (githubOutput) {
|
||||
new File(githubOutput) << "build-scan-url=${buildScan.buildScanUri}\n"
|
||||
} 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}")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
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"
|
||||
}
|
||||
|
||||
gradleEnterprise {
|
||||
develocity {
|
||||
buildScan {
|
||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||
termsOfServiceAgree = "yes"
|
||||
publishAlways()
|
||||
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
|
||||
termsOfUseAgree = "yes"
|
||||
uploadInBackground = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,15 +171,12 @@ class TestBuildResultRecorder extends BaseInitScriptTest {
|
|||
when:
|
||||
settingsFile.text = """
|
||||
plugins {
|
||||
id 'com.gradle.enterprise' version '3.17' apply(false)
|
||||
id 'com.gradle.develocity' version '3.17' apply(false)
|
||||
}
|
||||
gradle.settingsEvaluated {
|
||||
apply plugin: 'com.gradle.enterprise'
|
||||
gradleEnterprise {
|
||||
apply plugin: 'com.gradle.develocity'
|
||||
develocity {
|
||||
server = '$mockScansServer.address'
|
||||
buildScan {
|
||||
publishAlways()
|
||||
}
|
||||
}
|
||||
}
|
||||
""" + settingsFile.text
|
||||
|
|
|
@ -55,7 +55,7 @@ class TestDevelocityInjection extends BaseInitScriptTest {
|
|||
assumeTrue testGradleVersion.compatibleWithCurrentJvm
|
||||
|
||||
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')
|
||||
|
||||
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')) {
|
||||
'' // applied in build.gradle
|
||||
} else {
|
||||
"""
|
||||
plugins {
|
||||
id 'com.gradle.enterprise' version '${gePluginVersion}'
|
||||
id 'com.gradle.develocity' version '${gePluginVersion}'
|
||||
}
|
||||
gradleEnterprise {
|
||||
develocity {
|
||||
server = '${mockScansServer.address}'
|
||||
buildScan {
|
||||
publishAlways()
|
||||
|
@ -475,7 +475,7 @@ class TestDevelocityInjection extends BaseInitScriptTest {
|
|||
} else if (gradleVersion < GradleVersion.version('6.0')) {
|
||||
"""
|
||||
plugins {
|
||||
id 'com.gradle.build-scan' version '${buildScanPluginVersion}'
|
||||
id 'com.gradle.develocity' version '${buildScanPluginVersion}'
|
||||
}
|
||||
buildScan {
|
||||
server = '${mockScansServer.address}'
|
||||
|
|
Loading…
Reference in a new issue