When I try to create a new view inside a folder using the Jenkins CLI, I get the following error and the view cannot be created:
ERROR: Invalid view name: '/' is an unsafe character
Steps to reproduce:
- Create a new folder (e.g. FOLDER01)
- Create a new view (e.g. FOLDER01/VIEW01) with the following command
$ java -jar ./jenkins-cli.jar -s http://{host}:{port}/ -auth {user}:{token} create-view FOLDER01/VIEW01 < config.xml ERROR: Invalid view name: '/' is an unsafe character
Additional Information:
I was able to create a job inside a folder using the Jenkins CLI.
$ java -jar ./jenkins-cli.jar -s http://{host}:{port}/ -auth {user}:{token} create-job FOLDER01/JOB01 < config.xml
It seems that the "create-job" command takes into account the creation of views inside folders, while the "create-view" command does not.
Suggestion:
I think it would be a good idea to take into consideration the creation of views inside folders in the "create-view" command, just like the "create-job" command.
- links to