#
Create Complex Scripted Pipeline
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:
Info
As you can see you have a lot of flexibility to create complex pipelines using Scripted Pipeline syntax. However, for big projects, this complexity will be difficult to manage.