Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pipeline{
- agent {
- docker{
- image 'node:8.16-alpine'
- }
- }
- stages{
- stage("build"){
- when{
- changeset "**/result/**"
- }
- steps{
- echo "Building result app..."
- dir("result"){
- sh 'npm install'
- }
- }
- }
- stage("test"){
- when{
- changeset "**/result/**"
- }
- steps{
- echo "Testing result app..."
- dir("result"){
- sh 'npm test'
- }
- }
- }
- }
- post{
- always{
- echo "This pipeline run is completed.."
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement