Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea committed Nov 11, 2024
1 parent 34fc4c4 commit d9c391e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d9c391e

Please sign in to comment.