Skip to content

Commit

Permalink
Fix secret reference and add additional renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
welandaz committed Jan 10, 2024
1 parent e618e59 commit d72bde3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integ-test-inject-develocity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ env:
DEVELOCITY_URL: https://ge.solutions-team.gradle.com
DEVELOCITY_PLUGIN_VERSION: 3.16.1
DEVELOCITY_CCUD_PLUGIN_VERSION: 1.12.1
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

jobs:
inject-develocity:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ name: Run build with Develocity injection
env:
DEVELOCITY_INJECTION_ENABLED: true
DEVELOCITY_URL: https://develocity.gradle.org
DEVELOCITY_URL: https://develocity.your-server.com
DEVELOCITY_PLUGIN_VERSION: 3.16.1
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} # Required to publish scans to develocity.gradle.org
Expand Down Expand Up @@ -833,7 +833,7 @@ The `init-script` supports a number of additional configuration parameters that
| 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_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_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 |

## Publishing to scans.gradle.com

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ initscript {
return
}

def pluginRepositoryUrl = getInputParam('develocity.plugin-repository.url')
def pluginRepositoryUrl = getInputParam('gradle.plugin-repository.url')
def gePluginVersion = getInputParam('develocity.plugin.version')
def ccudPluginVersion = getInputParam('develocity.ccud-plugin.version')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import java.nio.file.Files
import java.util.zip.GZIPOutputStream

class BaseInitScriptTest extends Specification {
static final String GE_PLUGIN_VERSION = '3.16.1'
static final String DEVELOCITY_PLUGIN_VERSION = '3.16.1'
static final String CCUD_PLUGIN_VERSION = '1.12.1'

static final TestGradleVersion GRADLE_3_X = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9)
Expand Down Expand Up @@ -146,7 +146,7 @@ class BaseInitScriptTest extends Specification {
} else {
"""
plugins {
id 'com.gradle.enterprise' version '${GE_PLUGIN_VERSION}'
id 'com.gradle.enterprise' version '${DEVELOCITY_PLUGIN_VERSION}'
${ccudPluginVersion ? "id 'com.gradle.common-custom-user-data-gradle-plugin' version '$ccudPluginVersion'" : ""}
}
gradleEnterprise {
Expand Down Expand Up @@ -174,7 +174,7 @@ class BaseInitScriptTest extends Specification {
} else if (gradleVersion < GradleVersion.version('6.0')) {
"""
plugins {
id 'com.gradle.build-scan' version '${GE_PLUGIN_VERSION}'
id 'com.gradle.build-scan' version '${DEVELOCITY_PLUGIN_VERSION}'
${ccudPluginVersion ? "id 'com.gradle.common-custom-user-data-gradle-plugin' version '$ccudPluginVersion'" : ""}
}
gradleEnterprise {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,12 @@ class TestDevelocityInjection extends BaseInitScriptTest {
DEVELOCITY_INJECTION_ENABLED: "true",
DEVELOCITY_URL: serverUrl,
DEVELOCITY_ALLOW_UNTRUSTED_SERVER: "true",
DEVELOCITY_PLUGIN_VERSION: GE_PLUGIN_VERSION,
DEVELOCITY_PLUGIN_VERSION: DEVELOCITY_PLUGIN_VERSION,
DEVELOCITY_BUILD_SCAN_UPLOAD_IN_BACKGROUND: "true" // Need to upload in background since our Mock server doesn't cope with foreground upload
]
if (enforceUrl) envVars.put("DEVELOCITY_ENFORCE_URL", "true")
if (ccudPluginVersion != null) envVars.put("DEVELOCITY_CCUD_PLUGIN_VERSION", ccudPluginVersion)
if (pluginRepositoryUrl != null) envVars.put("DEVELOCITY_PLUGIN_REPOSITORY_URL", pluginRepositoryUrl)
if (pluginRepositoryUrl != null) envVars.put("GRADLE_PLUGIN_REPOSITORY_URL", pluginRepositoryUrl)

return envVars
}
Expand All @@ -387,13 +387,13 @@ class TestDevelocityInjection extends BaseInitScriptTest {
"-Ddevelocity.injection-enabled=true",
"-Ddevelocity.url=$serverUrl",
"-Ddevelocity.allow-untrusted-server=true",
"-Ddevelocity.plugin.version=$GE_PLUGIN_VERSION",
"-Ddevelocity.plugin.version=$DEVELOCITY_PLUGIN_VERSION",
"-Ddevelocity.build-scan.upload-in-background=true"
]

if (enforceUrl) jvmArgs.add("-Ddevelocity.enforce-url=true")
if (ccudPluginVersion != null) jvmArgs.add("-Ddevelocity.ccud-plugin.version=$ccudPluginVersion")
if (pluginRepositoryUrl != null) jvmArgs.add("-Ddevelocity.plugin-repository.url=$pluginRepositoryUrl")
if (pluginRepositoryUrl != null) jvmArgs.add("-Dgradle.plugin-repository.url=$pluginRepositoryUrl")

return jvmArgs.collect { it.toString() } // Convert from GStrings
}
Expand Down

0 comments on commit d72bde3

Please sign in to comment.