|
#1
|
|||
|
|||
The value is parsed as an environment variable when initiated by a jenkins job.
See https://wiki.jenkins-ci.org/display/...nmentVariables The job build command: Code:
VisBuildcmd.exe "BUILD_URL=%BUILD_URL%" /mta /b NUnitTest.bld Code:
VisBuildcmd.exe "BUILD_URL=http://jenkins/job/Test%20New%20NUnit%20Test%20Script/lastBuild" /mta /b NUnitTest.bld Code:
Eg: http://jenkins/job/TestNewNUnitTestScript/ - OK Eg: http://jenkins/job/Test New NUnit Test Script/ - Still OK, but will be escaped to: http://jenkins/job/Test%20New%20NUnit%20Test%20Script/ - Not OK |
#2
|
|||
|
|||
Thanks for the codes, however it still fails with these error:
Code:
Error in Run Script (VBScript) script code at Line 11, Column 1 (http://jenkins/job/Test<Undefined macro 20New>20NUnit<Undefined macro 20Test>20Script/lastBuild) 13-11-2014 14:07:27: Step '4 - use' failed 13-11-2014 14:07:27: Build ended (elapsed = 00:00:00). Code:
http://jenkins/job/Test%20New%20NUnit%20Test%20Script/lastBuild |
#3
|
|||
|
|||
Add a step at the beginning of the project to escape the BUILD_URL macro value that was passed in (see attached).
http://www.kinook.com/VisBuildPro/Ma...ecialchars.htm |
#4
|
|||
|
|||
Epic. Thanks alot for this!
|
#5
|
|||
|
|||
Copy the escaped macro value to another project macro
Is there any way to copy the escaped macro value BUILD_URL to another project macro BUILD_URL3(not a temp macro)?
In the sample attached I tried to do it with a Set macro step but it did not work -the macro BUILD_URL3 has the unescaped value(The next step log macro fails) |
#6
|
|||
|
|||
In a Set Macro action, check the 'Don't expand macros and script' option.
https://kinook.com/VisBuildPro/Manua...acroaction.htm |
#7
|
|||
|
|||
Thanks!And if in the Value field there is the macro I do not want expanded and another macro which I want to have it expanded?
|
#8
|
|||
|
|||
You can't expand partially. It's all or nothing. Escape (double) something that should not be evaluated as a macro.
|
|
|