
Discover the advantages of Jenkins declarative pipelines, compare them with scripted pipelines, and learn core concepts like steps, stages, agents, parameters, and variables.
Pipeline script in Jenkins offers a configuration approach enabling parallel build, test, and deploy stages, with restart, visualization, and automatically created branch-specific scripts.
Examine the two Jenkins pipeline script types: declarative and scripted, and learn that declarative syntax simplifies writing pipelines, which start with a pipeline block.
Explore the core concepts of Jenkins declarative pipeline, including steps, stages, agents, and pipeline syntax, with examples, demos, and guidance on comments in scripts.
Explore declarative Jenkins pipelines by defining steps inside stages, organizing stages in a stages block, and choosing agents (master, slave, or container) for execution, then review the pipeline dashboard.
Explore single-line and multi-line comments in Jenkins declarative pipelines, and grasp the pipeline structure with stages, steps, and print statements across Windows and Linux.
pipeline{
agent none
stages{
stage("HelloWorld"){
steps{
echo "helloworld"
}
}
}
}
Explore declarative and scripted pipelines, including steps, stages, and agent sections. Learn about comments, variable scope, predefined variables, and reading values from JSON fields.
Explore how variables store values and reduce hard-coded changes by using named V1 and V2 in Jenkins declarative pipeline, where no type prefixes are required.
Learn how to define user defined variables in a Jenkins declarative pipeline by using the environment section to set name and value, and reference them in stages with dollar prefix.
Explain how the same variable name behaves across script, stage, and pipeline levels in a Jenkins pipeline, outputs like Jenkins or Doc; stage overrides pipeline, and global serves as fallback.
Explore predefined versus user defined variables in Jenkins declarative pipelines, showing how scope and precedence decide values at global and stage levels, with dollar and braces syntax.
Compare single quotes and double quotes in print statements, showing how single quotes print literals while double quotes substitute variable values; learn why double quotes are preferable.
Learn how parameters pass data dynamically into pipeline scripts, allowing value changes per build while keeping variable names fixed, with examples like Jenkins and Docker.
Demonstrates defining and using parameters in a Jenkins declarative pipeline, covering string, boolean, and choice parameters, referencing them in stages, and conditionally executing steps with the script section.
Demonstrate how to use a dry run in a Jenkins declarative pipeline to fill parameters, test execution without failing, and observe console output for error signals.
Learn to use parameters in a Jenkins declarative pipeline, including string, boolean, dropdown, and file parameters, and how to pass values, run jobs, and apply retry and timeout behaviors.
Learn how to use BuildDiscarder in a Jenkins declarative pipeline to delete old logs, keep the latest five job logs, and manage memory through log rotation.
Apply the disable concurrent builds option in the pipeline options to prevent multiple triggers from running simultaneously and causing conflicts.
Explore how the timeout function in Jenkins declarative pipelines caps the build time using seconds, minutes, or hours, and triggers a failed build when the time limit is exceeded.
Learn how to add the timestamps function to a Jenkins declarative pipeline to capture when each step runs, measure execution time, and read timings in the console output.
Learn how to trigger multiple jobs from a Jenkins declarative pipeline using the build and job name options, configure triggers, and verify execution via console output.
Learn to trigger a second job even if the first job fails in a Jenkins declarative pipeline. Set propagate to false so the second job runs and shows its status.
Change the Jenkins declarative pipeline build result by storing the job outcome in a script variable, check if it equals failure, and set the current build to unstable accordingly.
trigger a downstream job from an upstream pipeline and pass string parameters via a script step, and learn how downstream failures affect upstream results.
Master cron scheduling in Jenkins declarative pipeline by comparing ground-up and policy triggers. Learn how repository changes gate builds and gain practical cron syntax examples.
Explore poll scm triggers in Jenkins declarative pipelines, learning how repository changes trigger builds and how content versus policy configurations affect triggering.
Explore Jenkins declarative pipeline concepts, including cron-based and change-based schedules, triggering on commits, and executing parallel stages with failure handling.
Explore how to run parallel jobs in a Jenkins declarative pipeline, manage cross-job dependencies, and understand why multiple steps cannot reside in the same stage.
Master parallel stages in a Jenkins declarative pipeline by configuring and duplicating stages, excluding specific commands, and printing outputs to demonstrate simultaneous execution without waiting.
Explore how the fail fast option in Jenkins declarative pipelines stops remaining parallel jobs when one fails, speeding up feedback and avoiding unnecessary executions.
This introduction covers running multiple steps in the same stage with post actions, fail fast behavior, and always, cleanup, and other post conditions in a declarative Jenkins pipeline.
Explore the Jenkins declarative pipeline post section, where actions run after a stage completes and post blocks execute in the order changed, fixed, recursion, aborted, failure, success, unstable, and unsuccessful.
Demo explains always, changed, and fixed post blocks in a Jenkins declarative pipeline. Learn how each block triggers based on the previous build status to control execution.
Explore how Jenkins declarative pipelines use post sections to run blocks on specific statuses—success, unstable, and cleanup—and how always blocks execute at the end to clean workspaces and files.
Learn how the post section in a Jenkins declarative pipeline runs after stages, how to configure stage-level post actions and cleanup after specific stages, and how this affects success flows.
Explore how Jenkins declarative pipeline post sections run by build outcomes, control success, failure, or cleanup, and how tools shape stage results and triggers.
Learn how to configure the Jenkins tools section to select and apply a specific Maven version for a job, enabling per-project tool version isolation.
Demonstrate running a Java program in a Jenkins declarative pipeline using different JDK versions, by configuring Maven installations and stage level settings.
Jenkins Declarative Pipeline script or Pipeline as a code is an advance feature which is used to create Jenkins Jobs with the help of the code.
The main advantage with Declarative Pipeline script is that we can do versions of our code with the help of any version control tools (SVN or GIT ..).
In this course we'll see the 100+ examples which covers the following topics.
1. JIRA
How to Create a Ticket if build failed
How to Close the Ticket
How to Search tickets
and more .....
2. How to execute bat commands and shell commands .
3. Execute Stage based on the commit message/committed files.
4. Pause the build and Wait for the approval from specific user.
5. Commit code to GIT if build success
6. How to work with SVN.
7. Parameters, Variables, Options, etc.
8. Pause job to read input from user.
9. Multiple examples on POST.
10. What are the different colors that indicates in the pipeline
11. what are the variables means.
12. Difference between user defined and system defined variables
13. what are the scopes of the variables
14. Difference between Single and Double quotes
15. Parameters : String, Text, Boolean, Choice, Password, File
16. what is the use of BuildDiscarder
17. How to change build result
18. POST and order of Blocks
19. How to Run Java program with Different JDK versions
etc