GitHunt
EN

engelke/sample

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.

Languages

Shell89.0%PHP11.0%
Created October 6, 2015
Updated September 20, 2022
engelke/sample | GitHunt