Jenkins如何将环境变量设置为参数化构建的原始文件名?

时间:2021-07-08 00:40:33

Imagine i have an file parametized build in jenkins. my file location is: Jenkins如何将环境变量设置为参数化构建的原始文件名?

想象一下,我在jenkins中有一个文件参数化构建。我的文件位置是:

Then iam going to upload a file to the build with the name File2.xlsx. i understood that the content of File2.xlsx will be moved to the file-location(File.xlsx). But the original name of the file is stored in Variable ${File.xlsx} i now tried to assign the orginal file-name to an enviroment variable but it dosent seem to work: Jenkins如何将环境变量设置为参数化构建的原始文件名? Any ideas how this could be working related question

然后我将上传文件到名为File2.xlsx的版本。我知道File2.xlsx的内容将被移动到文件位置(File.xlsx)。但是文件的原始名称存储在Variable $ {File.xlsx}中,我现在尝试将原始文件名分配给环境变量,但它看似起作用:任何想法如何处理相关的问题

1 个解决方案

#1


0  

Jenkins如何将环境变量设置为参数化构建的原始文件名? Problem where the dots and slashes in the variable_name. The variable is only avaible in the subshell, so you have to store the variable in a props file and then call another inject enviroment parameter.

问题是variable_name中的点和斜线。该变量仅在子shell中可用,因此您必须将变量存储在props文件中,然后调用另一个inject enviroment参数。

#1


0  

Jenkins如何将环境变量设置为参数化构建的原始文件名? Problem where the dots and slashes in the variable_name. The variable is only avaible in the subshell, so you have to store the variable in a props file and then call another inject enviroment parameter.

问题是variable_name中的点和斜线。该变量仅在子shell中可用,因此您必须将变量存储在props文件中,然后调用另一个inject enviroment参数。