I just wanna add build number in a new line to at the end of a txt simple text file (name: version.property) after build step.
Using shell console plugin in any job on Jenkins UI:
echo blabla $BUILD_NUMBER >> version.property
Unfortunately, this way doesnt work.
Adding "\n" or "\n\" to the command dont work.
my current solution is:
echo >> version.property
echo blabla $BUILD_NUMBER >> version.property
If I add a the new line with " echo blabla >> version.property" on the batch server, the bash on the server automatically add the new line to the end of the file. If I use the shell plugin on Jenkins, I change the file on Jenkins and send the file via ssh to the batch server itself (using shh on Jenkins), then it doesn't work with only one line works.
I guess shell plugin has an issue to format a It seems it does matter what shall you use .property file correctly.