How to ensure a stage is executed in a flyweight Jenkins executor?
Suppose I have the following Jenkinsfile
:
pipeline {
agent any
stages {
stage("Build") {
// build
}
stage("Review") {
agent none
steps {
input "Deploy to production?"
}
}
stage("Promotion") {
steps {
echo "Promotion"
}
}
}
}
In the stage Review
I designated agent none
, which, to my understanding, means that Jenkins would use a flyweight executor for this stage. But still, the executor is heavyweight during the stage and uses up one of the valuable executors on the Jenkins slave.
Is there are setting on Jenkins that could potentially disable leightweight executors? Is there a plugin that enables lightweight executors? Is my Jenkinsfile flawed?