To launch the dashboard creation into the container, run:
docker run --rm --user $(id -u):$(id -g) --volume /etc/timezone:/etc/timezone:ro --volume /etc/localtime:/etc/localtime:ro --volume ${BUILDS_LIST_FOLDER}:/data/build nicodocker91/qa-dashboard ${SERVICE_OR_BUNDLE_NAME} ${ACCEPTANCE_VALUE}
In order to benefit to all advantages of the dashboard creation, you must have a reports folder with a specific architecture and file names that must match the expectation of tool results.
${SERVICE_OR_BUNDLE_NAME} is the service or bundle name. It must match a project name in the reports architecture.
${ACCEPTANCE_VALUE} is a float value meaning the minimum percentage quality value to reach to validate the project quality requirements.
Default is 0%, so no requirements are set, but you can define yourself between 0 and 100.
reports
│
└───project_name
│
└───...
│
└───date_of_build # Like 201708311630 for the build reports executed the 31-08-2017 at 16:30.
│
└───current # Symlink to the last build reports.
│
└───logs
│
└───tool_1
└───tool_2
└───tool_3
└───...
A whitelist of currently supported tools can be fond here. Please name the reports folder accordingly to the tool name described below.
Into this folder, you must have the results of the reports of pdepend, named as described:
summary.xmlfor the output file generated by the option--summary-xmlof pdependpdepend.xmlfor the output file generated by the option--jdepend-xmlof pdependdependencies.svgfor the output file generated by the option--jdepend-chartof pdependoverview-pyramid.svgfor the output file generated by the option--overview-pyramidof pdepend
Into this folder, you must have the results of the reports of phpcpd, named as described:
report.xmlfor the output file generated by the option--log-pmdof phpcpdpercentage-report.txtas the percentage of duplicated code the output of phpcpd can show you.- In order to fetch this percentage easily, simply
grepit from the output and redirect it. - Ex:
phpcpd src | grep -Eo '[0-9.]+% duplicated lines out' | grep -Eo '[0-9.]+%' > percentage-report.txt
- In order to fetch this percentage easily, simply
Into this folder, you must have the results of the reports of phpcs, named as described:
full-report.txtfor the output file generated by the option--report-fullof phpcsreport.csvfor the output file generated by the option--report-csvof phpcsreport.xmlfor the output file generated by the option--report-xmlof phpcsreport.jsonfor the output file generated by the option--report-jsonof phpcs
Simply run the phpmetrics tool by setting the --report-html option to this folder and let phpmetrics do the magic.
Into this folder, you must have the results of the reports of phpunit, named as described:
phpunit-unit.xmlfor the output file generated by the option--log-junitof phpunitcoverage-clover.xmlfor the output file generated by the option--coverage-cloverof phpunitcoverage-html/for the output folder generated by the option--coverage-htmlof phpunit
The volume available to mount is /data.
The entrypoint is /data/build.
In order to keep the same timezone and localtime between your project and the containers from this image, you need to add the following volumes when creating a container:
--volume /etc/timezone:/etc/timezone:roto mount the timezone.--volume /etc/localtime:/etc/localtime:roto mount the localtime that will be used to parse the reports.