[JIRA] (JENKINS-60120) No line break in text file to add $BUILD_NUMBER

4 views
Skip to first unread message

ConstantinKwiatkowski@gmail.com (JIRA)

unread,
Nov 11, 2019, 12:15:02 AM11/11/19
to jenkinsc...@googlegroups.com
Constantin Kwiatkowski updated an issue
 
Jenkins / Bug JENKINS-60120
No line break in text file to add $BUILD_NUMBER
Change By: Constantin Kwiatkowski
Summary: No line break in text file to add $BUILD_NUMBER
Environment: Jenkins Version 5.6.2 , Cent OS, JDK 1.8, Firefox
Hi everyone. 

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.  
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ConstantinKwiatkowski@gmail.com (JIRA)

unread,
Nov 11, 2019, 12:16:03 AM11/11/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages