# Create Complex Scripted Pipeline

In 
Published 2022-12-03

This tutorial explains to you how we can create more complex Scripted Pipeline in Jenkins.

Let's create a "Pipeline" Job first:

In the pipeline configuration I put the following code:

node {
    int variable1 = 2;
    int count = 0;
    
    while(count<5) {
        if (count != variable1){
            stage('Stage '+count) {
                echo "This is stage "+count;
            }
        }
         count++;
      }
    
}

When I run the job, I can see something like this: