Skip to content

Instantly share code, notes, and snippets.

@Lewiscowles1986
Created October 20, 2016 13:18
Show Gist options
  • Save Lewiscowles1986/2374f39954251f4efc92fd0da6813867 to your computer and use it in GitHub Desktop.
Save Lewiscowles1986/2374f39954251f4efc92fd0da6813867 to your computer and use it in GitHub Desktop.
PHP Jenkins Unit Test Pipeline Basic PHP-Ulid
node {
stage('Cleanup') {
sh 'rm -rf ./*'
}
stage('Fetch from GitHub') {
sh 'git clone https://github.com/Lewiscowles1986/ulid'
}
stage('Get Composer') {
sh 'wget -q http://getcomposer.org/download/1.2.1/composer.phar'
}
stage('Build') {
dir('ulid') {
sh 'php ../composer.phar install'
}
}
stage('Run Unit Tests in PHP') {
dir('ulid') {
sh 'php vendor/bin/phpunit'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment