phpunit and code coverage via docker container
docker build -t phpunittest .
docker run --name phpunittest -d -p 9000:80 -v /data/servers/build:/var/www/build phpunittest
- It will generate "coverage" folder under build
- It will generate "logs" folder under build
- You can source clover files to sonar qube for code coverage
Problem: Phpunit coverage generates full path to the files in clover xml/Junit reports. Sonarqube can't able to analyse the data.
Examples: sed -i.bkp 's//home/b/dv/.jenkins_cc_slave/workspace/phpunit-build/src//home/b/dv/.jenkins_cc_slave/workspace/phpunit-codequality/src/g' clover.xml
OR
docker run -v