banker/Jenkinsfile
Timothy J. Warren ebef8075b8
Some checks failed
Gitea - aviat/banker/pipeline/head There was a failure building this commit
Attempt to run CI in stages
2021-02-05 16:03:15 -05:00

45 lines
1.4 KiB
Groovy

pipeline {
agent any
stages {
stage("Setup") {
steps {
checkout scm
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'
}
}
stage("Test PHP 7.4") {
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 > /dev/null"
sh "php ./vendor/bin/phpunit -c build --no-coverage --colors=never"
}
}
}
}
stage("Test PHP 8") {
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 > /dev/null"
sh "php ./vendor/bin/phpunit -c build --no-coverage --colors=never"
}
}
}
}
stage("Coverage") {
agent any
steps {
sh 'php composer.phar run-script coverage'
step([
$class: 'CloverPublisher',
cloverReportDir: '',
cloverReportFileName: 'build/logs/clover.xml',
])
}
}
}
}