Skip to content

dfuentes77/sample

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

re:Invent ALM Bootcamp Sample

TESTING CODEPIPELINE

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 88.9%
  • PHP 11.1%