add Jenkinsfile to enable separate CI for pull requests

This commit is contained in:
Andrew Dolgov 2022-10-01 19:01:22 +03:00
parent 42bc1620b8
commit 6cbdbd261e
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
1 changed files with 29 additions and 0 deletions

29
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,29 @@
pipeline {
agent any
stages {
stage('phpunit') {
steps {
sh """
docker run --rm \
--volumes-from jenkins-docker_app_1 \
--workdir ${env.WORKSPACE} \
php:8.1-cli \
php ./vendor/bin/phpunit
"""
}
}
stage('phpstan') {
steps {
sh """
# php -d memory_limit=-1 ....
docker run --rm \
--volumes-from jenkins-docker_app_1 \
--workdir ${env.WORKSPACE} \
php:8.1-cli \
php -d memory_limit=-1 ./vendor/bin/phpstan --memory-limit=2G
"""
}
}
}
}