mirror of
https://github.com/gradle/actions.git
synced 2025-08-18 14:51:28 +08:00
Fix setting env vars for plugin repository (#669)
- Removed double underscore from DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_* env vars - Set GRADLE_PLUGIN_REPOSITORY_* env vars
This commit is contained in:
parent
3af3dd3475
commit
fd888822a4
@ -71,6 +71,10 @@ export class DependencyGraphConfig {
|
||||
return getOptionalInput('dependency-graph-include-configurations')
|
||||
}
|
||||
|
||||
getPluginRepository(): PluginRepositoryConfig {
|
||||
return new PluginRepositoryConfig()
|
||||
}
|
||||
|
||||
static constructJobCorrelator(workflow: string, jobId: string, matrixJson: string): string {
|
||||
const matrixString = this.describeMatrix(matrixJson)
|
||||
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`
|
||||
@ -301,16 +305,8 @@ export class BuildScanConfig {
|
||||
return core.getInput('develocity-ccud-plugin-version')
|
||||
}
|
||||
|
||||
getGradlePluginRepositoryUrl(): string {
|
||||
return core.getInput('gradle-plugin-repository-url')
|
||||
}
|
||||
|
||||
getGradlePluginRepositoryUsername(): string {
|
||||
return core.getInput('gradle-plugin-repository-username')
|
||||
}
|
||||
|
||||
getGradlePluginRepositoryPassword(): string {
|
||||
return core.getInput('gradle-plugin-repository-password')
|
||||
getPluginRepository(): PluginRepositoryConfig {
|
||||
return new PluginRepositoryConfig()
|
||||
}
|
||||
|
||||
private verifyTermsOfUseAgreement(): boolean {
|
||||
@ -328,6 +324,20 @@ export class BuildScanConfig {
|
||||
}
|
||||
}
|
||||
|
||||
export class PluginRepositoryConfig {
|
||||
getUrl(): string | undefined {
|
||||
return getOptionalInput('gradle-plugin-repository-url')
|
||||
}
|
||||
|
||||
getUsername(): string | undefined {
|
||||
return getOptionalInput('gradle-plugin-repository-username')
|
||||
}
|
||||
|
||||
getPassword(): string | undefined {
|
||||
return getOptionalInput('gradle-plugin-repository-password')
|
||||
}
|
||||
}
|
||||
|
||||
export class GradleExecutionConfig {
|
||||
getGradleVersion(): string {
|
||||
return core.getInput('gradle-version')
|
||||
|
@ -40,6 +40,10 @@ export async function setup(config: DependencyGraphConfig): Promise<void> {
|
||||
maybeExportVariable('DEPENDENCY_GRAPH_INCLUDE_PROJECTS', config.getIncludeProjects())
|
||||
maybeExportVariable('DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS', config.getExcludeConfigurations())
|
||||
maybeExportVariable('DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS', config.getIncludeConfigurations())
|
||||
|
||||
maybeExportVariable('GRADLE_PLUGIN_REPOSITORY_URL', config.getPluginRepository().getUrl())
|
||||
maybeExportVariable('GRADLE_PLUGIN_REPOSITORY_USERNAME', config.getPluginRepository().getUsername())
|
||||
maybeExportVariable('GRADLE_PLUGIN_REPOSITORY_PASSWORD', config.getPluginRepository().getPassword())
|
||||
}
|
||||
|
||||
function maybeExportVariable(variableName: string, value: string | boolean | undefined): void {
|
||||
|
@ -19,14 +19,14 @@ export async function setup(config: BuildScanConfig): Promise<void> {
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_ENFORCE_URL', config.getDevelocityEnforceUrl())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', config.getDevelocityPluginVersion())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION', config.getDevelocityCcudPluginVersion())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION__PLUGIN_REPOSITORY_URL', config.getGradlePluginRepositoryUrl())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_URL', config.getPluginRepository().getUrl())
|
||||
maybeExportVariableNotEmpty(
|
||||
'DEVELOCITY_INJECTION__PLUGIN_REPOSITORY_USERNAME',
|
||||
config.getGradlePluginRepositoryUsername()
|
||||
'DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_USERNAME',
|
||||
config.getPluginRepository().getUsername()
|
||||
)
|
||||
maybeExportVariableNotEmpty(
|
||||
'DEVELOCITY_INJECTION__PLUGIN_REPOSITORY_PASSWORD',
|
||||
config.getGradlePluginRepositoryPassword()
|
||||
'DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_PASSWORD',
|
||||
config.getPluginRepository().getPassword()
|
||||
)
|
||||
|
||||
// If build-scan-publish is enabled, ensure the environment variables are set
|
||||
|
Loading…
x
Reference in New Issue
Block a user