From 6cbdbd261eee35bb1d8bb57eb73b1746bbbaa144 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 1 Oct 2022 19:01:22 +0300 Subject: [PATCH] add Jenkinsfile to enable separate CI for pull requests --- Jenkinsfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..f105ebf4a --- /dev/null +++ b/Jenkinsfile @@ -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 + """ + } + } + } +}