windows batch: echo a multi-line variable with special characters (JiraRelease Notes from jenkins) -
i using jiraplugin in jenkins produe releasenotes , build job in jenkins uses batch files.
in executed batch file, when issue set, can see varibale exists jira release notes. multi-line , starts # character.
my goal echo %release_notes_jenkins% > releasenotes.txt
but never works. tried using !! instead of %% around variable not work. echo off. when try echo variable. again, set show correct content:
release_notes_jenkins=# new feature - [xxxx-3525] blahblahblah - [xxxx-3268] blahblahblah - [xxxx-3119] blahblahblah # unknown - [xxxx-3545] [security] blahblahblah ... jenkins runs on windows 7 server. specific windows batch (cmd.exe) since piping variable file works when jenkins runs on linux environment.
any idea on how make work?
try
set release_notes_jenkins > releasenotes.txt instead of echo.
Comments
Post a Comment