summaryrefslogtreecommitdiff
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2022-10-01 19:01:22 +0300
committerAndrew Dolgov <[email protected]>2022-10-01 19:01:22 +0300
commit6cbdbd261eee35bb1d8bb57eb73b1746bbbaa144 (patch)
treee9cad2f9ac2c20e19e23a8c8f04675ddfbc40dc1 /Jenkinsfile
parent42bc1620b8deda73b96b2e0029c6de79daa5ccca (diff)
add Jenkinsfile to enable separate CI for pull requests
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile29
1 files changed, 29 insertions, 0 deletions
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
+ """
+ }
+ }
+ }
+}