Throw in a docker restart during testing phase

This commit is contained in:
Jamie Curnow 2023-03-30 14:44:15 +10:00
parent 9225d5d442
commit eb2e2e0478
No known key found for this signature in database
GPG Key ID: FFBB624C43388E9E

6
Jenkinsfile vendored
View File

@ -91,10 +91,14 @@ pipeline {
// Bring up a stack // Bring up a stack
sh 'docker-compose up -d fullstack-sqlite' sh 'docker-compose up -d fullstack-sqlite'
sh './scripts/wait-healthy $(docker-compose ps --all -q fullstack-sqlite) 120' sh './scripts/wait-healthy $(docker-compose ps --all -q fullstack-sqlite) 120'
// Stop and Start it, as this will test it's ability to restart with existing data
sh 'docker-compose stop fullstack-sqlite'
sh 'docker-compose start fullstack-sqlite'
sh './scripts/wait-healthy $(docker-compose ps --all -q fullstack-sqlite) 120'
// Run tests // Run tests
sh 'rm -rf test/results' sh 'rm -rf test/results'
sh 'docker-compose up cypress-sqlite' sh 'docker-compose` cypress-sqlite'
// Get results // Get results
sh 'docker cp -L "$(docker-compose ps --all -q cypress-sqlite):/test/results" test/' sh 'docker cp -L "$(docker-compose ps --all -q cypress-sqlite):/test/results" test/'
} }