post jenkins build console output to slack
I figured it out by myself, there is no plugin needed.

build.sh &amp;&gt; /dev/stdout | tee jenkins.txt
and then curl -F file=@jenkins.txt -F channels=yourchannel -H "Authorization: Bearer your token" https://slack.com/api/files.upload

There is no '#' needed for slack channel and channel should not be private. 

And if you use buils.sh | tee jenkins.log then you can't get the log from stderr.