Template build configuration files for use with the docker-jenkins-php project
- build.xml: Apache Ant build file, see https://ant.apache.org/manual/using.html, needed for FreeStyle Projects in Jenkins
- Jenkinsfile: Declarative Script for Pipeline project in Jenkins (recommended instead of FreeStyle project!)
- build/phpcs.xml: config file for PHP Code Sniffer https://github.com/squizlabs/PHP_CodeSniffer
- build/phpdox.xml: config file for PHP Documentation Generator http://phpdox.net/
- build/phpmd.xml: config file for PHP Mess Detector https://phpmd.org/
- .deployment_exclude: all files and directories are excluded in the rsync for deployment
add build-directory and Jenkinsfile/.deployment_exclude OR build.xml to your GIT-project.
Do NOT forget the .gitignore file in the build-directory, otherwise you'll have all reports in your next commit.
Also do NOT forget to pass XDEBUG_MODE=coverage to the Jenkins installation, otherwise phpunit won't generate code coverage reports
You may also set environment, so CSS/Images from Code coverage report are loaded:
JAVA_OPTS=-Dhudson.model.DirectoryBrowserSupport.CSP="sandbox allow-same-origin allow-scripts; default-src 'self'; script-src 'self' 'unsafe-inline'; img-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'"
- modify the "Environment" stage for the correct environment file
- change the name of the project php-template to your real project name
- change the .env-filename in the target "env-production" (or just remove target from build lists)