ClearBowl/Jenkinsfile

15 lines
681 B
Plaintext
Raw Normal View History

2019-11-16 20:53:54 +01:00
pipeline {
cleanWs()
docker.image('mysql:latest').withRun('-e "MYSQL_ROOT_PASSWORD=8fcXUlCgC6JCqpoWX64" -e "MYSQL_DATABASE=clearbowl" -e "MYSQL_USER=api" -e "MYSQL_PASSWORD=R23qarINlcALOk2nDg6LbJelaqk"') { c ->
docker.image('mysql:latest').inside("--link ${c.id}:db") {
stage("Initialize DB"){
sh 'while ! mysqladmin ping -hdb --silent; do sleep 1; done'
}
2019-11-16 20:53:54 +01:00
}
docker.image('php:7.4').inside("--link ${c.id}:db") {
stage("Build") { sh 'composer install && mv .env.example .env'}
stage("Test") { sh 'vendor/bin/phpunit' }
2019-11-16 20:53:54 +01:00
}
}
}