Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.15 KB

README.md

File metadata and controls

44 lines (28 loc) · 1.15 KB

re:Invent ALM Bootcamp Sample

This is a sample PHP application for the re:Invent Application Lifecycle Management bootcamp.

Security

Add the following to httpd.conf:

<Directory "/var/www/html/src">
    Order allow,deny
    Deny from all
</Directory>

Tests

/usr/local/bin/phpunit --log-junit phpunit.xml src/SampleTest.php

Installing PHPUnit on Jenkins

sudo yum install php php-xml
curl -Os https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
sudo mv phpunit.phar /usr/local/bin/phpunit

Configuring Jenkins

In your project's configuration, click Add Build Step and then Shell. Enter the following command:

/usr/local/bin/phpunit --log-junit phpunit.xml src/SampleTest.php || true

Click Add Build Step again. Select Process xUnit test result report. Enter 0 for all of the threshold fields. Click Add, and then choose JUnit. Next to JUnit Pattern, enter phpunit.xml.

Click Save.