File tree 2 files changed +8
-7
lines changed 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -155,8 +155,8 @@ jobs:
155
155
id : gradle
156
156
working-directory : .github/workflow-samples/no-ge
157
157
run : gradle help
158
- - name : Check access key is blank (DEVELOCITY_ACCESS_KEY)
159
- run : " [ \" ${DEVELOCITY_ACCESS_KEY}\" == \"\" ] || (echo 'DEVELOCITY_ACCESS_KEY has leaked !'; exit 1)"
158
+ - name : Check access key is not blank (DEVELOCITY_ACCESS_KEY)
159
+ run : " [ \" ${DEVELOCITY_ACCESS_KEY}\" != \"\" ] || (echo 'using DEVELOCITY_ACCESS_KEY !'; exit 1)"
160
160
- name : Check access key is not blank (GRADLE_ENTERPRISE_ACCESS_KEY)
161
161
run : " [ \" ${GRADLE_ENTERPRISE_ACCESS_KEY}\" != \"\" ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY is still supported in v3!'; exit 1)"
162
162
Original file line number Diff line number Diff line change @@ -19,11 +19,10 @@ export async function setupToken(
19
19
core . setSecret ( token )
20
20
exportAccessKeyEnvVars ( token )
21
21
} else {
22
- // In case of not being able to generate a token we set the env variable to empty to avoid leaks
23
- clearAccessKeyEnvVarsWithDeprecationWarning ( )
22
+ handleMissingAccessTokenWithDeprecationWarning ( )
24
23
}
25
24
} catch ( e ) {
26
- clearAccessKeyEnvVarsWithDeprecationWarning ( )
25
+ handleMissingAccessTokenWithDeprecationWarning ( )
27
26
core . warning ( `Failed to fetch short-lived token, reason: ${ e } ` )
28
27
}
29
28
}
@@ -35,12 +34,14 @@ function exportAccessKeyEnvVars(value: string): void {
35
34
)
36
35
}
37
36
38
- function clearAccessKeyEnvVarsWithDeprecationWarning ( ) : void {
37
+ function handleMissingAccessTokenWithDeprecationWarning ( ) : void {
39
38
if ( process . env [ BuildScanConfig . GradleEnterpriseAccessKeyEnvVar ] ) {
40
39
// We do not clear the GRADLE_ENTERPRISE_ACCESS_KEY env var in v3, to let the users upgrade to DV 2024.1
41
40
recordDeprecation ( `The ${ BuildScanConfig . GradleEnterpriseAccessKeyEnvVar } env var is deprecated` )
42
41
}
43
- core . exportVariable ( BuildScanConfig . DevelocityAccessKeyEnvVar , '' )
42
+ if ( process . env [ BuildScanConfig . DevelocityAccessKeyEnvVar ] ) {
43
+ core . warning ( `Failed to fetch short-lived token, using Develocity Access key` )
44
+ }
44
45
}
45
46
46
47
export async function getToken (
You can’t perform that action at this time.
0 commit comments