2022-10-01 16:01:22 +00:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
|
2022-10-02 16:20:10 +00:00
|
|
|
options {
|
|
|
|
buildDiscarder(logRotator(numToKeepStr: '5'))
|
|
|
|
}
|
|
|
|
|
2022-10-01 16:01:22 +00:00
|
|
|
stages {
|
|
|
|
stage('phpunit') {
|
|
|
|
steps {
|
|
|
|
sh """
|
|
|
|
docker run --rm \
|
2022-10-01 19:22:06 +00:00
|
|
|
--workdir /app \
|
|
|
|
-v ${env.WORKSPACE}:/app \
|
2022-12-30 06:48:34 +00:00
|
|
|
registry.fakecake.org/php:8.1-cli \
|
2022-10-01 16:01:22 +00:00
|
|
|
php ./vendor/bin/phpunit
|
|
|
|
"""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('phpstan') {
|
|
|
|
steps {
|
|
|
|
sh """
|
|
|
|
# php -d memory_limit=-1 ....
|
|
|
|
docker run --rm \
|
2022-10-01 19:22:06 +00:00
|
|
|
--workdir /app \
|
|
|
|
-v ${env.WORKSPACE}:/app \
|
2022-12-30 06:48:34 +00:00
|
|
|
registry.fakecake.org/php:8.1-cli \
|
2022-10-01 16:01:22 +00:00
|
|
|
php -d memory_limit=-1 ./vendor/bin/phpstan --memory-limit=2G
|
|
|
|
"""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|