Jenkins Scripted Pipeline
Sample Jenkins Scripted Pipeline
node {
stage "Git Pull"
git "https://github.com/nishantautomationlabs/nal-junitmockito.git"
echo "code pulled"
stage "Run Declarative Pipeline"
build "Declarative Pipeline"
echo "Declarative Pipeline triggered"
stage "print"
for(int i = 0; i < 10; i++) {
if(i % 2 == 0) {
echo "Number " + i
}
}
}
Jenkins Configuration:
Build History:
Comments
Post a Comment