Plato is a code npm module which is used to generate HTML report on Javascript code analysis.
Same as Istanbul Plato is running over node, therefore the first step is to install node http://nodejs.org/
Once node is configured, install Instabull by running the command:
$ npm install plato
The code analysis report should be generated any time the build action of Jenkins is triggered. Run Plato any time after the workspace has been synced with the Repositories and before the build process is terminated. To run Plato during the build process Is necessary to modify the build.xml ANT file and add an extra task to execute Plato.
The Jenkins customization to Integrating Plato are similar to the configuration to integrate Jenkins with istanbul.
In this page the step are described in short bullets; please refer to the Jenkins Integration with Istanbul for a detailed documentation.
JenkinsConfig/svyJenkinsConfig/CBI_config/jenkins_build.xml
Set advanced build properties:
work.servoy.install.dir = C:/Servoy
smart_test_solutions = servoyTestSolutionName
WORKSPACE = ${WORKSPACE}
ANT_CONTRIB_JAR = ${ANT_CONTRIB_JAR}
antRunner.dir = ${WORKSPACE}/JenkinsConfig/svyJenkinsConfig/CBI_config
servoy.test.property.file = ${WORKSPACE}/JenkinsConfig/svyJenkinsConfig/CBI_config/servoy.properties
workspace.plato.input.dir =PayPal
workspace.plato.output.dir =JenkinsConfig/svyJenkinsConfig/CBI_config/plato
modify the export_and_test.properties to disable Plato during the build or to make the build fail if plato could not run with success.
Set make_code_analysis_report = yep to create code analysis report during build and always_fails_if_code_analysis_fails = true to force build to fail when an error occurs during the creation of code analysis report.