Jenkins
To create a Node in the pipelines structure, use the below step
node('exec') {
// some block
}
Click on New Item -> Pipeline -> under Pipeline section add the below code. When the integer value is zero, clone automation.git
node {
i = 0
if (i == 0)
{
echo "Value of i is $i"
git "https://github.com/yashwanthsn2020/automation.git"
}
Build the pipeline

node {
i = 0
if (i == 0)
{
echo "Value of i is $i"
git "https://github.com/yashwanthsn2020/automation.git"
}
i+=1
if (i == 1)
{
echo "Value of i is $i"
git "https://github.com/yashwanthsn2020/yashwanthsn.git"
}
}
Click on Build Now and check the Console output