Attempt to run CI in stages
Some checks failed
Gitea - aviat/banker/pipeline/head There was a failure building this commit

This commit is contained in:
Timothy Warren 2021-02-05 16:06:54 -05:00
parent ebef8075b8
commit 1a4553cb4c
2 changed files with 14 additions and 17 deletions

11
Jenkinsfile vendored
View File

@ -11,27 +11,30 @@ pipeline {
} }
} }
stage("Test PHP 7.4") { stage("Test PHP 7.4") {
steps {
docker.image("memcached:latest").withRun("-p 11212:11211") { c -> docker.image("memcached:latest").withRun("-p 11212:11211") { c ->
docker.image("redis:latest").withRun("-p 6380:6379") { d -> 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 -> 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 "sh build/docker_install.sh"
sh "php ./vendor/bin/phpunit -c build --no-coverage --colors=never" sh "php ./vendor/bin/phpunit -c build --no-coverage --colors=never"
} }
} }
} }
} }
}
stage("Test PHP 8") { stage("Test PHP 8") {
steps {
docker.image("memcached:latest").withRun("-p 11212:11211") { c -> docker.image("memcached:latest").withRun("-p 11212:11211") { c ->
docker.image("redis:latest").withRun("-p 6380:6379") { d -> 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 -> 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 > /dev/null" sh "sh build/docker_install.sh"
sh "php ./vendor/bin/phpunit -c build --no-coverage --colors=never" sh "php ./vendor/bin/phpunit -c build --no-coverage --colors=never"
} }
} }
} }
} }
}
stage("Coverage") { stage("Coverage") {
agent any
steps { steps {
sh 'php composer.phar run-script coverage' sh 'php composer.phar run-script coverage'
step([ step([

View File

@ -5,12 +5,6 @@
set -xe set -xe
# Install git (the php image doesn't have it) which is required by composer
#echo -e 'http://dl-cdn.alpinelinux.org/alpine/edge/main\nhttp://dl-cdn.alpinelinux.org/alpine/edge/community\nhttp://dl-cdn.alpinelinux.org/alpine/edge/testing' > /etc/apk/repositories
#apk upgrade --update --no-cache \
# curl \
# git
apt-get update && apt-get install -y \ apt-get update && apt-get install -y \
libz-dev \ libz-dev \
libmemcached-dev \ libmemcached-dev \