Sign inSign up

nicodocker91/qa-dashboard

By nicodocker91

•Updated over 7 years ago

This image will group all reports of QA tools for a specific project to build a QA dashboard view.

Image
0

10K+

nicodocker91/qa-dashboard repository overview

⁠Docker image to create dashboard about Quality Analytics

⁠Usage

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}

⁠Requirements

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.

⁠Arguments

${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.

⁠Architecture
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
            └───...    
⁠Tools

A whitelist of currently supported tools can be fond here. Please name the reports folder accordingly to the tool name described below.

⁠pdepend

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 pdepend
  • pdepend.xml for the output file generated by the option --jdepend-xml of pdepend
  • dependencies.svg for the output file generated by the option --jdepend-chart of pdepend
  • overview-pyramid.svg for the output file generated by the option --overview-pyramid of pdepend
⁠phpcpd

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 phpcpd
  • percentage-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
⁠phpcs

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 phpcs
  • report.csv for the output file generated by the option --report-csv of phpcs
  • report.xml for the output file generated by the option --report-xml of phpcs
  • report.json for the output file generated by the option --report-json of phpcs
⁠phpmetrics

Simply run the phpmetrics tool by setting the --report-html option to this folder and let phpmetrics do the magic.

⁠phpunit

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 phpunit
  • coverage-clover.xml for the output file generated by the option --coverage-clover of phpunit
  • coverage-html/ for the output folder generated by the option --coverage-html of phpunit

⁠Volumes

The volume available to mount is /data.

The entrypoint is /data/build.

⁠Date-time troubles

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.

Tag summary

Content type

Image

Digest

Size

30.9 MB

Last updated

over 7 years ago

docker pull nicodocker91/qa-dashboard