Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def stageBDDcucumberTest() {
- stage('SBT build and test') {
- sh "echo \"export MESTUDENT_TEST_DB_HOST=jenkins.int.mstd.cloud\" >> conf.env"
- sh "echo \"export MESTUDENT_TEST_DB_USER=jenkins\" >> conf.env"
- sh "echo \"export MESTUDENT_TEST_DB_PASSWORD=jenkins\" >> conf.env"
- sh "echo \"export MESTUDENT_TEST_DB_DATABASE=${mysqlDb}\" >> conf.env"
- sh "echo \"export MESTUDENT_APPLICATION_LOGGING_LEVEL=INFO\" >> conf.env"
- timeout(time: 30, unit: 'MINUTES') {
- createDb()
- context="Cucumber tests"
- setBuildStatus ("${context}", 'In progress...', 'PENDING')
- try {
- sh """
- . ./conf.env
- sbt -mem 4096 BDDmestudebt/cucumber
- """
- } catch (err) {
- setBuildStatus("${context}", 'Test failed', 'FAILURE')
- throw err
- }
- setBuildStatus ("${context}", 'Test passed', 'SUCCESS')
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement