I am using “Jenkins JFrog Plugin” in a pipeline, where I promote a build with the comment option.
I have not been able to find a way to run this with spaces in the comment.
jf("""rt build-promote --copy=true --comment="Promoted In Jenkins" ${env.JOB_NAME} ${env.BUILD_NUMBER} test_stable""")
This gives an error about wrong number of arguments
/usr/local/bin/jf rt build-promote --copy=true --comment='A Commment' TheJobName 48 test_stable
14:59:21 12:59:21 [Error] Wrong number of arguments (4). You can read the documentation at https://jfrog.com/help/r/jfrog-cli
I have also tried:
jf("rt build-promote --comment="Promoted In Jenkins" ... ")
jf("rt build-promote --comment='Promoted In Jenkins' ... ")
It works on a command line
Question related to the comment:
Where is this comment visible in artifactory? I cannot find it. When using “Jenkins Artifactory Plugin” and adding a comment to promotion, the information is visible under the “Release History” tab of the build-info.
ulfjo2 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.