Unverified Commit ae744298 authored by Iñaki Villar's avatar Iñaki Villar Committed by GitHub
Browse files

Fix race condition with fetching short lived token (#260)

This somehow worked before (and in our integ test) because the setup
action gave enough time to let the request short-lived token return in
time 🤷.
parents 31ae3562 bdc7162f
Loading
Loading
Loading
Loading
+1 −1
Changes for sources/src/develocity/build-scan.ts: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ export async function setup(config: BuildScanConfig): Promise<void> {
    maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_USERNAME', config.getGradlePluginRepositoryUsername())
    maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_PASSWORD', config.getGradlePluginRepositoryPassword())

    setupToken(config.getDevelocityAccessKey(), config.getDevelocityTokenExpiry())
    return setupToken(config.getDevelocityAccessKey(), config.getDevelocityTokenExpiry())
}

function maybeExportVariable(variableName: string, value: unknown): void {