Guest User

Untitled

a guest
Jul 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. pipeline {
  2. agent any
  3. stages {
  4. try {
  5. stage('Setup main project') {
  6. steps {
  7. git branch: 'testing', changelog: false, credentialsId: '81e7f3dd-22e2-4c86-b2c2-0694b59ffdf8', poll: false, url: 'YOUR_REPO_URL'
  8. sh 'npm install'
  9. }
  10. }
  11. stage('Run unit tests') {
  12. steps {
  13. echo "All test passed LOL"
  14. // sh 'npm test'
  15. }
  16. }
  17. stage('Build project') {
  18. steps {
  19. sh 'npm run build'
  20. }
  21. }
  22. stage('Deploy on localhost:5000') {
  23. steps {
  24. sh 'npx serve build/ &'
  25. }
  26. }
  27. stage('Run sanity tests') {
  28. steps {
  29. build 'Sanity Tests'
  30. }
  31. }
  32. } catch () {
  33. }
  34. }
  35. }
Add Comment
Please, Sign In to add comment