I created a variable named build_comment
Edit Step of Type: Build > Shell/Batch Command
My command is: sudo echo ${vars.get("build_comment")} > abc
I run this configuration and input build comment as "This is build comment xxx "
The log is as follow
Why did it not produce a file abc for me ?
it just show This is build comment xxx >abc in log
Another question:
Can it show in overview?
I mean the variable value, not the file.
I would like to show it in summary table.
If it can do so, I won't create a text file with this variable and publish it.
Now I can do is show it in build version. But it is too long in title.
21:52:10,781 INFO - Checking execute condition of step 'master'...
21:52:10,781 INFO - Execute condition satisfied, selecting node to execute step 'master'...
21:52:10,820 [master@chunwen-desktop:8810] INFO - Executing step 'master' on node 'chunwen-desktop:8810'...
21:52:10,834 [master@chunwen-desktop:8810] INFO - Acquiring workspace mutex...
21:52:10,834 [master@chunwen-desktop:8810] INFO - Workspace mutex acquired.
21:52:10,834 [master@chunwen-desktop:8810] INFO - Running step...
21:52:10,834 [master@chunwen-desktop:8810] INFO - Checking execute condition of step 'produce build_comment.txt'...
21:52:10,840 [master@chunwen-desktop:8810] INFO - Execute condition satisfied, selecting node to execute step 'produce build_comment.txt'...
21:52:10,851 [produce build_comment.txt@chunwen-desktop:8810] INFO - Executing step 'produce build_comment.txt' on node 'chunwen-desktop:8810'...
21:52:10,856 [produce build_comment.txt@chunwen-desktop:8810] INFO - Acquiring workspace mutex...
21:52:10,857 [produce build_comment.txt@chunwen-desktop:8810] INFO - Workspace mutex acquired.
21:52:10,857 [produce build_comment.txt@chunwen-desktop:8810] INFO - Running step...
21:52:10,948 [produce build_comment.txt@chunwen-desktop:8810] INFO - This is build comment xxx >abc
21:52:10,984 [produce build_comment.txt@chunwen-desktop:8810] INFO - Step 'produce build_comment.txt' is successful.
21:52:10,984 [produce build_comment.txt@chunwen-desktop:8810] INFO - Workspace mutex released.
21:52:11,019 [master@chunwen-desktop:8810] INFO - Step 'master' is successful.
21:52:11,019 [master@chunwen-desktop:8810] INFO - Workspace mutex released.