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

Popular posts from this blog

Get rid of "Timed out receiving message from renderer"

Setup Selenium Grid using Kubernetes

Launching Selenium Grid and Registering a Web Node