Formatting Output of Build Log Actions


#1

Hello,

One of the actions I am doing is using the Local Shell to setup and run a script to get me output of a command. In this particular case, it’s the output of an “s3cmd”, but it could be any.

When I use the Apache Velocity formatting to output the build log to Slack, it’s pulling all of the build log, setup and then results. For a notification, I just need the results and I’m having a difficult time figuring out how to just pull that into a notification.

#set($buildAction = $execution.action_executions[0])
```
#foreach( $line in $buildAction.log)
Line ${velocityCount}: ${line}
#end
```

Does anyone have any ideas on how to accomplish something like this, were you don’t pull all of the action setup log and just the results of say your last command? The only other way I can think to accomplish this is to send the message itself through the Local Shell using a command line Slack client.

Thanks!

-Adam


#2

Did you ever figure this out?