-
Bug
-
Resolution: Unresolved
-
Blocker
-
None
-
jenkins ver. 1.652
Export Prameters plugin version - 1.9
operating system - windows 2012 R2
I have a Parameter in jenkins job whose value is a windows file path.for example , consider the following parameter
LICENSE_FILE=C:\Softwares\abc.lic
after this i have used the Build action "Export Parameters to File " and i have configured this action to export parameters to a file which is of format .properties.
for example let the file name to which i exported parameters be "installer.properties"
after the build is done . if i verify the contents of the installer.properties file , the parameter LICENSE_FILE has reflected in the file in the following format
LICENSE_FILE=C\:\\Softwares
abc.lic
There is "\" after the colon ":" and there is an extra "\" for each "\" in the value of the parameter .
Because of this issue i was not able to export the value i intended to the properties file
[JENKINS-43905] Problem with Export Parameters to file in case of Parameters with value as windows files paths
Description |
Original:
I have a Parameter in jenkins job whose value is a windows file path.for example , consider the following parameter *LICENSE_FILE*=*C:\Softwares\abc.lic* after this i have used the Build action "Export Parameters to File " and i have configured this action to export parameters to a file which is of format .properties. for example let the file name to which i exported parameters be "installer.properties" after the build is done . if i verify the contents of the installer.properties file , the parameter LICENSE_FILE has reflected in the file in the following format LICENSE_FILE=*C\:\\Softwares\\abc.lic* There is "\" after the colon (:) and there is an extra "\" for each "\" in the value of the parameter . Because of this issue i was not able to export the value i intended to the properties file |
New:
I have a Parameter in jenkins job whose value is a windows file path.for example , consider the following parameter *LICENSE_FILE*=*C:\Softwares\abc.lic* after this i have used the Build action "Export Parameters to File " and i have configured this action to export parameters to a file which is of format .properties. for example let the file name to which i exported parameters be "installer.properties" after the build is done . if i verify the contents of the installer.properties file , the parameter LICENSE_FILE has reflected in the file in the following format LICENSE_FILE=*C\:\\Softwares* *abc.lic* There is "\" after the colon ":" and there is an extra "\" for each "\" in the value of the parameter . Because of this issue i was not able to export the value i intended to the properties file |
Priority | Original: Minor [ 4 ] | New: Blocker [ 1 ] |
Description |
Original:
I have a Parameter in jenkins job whose value is a windows file path.for example , consider the following parameter *LICENSE_FILE*=*C:\Softwares\abc.lic* after this i have used the Build action "Export Parameters to File " and i have configured this action to export parameters to a file which is of format .properties. for example let the file name to which i exported parameters be "installer.properties" after the build is done . if i verify the contents of the installer.properties file , the parameter LICENSE_FILE has reflected in the file in the following format LICENSE_FILE=*C\:\\Softwares* *abc.lic* There is "\" after the colon ":" and there is an extra "\" for each "\" in the value of the parameter . Because of this issue i was not able to export the value i intended to the properties file |
New:
I have a Parameter in jenkins job whose value is a windows file path.for example , consider the following parameter *LICENSE_FILE*=*C:\Softwares\abc.lic* after this i have used the Build action "Export Parameters to File " and i have configured this action to export parameters to a file which is of format .properties. for example let the file name to which i exported parameters be "installer.properties" after the build is done . if i verify the contents of the installer.properties file , the parameter LICENSE_FILE has reflected in the file in the following format LICENSE_FILE=*C\:\\**Softwares\\**abc.lic* There is "\" after the colon ":" and there is an extra "\" for each "\" in the value of the parameter . Because of this issue i was not able to export the value i intended to the properties file |
Description |
Original:
I have a Parameter in jenkins job whose value is a windows file path.for example , consider the following parameter *LICENSE_FILE*=*C:\Softwares\abc.lic* after this i have used the Build action "Export Parameters to File " and i have configured this action to export parameters to a file which is of format .properties. for example let the file name to which i exported parameters be "installer.properties" after the build is done . if i verify the contents of the installer.properties file , the parameter LICENSE_FILE has reflected in the file in the following format LICENSE_FILE=*C\:\\**Softwares\\**abc.lic* There is "\" after the colon ":" and there is an extra "\" for each "\" in the value of the parameter . Because of this issue i was not able to export the value i intended to the properties file |
New:
I have a Parameter in jenkins job whose value is a windows file path.for example , consider the following parameter *LICENSE_FILE*=*C:\Softwares\abc.lic* after this i have used the Build action "Export Parameters to File " and i have configured this action to export parameters to a file which is of format .properties. for example let the file name to which i exported parameters be "installer.properties" after the build is done . if i verify the contents of the installer.properties file , the parameter LICENSE_FILE has reflected in the file in the following format LICENSE_FILE=*C\:\\Softwares\\abc.lic* There is "\" after the colon ":" and there is an extra "\" for each "\" in the value of the parameter . Because of this issue i was not able to export the value i intended to the properties file |
This is by design.
http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#store%28java.io.Writer,%20java.lang.String%29
Colon is special character for properties. No solution to suppress escaping.
Please escape '\' itself.
Or use '/' as separator. Windows Server can recognize '/' as path separator.
Another solution is to select other file format.