From d9c391ebe164c289d358741630d077d9d2ad62eb Mon Sep 17 00:00:00 2001 From: delarea Date: Mon, 11 Nov 2024 09:22:19 +0200 Subject: [PATCH] Format --- lib/cleanup.js | 5 +++-- lib/utils.js | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/cleanup.js b/lib/cleanup.js index 232861b3..c6981d17 100644 --- a/lib/cleanup.js +++ b/lib/cleanup.js @@ -139,8 +139,9 @@ function collectAndPublishBuildInfoIfNeeded() { // Publish the build info to Artifactory try { core.startGroup('Publish the build info to JFrog Artifactory'); - // Used for usage reporting - core.exportVariable("JFROG_CLI_USAGE_BUILD_PUBLISHED_AUTO", "TRUE"); + // Set the environment variable to indicate that the build has been automatically published. + // This is used by the usage report to track instances of automatic build publication. + core.exportVariable('JFROG_CLI_USAGE_BUILD_PUBLISHED_AUTO', 'TRUE'); yield utils_1.Utils.runCli(['rt', 'build-publish'], { cwd: workingDirectory }); } catch (error) { diff --git a/lib/utils.js b/lib/utils.js index 56fc0fc3..03fd0580 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -76,8 +76,9 @@ class Utils { } try { jfrogCredentials = yield this.getJfrogAccessTokenThroughOidcProtocol(jfrogCredentials, jsonWebToken, oidcProviderName); - // Export env for usage report after successful OIDC token exchange - this.exportVariableIfNotSet("JFROG_CLI_USAGE_CONFIG_OIDC", "TRUE"); + // Set environment variable to track OIDC logins in the usage report. + core.exportVariable('JFROG_CLI_USAGE_BUILD_PUBLISHED_AUTO', 'TRUE'); + this.exportVariableIfNotSet('JFROG_CLI_USAGE_CONFIG_OIDC', 'TRUE'); return jfrogCredentials; } catch (error) {