2023-11-13 13:59:47 +01:00
|
|
|
pipeline {
|
2023-11-15 10:57:20 +01:00
|
|
|
agent none
|
2023-11-13 13:59:47 +01:00
|
|
|
stages {
|
|
|
|
stage('PHPStan (static analysis)') {
|
2023-11-15 10:57:20 +01:00
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'php:8.2-cli'
|
|
|
|
}
|
|
|
|
}
|
2023-11-13 13:59:47 +01:00
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
sh 'curl -fsSL https://github.com/phpstan/phpstan/releases/download/1.10.41/phpstan.phar -o phpstan.phar'
|
|
|
|
sh 'php ./phpstan.phar analyse --configuration=phpstan.neon --memory-limit=512M --error-format=junit > phpstan-results.junit.xml'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit 'phpstan-results.junit.xml'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|