Skip to content

Commit

Permalink
Promote to v4.5.3 (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalbe4 authored Dec 23, 2024
1 parent 4871dbe commit 317a362
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
24 changes: 10 additions & 14 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,21 +451,17 @@ class Utils {
}
Utils.setUsageEnvVars();
}
// Set usage variables to be captured by JFrog CLI.
// Set usage variables to be captured by JFrog CLI visibility metric service.
static setUsageEnvVars() {
// Repository name, defaulting to an empty string if undefined.
const repoName = process.env.GITHUB_REPOSITORY || '';
// Workflow name, defaulting to an empty string if undefined.
const jobId = process.env.GITHUB_WORKFLOW || '';
// Run ID, defaulting to an empty string if undefined.
const runId = process.env.GITHUB_RUN_ID || '';
// Boolean flag indicating if JF_GIT_TOKEN is set.
const jfGitTokenSet = !!process.env.JF_GIT_TOKEN;
// Export environment variables for JFrog CLI usage.
core.exportVariable('JFROG_CLI_USAGE_JOB_ID', jobId);
core.exportVariable('JFROG_CLI_USAGE_RUN_ID', runId);
core.exportVariable('JFROG_CLI_USAGE_GIT_REPO', repoName);
core.exportVariable('JFROG_CLI_USAGE_GH_TOKEN_FOR_CODE_SCANNING_ALERTS_PROVIDED', jfGitTokenSet);
var _a, _b, _c;
// Set the GitHub repository name or default to an empty string.
core.exportVariable('JFROG_CLI_USAGE_GIT_REPO', (_a = process.env.GITHUB_REPOSITORY) !== null && _a !== void 0 ? _a : '');
// Set the GitHub workflow name or default to an empty string.
core.exportVariable('JFROG_CLI_USAGE_JOB_ID', (_b = process.env.GITHUB_WORKFLOW) !== null && _b !== void 0 ? _b : '');
// Set the GitHub run ID or default to an empty string.
core.exportVariable('JFROG_CLI_USAGE_RUN_ID', (_c = process.env.GITHUB_RUN_ID) !== null && _c !== void 0 ? _c : '');
// Indicate if JF_GIT_TOKEN is provided as an environment variable.
core.exportVariable('JFROG_CLI_USAGE_GH_TOKEN_FOR_CODE_SCANNING_ALERTS_PROVIDED', !!process.env.JF_GIT_TOKEN);
}
/**
* Enabling job summary is done by setting the output dir for the summaries.
Expand Down
2 changes: 1 addition & 1 deletion node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jfrog/setup-jfrog-cli",
"version": "4.5.1",
"version": "4.5.3",
"private": true,
"description": "Setup JFrog CLI in GitHub Actions",
"main": "lib/main.js",
Expand Down

0 comments on commit 317a362

Please sign in to comment.