SHARE
TWEET

Untitled

a guest Aug 20th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top