-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Describe the bug
When using the jf step in a Jenkins pipeline with the JFrog Jenkins plugin, attempts to redirect output to a file using shell-style redirection (>, >>) cause the step to fail with an error. This prevents users from logging command output exclusively to a file, which is common in CI/CD environments.
Current behavior
Trying to run a JFrog CLI command like the following via the jf step:
jf "rt bce my-build > ${WORKSPACE}/output.log"
jf "pip install -r ./requirements.txt --no-warn-script-location > __artifacts/installPythonDependencies.log"
Results in this error:
[Error] failed running pip command with error: 'exit status 1 - ERROR: Invalid requirement: '>': Expected package name at the start of dependency specifier
Even quoting the full command doesn’t help. The plugin appears to treat the > symbol as an invalid argument rather than passing the command to a shell interpreter.
Reproduction steps
- Create a Jenkins pipeline with the jf step. (dotnet, pip, npm, docker etc...)
- Run a JFrog CLI command and try to append > output.log to redirect output.
- Observe the build failure and error related to >.
Expected behavior
The jf step should allow redirection of standard output and error (e.g., using >, 2>&1, >>) similar to the sh or bat step, or at least provide an option to suppress console output while capturing logs to a file
JFrog plugin version
1.5.5
JFrog CLI version
2.75.0
Operating system type and version
Debian GNU/Linux 12 & Windows Server 2019 v10
JFrog Artifactory version
No response
JFrog Xray version
No response