2018-10-11 11:11:24 -04:00
|
|
|
pipeline {
|
2018-10-16 14:22:47 -04:00
|
|
|
agent none
|
|
|
|
stages {
|
2020-03-12 10:24:21 -04:00
|
|
|
stage('setup') {
|
2020-03-12 11:17:27 -04:00
|
|
|
agent any
|
2020-03-12 10:26:00 -04:00
|
|
|
steps {
|
|
|
|
sh 'curl -sS https://getcomposer.org/installer | php'
|
2020-03-17 15:15:20 -04:00
|
|
|
sh 'rm -rf ./vendor'
|
|
|
|
sh 'rm -f composer.lock'
|
|
|
|
sh 'php composer.phar install --ignore-platform-reqs'
|
2020-03-12 10:24:21 -04:00
|
|
|
}
|
|
|
|
}
|
2020-12-11 10:26:24 -05:00
|
|
|
stage('PHP 8') {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'php:8-cli-alpine'
|
2020-03-16 15:23:19 -04:00
|
|
|
args '-u root --privileged'
|
2019-12-05 11:20:06 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
2021-02-23 13:33:54 -05:00
|
|
|
sh 'apk add --no-cache git icu-dev'
|
|
|
|
sh 'docker-php-ext-configure intl && docker-php-ext-install intl'
|
2020-03-12 11:08:18 -04:00
|
|
|
sh 'php ./vendor/bin/phpunit --colors=never'
|
2019-12-05 11:20:06 -05:00
|
|
|
}
|
|
|
|
}
|
2020-03-12 11:17:27 -04:00
|
|
|
stage('Latest PHP') {
|
|
|
|
agent {
|
|
|
|
docker {
|
2020-12-11 10:26:24 -05:00
|
|
|
image 'php:cli-alpine'
|
2020-03-16 15:23:19 -04:00
|
|
|
args '-u root --privileged'
|
2020-03-12 11:17:27 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
2021-02-23 13:33:54 -05:00
|
|
|
sh 'apk add --no-cache git icu-dev'
|
|
|
|
sh 'docker-php-ext-configure intl && docker-php-ext-install intl'
|
2020-03-12 11:17:27 -04:00
|
|
|
sh 'php ./vendor/bin/phpunit --colors=never'
|
|
|
|
}
|
|
|
|
}
|
2021-02-12 09:39:28 -05:00
|
|
|
stage('Code Cleanliness') {
|
2021-02-12 10:07:55 -05:00
|
|
|
agent any
|
2021-02-12 09:39:28 -05:00
|
|
|
steps {
|
2021-02-18 12:48:59 -05:00
|
|
|
sh "php ./vendor/bin/phpstan analyse -c phpstan.neon -n --no-progress --no-ansi --error-format=checkstyle | awk '{\$1=\$1;print}' > build/logs/phpstan.log"
|
2021-02-16 14:56:05 -05:00
|
|
|
recordIssues(
|
|
|
|
failOnError: false,
|
2021-02-16 14:57:43 -05:00
|
|
|
tools: [phpStan(reportEncoding: 'UTF-8', pattern: 'build/logs/phpstan.log')]
|
2021-02-16 14:58:33 -05:00
|
|
|
)
|
2021-02-12 09:39:28 -05:00
|
|
|
}
|
|
|
|
}
|
2021-02-05 20:21:05 -05:00
|
|
|
stage('Coverage') {
|
|
|
|
agent any
|
|
|
|
steps {
|
2021-02-05 17:49:19 -05:00
|
|
|
sh 'php composer.phar run-script coverage'
|
|
|
|
step([
|
|
|
|
$class: 'CloverPublisher',
|
|
|
|
cloverReportDir: '',
|
|
|
|
cloverReportFileName: 'build/logs/clover.xml',
|
|
|
|
])
|
|
|
|
junit 'build/logs/junit.xml'
|
2021-02-05 20:21:05 -05:00
|
|
|
}
|
|
|
|
}
|
2018-10-16 14:22:47 -04:00
|
|
|
}
|
|
|
|
}
|