banker/Jenkinsfile

78 lines
2.3 KiB
Plaintext
Raw Normal View History

2021-02-05 16:03:15 -05:00
pipeline {
agent any
stages {
stage("Setup") {
steps {
sh 'curl -sS https://getcomposer.org/installer | php'
sh 'rm -rf ./vendor'
sh 'rm -f composer.lock'
sh 'phive install'
2021-02-05 16:03:15 -05:00
sh 'php composer.phar install --ignore-platform-reqs'
2021-02-05 13:47:37 -05:00
}
2021-02-05 16:03:15 -05:00
}
2021-02-18 13:27:07 -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 ->
2021-02-18 13:27:07 -05:00
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 ->
2021-02-05 16:12:53 -05:00
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-11-30 11:48:49 -05:00
stage("Test PHP 8.1") {
steps {
script {
docker.image("memcached:latest").withRun("-p 11212:11211") { c ->
docker.image("redis:latest").withRun("-p 6380:6379") { d ->
docker.image("php:8.1").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"
}
}
}
}
}
}
2023-02-03 14:11:39 -05:00
stage("Test PHP 8.2") {
steps {
script {
docker.image("memcached:latest").withRun("-p 11212:11211") { c ->
docker.image("redis:latest").withRun("-p 6380:6379") { d ->
docker.image("php:8.2").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"
}
}
}
}
}
}
stage('Code Cleanliness') {
2021-02-18 13:27:07 -05:00
agent any
2021-02-05 16:06:54 -05:00
steps {
2021-11-30 15:21:38 -05:00
sh 'touch build/logs/phpstan.log'
2021-11-30 15:19:27 -05:00
sh 'composer run-script ci:phpstan'
2021-02-18 13:27:07 -05:00
recordIssues(
failOnError: false,
tools: [phpStan(reportEncoding: 'UTF-8', pattern: 'build/logs/phpstan.log')]
)
2021-02-05 16:03:15 -05:00
}
}
2021-02-05 16:40:15 -05:00
}
post {
success {
2021-02-05 16:52:40 -05:00
sh 'php composer.phar run-script coverage'
step([
$class: 'CloverPublisher',
cloverReportDir: '',
cloverReportFileName: 'build/logs/clover.xml',
])
junit 'build/logs/junit.xml'
2018-10-12 08:44:24 -04:00
}
}
2021-02-05 14:57:22 -05:00
}