I am new to Jenkins, exploring......
My problem statement is,
After Jenkins execution, a text file(Output.txt
) is being generated into Workspace
. The requirement is, I want to copy the contents of that .txt
file and print it on Slack notification message.
I tried to create an "Execute Shell" inside that I wrote:
echo myVar=Property \> Something\\bin\\Release\\Output.txt
After that I used the EnvInject
plugin, inside that in properties file path I have given the full path of Output.txt
In post-build build-action, I have selected Slack notification, in custom message I have written:
Data is- $myVar
Data is- $Property
Now When I am executing this Job I got Slack Notification, but didn't got the data of Output.txt
.
I got this on Slack:
Data is- $myVar
Data is- $Property
What I am expecting, if Output.txt
hold hello world
then I want:
Data is - hello world
in Slack notification.