Choose the best training program according to your career.
Improve the performance of your business with our innovative Industrial Training Program.
Read More →
Our instructor-led training classes are designed to make you an expert.
Read More →
Real-life case studies are a great way to demonstrate your practical knowledge.
Read More →
Explore blogs, latest technologies and industry updates with practical examples.
Read More →Browse all available training programs and choose the right one for your career.
Read More →Know more about who we are and what we stand for.
Discover our mission to equip individuals with essential IT skills and industry expertise.
Read More →Learn, practice and plan your career — bilkul free.
Book a free video counselling session and pick the right course for you.
Read More →Variables are used to store values/data inside a pipeline. Jenkins declarative pipelines support two kinds:
Declared in an environment block right after agent. Referenced anywhere in the stages using $variableName.
pipeline {
agent any
environment {
name = "Sandeep Chikkala"
}
stages {
stage('Hello') {
steps {
echo "hi, my name is $name"
}
}
}
}
environment {
name = "Sandeep Chikkala"
topic = 'DevOps'
platform = 'linkedin'
duration = 90
}
stages {
stage('Multiple Global Variables') {
steps {
echo "hi, my name is $name, I'm teaching $topic through $platform."
echo "And the course duration is $duration days"
}
}
}
A local variable is declared inside a specific stage and overrides the global variable for that stage only.
pipeline {
agent any
environment {
name = "Sandeep"
}
stages {
stage('Hello') {
steps { echo "hi, my name is $name" }
}
stage("local variable") {
environment {
name = "SandeepChikkala"
}
steps { echo "hii, I'm $name" }
}
}
}
Use a local variable whenever one particular stage needs a different value than the rest of the pipeline.
Hands-on live training, real projects, and placement support — become job-ready in DevOps.
Enroll in DevOps Training →