Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. def stageBDDcucumberTest() {
  2. stage('SBT build and test') {
  3. sh "echo \"export MESTUDENT_TEST_DB_HOST=jenkins.int.mstd.cloud\" >> conf.env"
  4. sh "echo \"export MESTUDENT_TEST_DB_USER=jenkins\" >> conf.env"
  5. sh "echo \"export MESTUDENT_TEST_DB_PASSWORD=jenkins\" >> conf.env"
  6. sh "echo \"export MESTUDENT_TEST_DB_DATABASE=${mysqlDb}\" >> conf.env"
  7. sh "echo \"export MESTUDENT_APPLICATION_LOGGING_LEVEL=INFO\" >> conf.env"
  8.  
  9. timeout(time: 30, unit: 'MINUTES') {
  10. createDb()
  11.  
  12. context="Cucumber tests"
  13.  
  14. setBuildStatus ("${context}", 'In progress...', 'PENDING')
  15.  
  16. try {
  17. sh """
  18. . ./conf.env
  19. sbt -mem 4096 BDDmestudebt/cucumber
  20. """
  21. } catch (err) {
  22. setBuildStatus("${context}", 'Test failed', 'FAILURE')
  23. throw err
  24. }
  25.  
  26. setBuildStatus ("${context}", 'Test passed', 'SUCCESS')
  27.  
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement