Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote to v4.5.3 #238

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading