Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. #!/usr/bin/env groovy
  2. pipeline {
  3. agent any
  4. environment {
  5. NODE_ENV_PATH = './venv'
  6. NODE_VERSION = '6.11.1'
  7. }
  8. stages {
  9. stage('Pre-cleanup') {
  10. steps {
  11. sh 'rm -rf ./venv'
  12. sh 'rm -rf ./node_modules'
  13. sh 'rm -rf ./bower_components'
  14. }
  15. }
  16. stage('Make venv') {
  17. steps {
  18. sh 'nodeenv --prebuilt -n $NODE_VERSION $NODE_ENV_PATH'
  19. }
  20. }
  21. stage('Install dependencies') {
  22. steps {
  23. sh '. ./venv/bin/activate && npm install'
  24. sh '. ./venv/bin/activate && npm install -g bower'
  25. sh '. ./venv/bin/activate && bower install'
  26. }
  27. }
  28. stage('Run tests') {
  29. steps {
  30. sh '. ./node_env/bin/activate && npm test'
  31. }
  32. }
  33. }
  34. post {
  35. failure {
  36. echo 'Processing failed'
  37. }
  38. success {
  39. echo 'Processing succeeded'
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement