Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

setDescription Line Break #4380

MFalkner ·

Is it possible to add line breaks into the description?
I use the following Post-Build Script

groovy: 
build.setDescription( 
util.readFileAsString( 
util.getFile("Info.txt")).trim()); 
system.buildManager.save(build);

but line breaks in the file will not show in the description field.

  • solved #3
  • replies 2
  • views 484
  • stars 0
robinshen ADMIN ·

The description will be displayed as html, you may replace line break as
like below:

groovy: 
build.setDescription(util.readFileAsString(util.getFile("Info.txt")).trim().replace("\\n", "<br>")); 
system.buildManager.save(build);
MFalkner ·

Works perfect, many thanks!