banker/Jenkinsfile

52 lines
1.5 KiB
Plaintext
Raw Normal View History

2021-02-05 16:03:15 -05:00
pipeline {
agent any
stages {
stage("Setup") {
steps {
2021-02-05 15:31:59 -05:00
checkout scm
2021-02-05 16:03:15 -05:00
sh 'curl -sS https://getcomposer.org/installer | php'
sh 'rm -rf ./vendor'
sh 'rm -f composer.lock'
sh 'php composer.phar install --ignore-platform-reqs'
2021-02-05 13:47:37 -05:00
}
2021-02-05 16:03:15 -05:00
}
stage("Test PHP 7.4") {
2021-02-05 16:06:54 -05:00
steps {
2021-02-05 16:29:27 -05:00
script {
2021-02-05 16:12:53 -05:00
docker.image("memcached:latest").withRun("-p 11212:11211") { c ->
docker.image("redis:latest").withRun("-p 6380:6379") { d ->
docker.image("php:7.4").withRun("-e REDIS_HOST=redis -e REDIS_PORT=11212 -e MEMCACHED_HOST=mem -e MEMCACHED_PORT=6380 --link ${d.id}:redis --link ${c.id}:mem") { p ->
sh "sh build/docker_install.sh"
sh "php ./vendor/bin/phpunit -c build --no-coverage --colors=never"
}
2021-02-05 16:06:54 -05:00
}
2021-02-05 16:03:15 -05:00
}
}
}
}
stage("Test PHP 8") {
2021-02-05 16:06:54 -05:00
steps {
2021-02-05 16:29:27 -05:00
script {
2021-02-05 16:12:53 -05:00
docker.image("memcached:latest").withRun("-p 11212:11211") { c ->
docker.image("redis:latest").withRun("-p 6380:6379") { d ->
docker.image("php:8").withRun("-e REDIS_HOST=redis -e REDIS_PORT=11212 -e MEMCACHED_HOST=mem -e MEMCACHED_PORT=6380 --link ${d.id}:redis --link ${c.id}:mem") { p ->
sh "sh build/docker_install.sh"
sh "php ./vendor/bin/phpunit -c build --no-coverage --colors=never"
}
2021-02-05 16:06:54 -05:00
}
2021-02-05 16:03:15 -05:00
}
}
}
}
2021-02-05 16:29:27 -05:00
stage("Coverage") {
steps {
sh 'php composer.phar run-script coverage'
step([
$class: 'CloverPublisher',
cloverReportDir: '',
cloverReportFileName: 'build/logs/clover.xml',
])
2018-10-12 08:44:24 -04:00
}
}
}
2021-02-05 14:57:22 -05:00
}