Search code examples
ruby-on-railsjasper-reportsjasperservercapistrano3

Rails deploy jasper report on jasper server


I am having ROR application with:

ruby '2.2.1'
gem 'rails', '4.2.0'

I am using jasper report, which I have created using jasper studio.

I have deployed reports on production-jasper-server from local(jasper studio), using jasper studio report publish tool.

And deploying rails application using Capistrano.

The problem is, whenever I change in my report on local, I need to publish changed report from jasper studio to production-jasper-server.

I want to automate this process using Capistrano OR something else which will deploy the changed reports on production-jasper-server along with production deployment.

I did few R&D in this and found rest v2 api of jasper server, but I didn't used this as I wanted to know best way before digging into this.

What is the best way to do this if you have better idea please share with me.


Solution

  • Yes i think the best solution is to use the Rest or the SOAP web-services.

    Use the The v2/resources Servicee, and check the Modifying a Resource section which mention the following :

    Use the PUT method above to overwrite an entire resource. Specify the path of the target resource in the URL and specify resource of the same type. Use overwrite=true to replace a resource of a different type.

    check this example on how to create a jasperserver rest api client in ruby.

    and please check the following question here it has a small sample on how to create a client for the jasper server,but its built for the SOAP services.

    Hope that Helps.