mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
[bot] Update dist directory
This commit is contained in:
committed by
github-actions[bot]
parent
c1bdc4d73b
commit
4a417b5b1a
16
dist/setup-gradle/post/index.js
vendored
16
dist/setup-gradle/post/index.js
vendored
@@ -184196,7 +184196,7 @@ async function setup(config) {
|
||||
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl());
|
||||
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree());
|
||||
}
|
||||
return (0, short_lived_token_1.setupToken)(config.getDevelocityAccessKey(), config.getDevelocityTokenExpiry());
|
||||
return (0, short_lived_token_1.setupToken)(config.getDevelocityAccessKey(), config.getDevelocityAllowUntrustedServer(), config.getDevelocityTokenExpiry());
|
||||
}
|
||||
function maybeExportVariable(variableName, value) {
|
||||
if (!process.env[variableName]) {
|
||||
@@ -184258,11 +184258,11 @@ const httpm = __importStar(__nccwpck_require__(96184));
|
||||
const core = __importStar(__nccwpck_require__(37484));
|
||||
const configuration_1 = __nccwpck_require__(66081);
|
||||
const deprecation_collector_1 = __nccwpck_require__(18391);
|
||||
async function setupToken(develocityAccessKey, develocityTokenExpiry) {
|
||||
async function setupToken(develocityAccessKey, develocityAllowUntrustedServer, develocityTokenExpiry) {
|
||||
if (develocityAccessKey) {
|
||||
try {
|
||||
core.debug('Fetching short-lived token...');
|
||||
const tokens = await getToken(develocityAccessKey, develocityTokenExpiry);
|
||||
const tokens = await getToken(develocityAccessKey, develocityAllowUntrustedServer, develocityTokenExpiry);
|
||||
if (tokens != null && !tokens.isEmpty()) {
|
||||
core.debug(`Got token(s), setting the access key env vars`);
|
||||
const token = tokens.raw();
|
||||
@@ -184292,10 +184292,10 @@ function handleMissingAccessToken() {
|
||||
core.warning(`The ${configuration_1.BuildScanConfig.DevelocityAccessKeyEnvVar} env var should be mapped to a short-lived token`);
|
||||
}
|
||||
}
|
||||
async function getToken(accessKey, expiry) {
|
||||
async function getToken(accessKey, allowUntrustedServer, expiry) {
|
||||
const empty = new Promise(r => r(null));
|
||||
const develocityAccessKey = DevelocityAccessCredentials.parse(accessKey);
|
||||
const shortLivedTokenClient = new ShortLivedTokenClient();
|
||||
const shortLivedTokenClient = new ShortLivedTokenClient(allowUntrustedServer);
|
||||
if (develocityAccessKey == null) {
|
||||
return empty;
|
||||
}
|
||||
@@ -184316,10 +184316,12 @@ async function getToken(accessKey, expiry) {
|
||||
return empty;
|
||||
}
|
||||
class ShortLivedTokenClient {
|
||||
constructor() {
|
||||
this.httpc = new httpm.HttpClient('gradle/actions/setup-gradle');
|
||||
constructor(develocityAllowUntrustedServer) {
|
||||
this.maxRetries = 3;
|
||||
this.retryInterval = 1000;
|
||||
this.httpc = new httpm.HttpClient('gradle/actions/setup-gradle', undefined, {
|
||||
ignoreSslError: develocityAllowUntrustedServer
|
||||
});
|
||||
}
|
||||
async fetchToken(serverUrl, accessKey, expiry) {
|
||||
const queryParams = expiry ? `?expiresInHours=${expiry}` : '';
|
||||
|
||||
2
dist/setup-gradle/post/index.js.map
vendored
2
dist/setup-gradle/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user