11/08
2016
Log plugin for Z
With this plugin you can very easily trigger curl REST request to be done for any type of task., (*1)
The plugin is built in such a way that you only need to configure the names of the task you want to log, and how., (*2)
It assumes the remote is able to handle POST requests as json data, but you can configure any custom log command., (*3)
log: projectname: "My project" tasks: ['my_task'] endpoints: - endpoint: http://example.org format: ''
This would do a POST request with curl to the specified endpoint before and after the task. Tasks can
be considered succesful if both the pre
and the post
have been trigger., (*4)
echo 'curl -s -XPOST http://example.org -d '\'(data omitted for legibility')\'' > /dev/null' | /bin/bash -e echo 'echo "This is the task"' | /bin/bash -e echo 'curl -s -XPOST http://example.org -d '\''(data omitted for legibility)'\'' > /dev/null' | /bin/bash -e