Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. pipeline{
  2. agent {
  3. docker{
  4. image 'node:8.16-alpine'
  5. }
  6.  
  7. }
  8.  
  9. stages{
  10. stage("build"){
  11. when{
  12. changeset "**/result/**"
  13. }
  14. steps{
  15. echo "Building result app..."
  16. dir("result"){
  17. sh 'npm install'
  18. }
  19. }
  20. }
  21. stage("test"){
  22. when{
  23. changeset "**/result/**"
  24. }
  25. steps{
  26. echo "Testing result app..."
  27. dir("result"){
  28. sh 'npm test'
  29. }
  30. }
  31. }
  32. }
  33.  
  34. post{
  35. always{
  36. echo "This pipeline run is completed.."
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement