Guest User

Untitled

a guest
Aug 19th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. dir ('tnd-functional-tests'){
  2. unstash 'TND-FUNCTIONAL-TESTS'+"${BUILD_TAG}"
  3. }
  4.  
  5. if("${SKIP_FUNCTIONAL}" == 'false')
  6. smpTools.runSMPFunctionalTests("-Dbrowser=chrome -Dweb-driver=chromedriverlinux.bin -Dssh.username=${sshusername} -Dssh.password=${sshpassword} -Denv=${bddEnv} -Dcucumber.options='--tags ${featuretags}'","Test Report")
  7. }// this function is in smp.gvy see below
  8.  
  9.  
  10.  
  11. }`
  12.  
  13. try {
  14.  
  15. sh '''
  16.  
  17. if [ ! "$(docker ps -q -f name=tnd-chrome)" ]; then
  18. if [ "$(docker ps -aq -f status=exited -f name=tnd-chrome)" ]; then
  19. # cleanup
  20. echo "Removing exited docker container..."
  21. docker rm tnd-chrome
  22. fi
  23. echo "Running the docker container again..."
  24. docker run -d -e JAVA_OPTS=-Xms512m -e JAVA_OPTS=-Xmx1024m -v /dev/shm:/dev/shm -e DBUS_SESSION_BUS_ADDRESS=/dev/null --name tnd-chrome csa-docker.apro.nbnco.net.au/tnd/tnd-chrome:v1
  25. DO_SSH_TUNNEL="true"
  26. else
  27. echo "Running docker instance tnd-chrome found...Using it"
  28. fi
  29. sudo chmod a+rwx ./src/test/resources/webdriver/*
  30.  
  31. echo "Args for maven ${arguments}" //this prints null for arguments
  32. mvn clean verify ${arguments}
  33.  
  34.  
  35. '''
  36. } catch(err) {
  37. if (currentBuild.result == 'UNSTABLE')
  38. currentBuild.result = 'FAILURE'
  39. throw err
  40. } finally {
  41. publishHTML (target: [
  42. allowMissing: true,
  43. alwaysLinkToLastBuild: false,
  44. keepAll: true,
  45. reportDir: 'target/site/serenity',
  46. reportFiles: 'index.html',
  47. reportName: "${reportLabel} BUILD ${env.BUILD_NUMBER}"
  48. ])
  49. }
  50. }`
Add Comment
Please, Sign In to add comment