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

Allow capturing JFrog CLI output #113

Merged
merged 1 commit into from
Nov 17, 2024
Merged

Allow capturing JFrog CLI output #113

merged 1 commit into from
Nov 17, 2024

Conversation

yahavi
Copy link
Member

@yahavi yahavi commented Nov 9, 2024

Fix jenkinsci#11

Allow capturing command outputs by returning a string result instead of void. This change ensures that stdout is printed to the log regardless of whether the output is captured.

Usage Example:

String version = jf '-v'
echo "JFrog CLI version output: $version"

In a Declarative Pipeline:

Wrap the previous example in a script block:

script {
    String version = jf '-v'
    echo "JFrog CLI version output: $version"
}

@yahavi yahavi added the improvement Automatically generated release notes label Nov 9, 2024
@yahavi yahavi self-assigned this Nov 9, 2024
@yahavi yahavi added the safe to test Approve running integration tests on a pull request label Nov 9, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 9, 2024
@yahavi yahavi requested a review from eyalbe4 November 14, 2024 16:09
@yahavi yahavi merged commit 0e782d7 into jfrog:main Nov 17, 2024
10 of 11 checks passed
@yahavi yahavi deleted the output branch November 17, 2024 07:43
@yahavi yahavi linked an issue Dec 20, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot capture the output from the plugin Return stdout of command
2 participants