I am trying to update the jenkins build description via running jenkins cli command under a script.
However I am trying to run the following command to change the description and display every line which is comma separated in message1
variable as a new line in jenkins
I am running the following commands in my script to achieve this :
message2=$(echo $message1 | sed 's/,/\n/g' )
java -jar jenkins-cli.jar -s http://JENKINS_INSTANCE:9090/ -auth user:token -webSocket set-build-description "$job" "$build" " <b style='color:green !important;'> $message2 <br> Message 2 supposed to be here<br>"
I am supposed to print the message2, message3 one after another in next line in jenkins. Can someone please help me on how to achieve this ?