restrict where this project can be run jenkins pipeline
pipeline {
agent none
//agent { label 'X' }
stages {
stage('Build') {
agent { label 'slave-node' }
steps {
echo 'Building..'
sh '''
'''
}
}
}
post {
success {
echo 'This will run only if successful'
}
}
}