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.xml
for the output file generated by the option--summary-xml
of pdependpdepend.xml
for the output file generated by the option--jdepend-xml
of pdependdependencies.svg
for the output file generated by the option--jdepend-chart
of pdependoverview-pyramid.svg
for the output file generated by the option--overview-pyramid
of pdepend
Into this folder, you must have the results of the reports of phpcpd, named as described:
report.xml
for the output file generated by the option--log-pmd
of phpcpdpercentage-report.txt
as the percentage of duplicated code the output of phpcpd can show you.- In order to fetch this percentage easily, simply
grep
it 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.txt
for the output file generated by the option--report-full
of phpcsreport.csv
for the output file generated by the option--report-csv
of phpcsreport.xml
for the output file generated by the option--report-xml
of phpcsreport.json
for the output file generated by the option--report-json
of 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.xml
for the output file generated by the option--log-junit
of phpunitcoverage-clover.xml
for the output file generated by the option--coverage-clover
of phpunitcoverage-html/
for the output folder generated by the option--coverage-html
of 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:ro
to mount the timezone.--volume /etc/localtime:/etc/localtime:ro
to mount the localtime that will be used to parse the reports.