-
Notifications
You must be signed in to change notification settings - Fork 18
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
CLI not replacing forward slashes with " :: " string for JOB_NAME same as current plugin #49
Comments
@lweitzel01 thanks for using the Jenkins JFrog plugin! The replacement from You can still set the environment {
JFROG_CLI_BUILD_NAME = "${env.JOB_NAME}".replace('/', ' :: ')
} Please let us know what you think. |
Yahav, Thanks for the response. I currently have Case #240622 open for this issue with JFrog. Within our enterprise we have many application using the current pipeline plugins and teams using freestyle jobs. They are currently not using the JF CLI so the above solution would not work. For the teams that I need to move to using the JF command, I was really hoping that there could be some kind of switch added to the command line to mimc the behavior. This would be preferrable to having teams add extra environment variables with string replacements and then our build names across the enterprise could still be consistent regardless of the method used. Our existing build patterns in permissons also utilize the " :; " nomenclature which make migrating to "/" difficult. There is also an existing bug in the CLI which crashes when the "/" command is used which has still not been corrected. ((XRAY-11984). The solution is to use the deprecated jf rt build-scan syntax. However, once that no longer functions, than I would have to have teams make a change again. Adding this functionality to the jf CLI would allow me to roll this out to our enterprise now and not have to make a change again in the near future. Any chance this could be added to the JF command? |
The other think I've noticed with using :: in the build-name is that artifacts had issues navigating back and forth between the artifact and the build itself. Though this was an older version of artifactory, so ... it may already have been fixed. As a result of this, we've gone with naming our projects limiting the name to ' ' and '-' and avoiding special characters like ::, & or / \ |
Describe the bug
When using the current artifactory jenkins plugin in a freestyle job or pipeline jobs, the build name (coming from the jenkins JOB_NAME variable) when published has all the "/" characters replaced with the string " :: ". So for example a jenkins JOB_NAME of "sample/job" would show as "sample :: job" in the build name in Artifactory.
When using the jf CLI however, it looks like it is not applying the same conversion to the --build_name parameter. So the build name still has the "/" characters if uploaded with jf command line and converted to " :: " when using the plugin.
Can the jf CLI be configured to do the same string conversion on the build_name so it behaves the same way as the pipeline code and the legacy jenkins plugin??
Current behavior
Forward slashes in build-name are NOT converted to " :: "
Reproduction steps
Pass --build_name=sample/job parameter to jf upload command
Expected behavior
Expected build-name parameter to have "/" converted to " :: " to behave the same as the current freestyle plugin and jenkins pipeline code
JFrog CLI version
2.34.1
Operating system type and version
Windows and Unix
JFrog Artifactory version
7.49.8
JFrog Xray version
No response
The text was updated successfully, but these errors were encountered: