
Develop skills in Jenkins continuous integration and deployment through 70 hands-on tasks, from environment setup and freestyle jobs to declarative pipelines, Docker CD, and plugin management.
Create an AWS free tier account by signing up and verifying your email. Set a root password, link a credit card, complete identity verification, and sign in to the console.
Launch an ec2 instance for Jenkins in us east 1, using amazon linux and t2.micro, with a DevOps key pair and 15 gb storage.
Learn how to sign up for GitLab using your Gmail account or Google login, fill out basic details, accept terms, and access GitLab.
Set up a blank private GitLab project named Jenkins-DevOps, then integrate a Jenkins file and connect GitLab with Jenkins to design multiple pipelines.
Set up Jenkins and Docker on a VM, install Java JDK and Git, enable passwordless sudo for Jenkins, open port 8080, unlock with the initial admin password, and install plugins.
Create and verify a Jenkins pipeline using a pipeline script, run a hello world build, and confirm outputs with echo and Python version checks.
Create a Jenkins freestyle job named docker-verify, add a shell build step to run docker --version, and run the job to verify Docker on the Jenkins machine.
Learn to schedule a freestyle Jenkins job using cron by configuring build periodically with a five-field pattern to run every minute, then save and verify via console output.
Turn a Jenkins freestyle job into a parameterized build with a choice parameter named package (Docker or Python) and use $package in the shell to display the selected version.
Enable timestamp in the Jenkins free style job's console output to add time stamps to logs, helping verify failures by specific times and improve production troubleshooting.
Temporarily disable the docker verify job in Jenkins to prevent builds via the build now button, then save and re-enable it when needed.
Create a declarative Jenkins pipeline with a docker-verify stage that prints the docker version, using the Hello World template and an any agent as the first stage.
Extend the Jenkins declarative pipeline by adding a get-verify stage that runs git --version and docker version as pre-checks, configures the stage, and reviews logs to confirm versions.
Set up a password on your GitLab account, copy the declarative pipeline code from Jenkins, create a Jenkins file in GitLab, and commit it to enable future GitLab Jenkins integration.
Integrate your GitLab project with Jenkins by using a declarative pipeline from SCM, supply GitLab credentials and main branch, and run the Jenkinsfile from GitLab.
Install the Blue Ocean plugin in Jenkins from manage plugins, restart Jenkins, then use the Blue Ocean UI to visualize and manage pipelines with stages and logs.
Create a docker file in your GitLab repository using the attached Apache-based docker file, label it DevOps, and commit changes to enable building a custom image with future modifications.
Extend a Jenkins declarative pipeline by adding a Docker build stage to create and tag a Docker image from the GitHub repository's Dockerfile, enabling continuous delivery workflows.
Introduce a docker image verify stage in the Jenkins declarative pipeline to list docker images on the Jenkins host, including httpd and my image v1.
Update the Jenkins declarative pipeline by adding an environment section with docker image name and docker tag variables, and replace hardcoded values in the docker build stage with these variables.
Update the Jenkins declarative pipeline to tag the Docker build with the build number, using env.BUILD_NUMBER in a double-quoted command to create a unique image tag on each run.
Update the Jenkins file to add a retry block around the Docker version check in the verify stage, retrying a wrong command three times to demonstrate pipeline behavior.
Learn to add a timeout in a Jenkins declarative pipeline verify stage, set 10 seconds, run sleep 30 seconds, observe the pipeline fail, and preserve three retries and data section.
Implement a declarative Jenkins pipeline with a pre-check stage that runs docker verify and get verify in parallel.
Learn to add a timestamp to Jenkins declarative pipelines by configuring options at the pipeline level, so every console log line includes a time stamp for easier troubleshooting.
Update the Jenkins declarative pipeline to rename the label to autopilot and enable skip default checkout, then use docker inspect in the docker build stage to verify the image label.
Update the Jenkins declarative pipeline to remove skip default checkout and add a log rotator using buildDiscarder, setting NUM to 1 to keep only the most recent build logs.
Set the discard value to ten, add sleep 30 in the Docker verify stage, and enable the disable concurrent builds option in a declarative Jenkins pipeline to prevent parallel runs.
Apply a Jenkins declarative pipeline when condition to run the docker build stage only on the test branch, after removing the sleep in verify and editing the Jenkins file.
Update the Jenkins declarative pipeline to trigger the docker build on the main branch by changing the when condition from test to main, then verify the new image.
Adds a docker deploy stage to the Jenkins declarative pipeline, running the built image with port 80 mapping. It lists containers and opens http access via inbound rules.
Implement a docker cleanup stage in the Jenkins declarative pipeline before deploy to remove all containers, freeing port 80 and ensuring the latest image deploys without errors.
Learn how to add a manual approval in a Jenkins declarative pipeline to pause the Docker deploy stage with an input step, enabling controlled production deployments.
Add a Docker images cleanup stage to a Jenkins declarative pipeline after deploy, using Docker images prune to remove unused images and free disk space on a constrained environment.
Introduce the always post section in a Jenkins declarative pipeline to run after each pipeline. Show a cleanup and list all docker images in the post always block, committing changes.
Add an aborted post section in a Jenkins declarative pipeline to run commands like Docker ps when the pipeline is aborted, demonstrated by editing the Jenkinsfile and checking logs.
Update the docker build command in a Jenkins declarative pipeline and add a post failure step to remove all running containers when the build fails.
Correct docker build command in the Jenkinsfile's docker build stage and add a post success step that runs a localhost command to verify the container serves HTML on port zero.
Learn how to add a post cleanup stage to a Jenkins declarative pipeline to remove unused docker images, ensuring cleanup runs even after a failed build, by updating the Jenkinsfile.
Learn to push docker images from Jenkins pipelines to an elastic container registry (ECR), creating a remote repository named 'my Jenkins project' and integrating ECR commands into your declarative pipeline.
Design an AWS IAM role to let the Jenkins machine access the ECR repository and upload Docker images. Create the role for EC2 with registry access and name it accordingly.
Attach an AWS IAM role to the Jenkins EC2 instance to enable repository access, by selecting the role in the AWS console and updating the instance's IAM role.
Integrate the docker build stage into a Jenkins declarative pipeline by using repo push commands to login, build, tag, and push the image to the repository.
Update the Jenkins declarative pipeline deploy stage to pull the latest image from the ACR repository and deploy a container using that image, verifying access via the host IP.
Set the Jenkins build number as the Docker image tag in a declarative pipeline, replacing latest in build, push, and deploy and verify the tag in ACR.
Download and upload a simple index.html to the GitLab repo root, then update the Dockerfile to include this HTML so the Docker image hosts the production site.
Update the Dockerfile in the GitLab repository by copying the indexed html into the http image's default hosting path, ensuring the website loads on container startup.
Run the Jenkins declarative pipeline to build a Docker container that hosts a custom index.html demo page via an Apache image, and verify the live site.
Modify indexed html color to orange in GitLab, commit changes, and run the Jenkins declarative pipeline to trigger a fresh build and manual docker deployment, resulting in orange after deployment.
Create a production EC2 instance, install Docker, and deploy Docker images from the local Jenkins build to the production server, planning multiple stages in the pipeline.
Configure Jenkins by adding a user with a private key to global credentials, paste the PEM key, and create a secret named broad for use in the pipeline.
Install the search agent plugin in Jenkins to connect with remote servers and deploy Docker containers, then verify installation and anticipate a new pipeline stage for remote deployment.
Add a prod deploy stage to the Jenkins declarative pipeline to deploy a docker container to a production machine using the public IP and image, with local testing and approval.
Add a manual approval on deploy stage of the declarative pipeline to prevent production deployment from happening automatically, ensuring verification on the test site or local site before production rollout.
Add a cleanup stage before production deploy in the declarative pipeline to kill old containers on the prod host via SSH agent, then deploy the new container.
demonstrates demo of a declarative pipeline, renaming the Docker deploy to test environment deployment, adding manual approval to production cleanup, and updating index.html to reflect pink color after pipeline runs.
Install the DSL plugin in Jenkins to start your journey. Open manage plugins, search for DSL in the available tab, install, restart, and verify in the store tab.
Create a seed job in Jenkins as a freestyle project named seed-job, add a description, and save; future steps update it via the DSL script after plugin installation.
Learn how to create an empty Jenkins job named autopilot through a DSL script using a seed job, configure via the DSL section, and save for future parameters.
Update Jenkins configuration by approving scripts, enabling script security, and building the job; observe autopilot job creation with an empty DSL pipeline script, and prepare to add parameters.
Learn to update a Jenkins DSL pipeline to inject a description into an autopilot Dstl job, remotely configuring and saving the job so the description appears automatically.
Update the description of a Jenkins DSL pipeline Autopilot job by editing the DSL script, saving, and building to apply the new description.
Update a Jenkins DSL pipeline to make a job parameterized, adding a string parameter with default value and description, and run builds with parameters from the UI.
Add a choice parameter named option to a Jenkins DSL pipeline, provide values like virgin and B's, set virgin as default, save, and run the build with parameters.
Configure a Jenkins DSL pipeline by adding a boolean parameter named required set to true, alongside string and choice parameters, then use build with parameters for inputs in shell steps.
Add a shell step in a Jenkins DSL pipeline to the autopilot dstl job, run echo hello world, save, and build with parameters to see the console output.
Add a shell command to the Jenkins dsl pipeline job steps to run sudo Docker version, save, and build to display Hello world and the Docker version in the console.
Configure a Jenkins DSL pipeline to add timestamps to the console output by inserting a wrapper with a time stamp, saving, and enabling the setting in the autopilot CE job.
Update the display name of a Jenkins job using a DSL script, adding autopilot as the top display name. Verify the change on the dashboard after you build.
Integrate the git SCM into a Jenkins DSL pipeline by configuring a job with clone URL and main branch, then save and run the build to update repo and branch.
Update the DSL script to disable a remote job in the Jenkins pipeline and save the changes. Verify the project shows as disabled in the configure view.
Install the role based authorization strategy plugin on Jenkins by managing plugins, searching in the available tab, installing without restart, then restarting Jenkins and confirming the plugin is installed.
Install the audit log plugin in Jenkins via manage plugins, choose install without restart, then restart Jenkins. Log back in and confirm the plugin appears in the installed tab.
Learn to update existing plugins in Jenkins by navigating to manage plugins and the updates tab, selecting a plugin to download and install after restart, and rebooting to apply updates.
Open manage plugins in Jenkins, locate installed plugins in the install tab, click the red uninstall icon to mark removal, and reboot Jenkins to complete the uninstall.
Disable a Jenkins plugin without uninstalling by using Manage plugins, under the install tab, toggle the enabled state, and allow restart only when no jobs are running.
After the hands-on journey with Jenkins, terminate all aws resources, delete key pairs and security groups, and close your aws account to avoid future charges.
Hello Guys,
Welcome to the "Jenkins CI CD | 70 Tasks on Declarative Pipelines & DSL Jobs" Course, which is specifically designed for Hands-On purpose onto Jenkins Declarative Pipelines, DSL Scripts, and Other Jenkins Features.
It's 2022
Learning new skills by just watching video sessions is not enough !!
You will have to hustle and practice the skills by implementing new things and by doing a lot of mistakes...
So, this course will push you to solve industry standard CI/CD related tasks on Jenkins.
Jenkins Hands On - Journey will cover below sections and topics:
# Environment Setup
AWS Account Setup
VM Setup
Jenkins Setup
GitLab Account Setup
Docker Setup
# Jenkins Free Style Jobs - Tasks
Jenkins free-style jobs
Cron setup
Parameters
Timestamps
Disabling jobs
# Jenkins CI/CD using Declarative Pipelines - Tasks
Pipeline jobs setup
Docker builds
Retry
TimeOuts
TimeStamps
Stages/Steps Setup
Options
Conditions
Approvals
Post Actions
Deploy Stages
SSH Agents
Remote Production Deployments
Docker CI/CD
ECR Integration
# DSL Tasks
DSL Seed Jobs
DSL Plugins
New Job Setup
Parameters
Descriptions
Timestamps
Disable Jobs
# Jenkins Plugins Management Tasks
Install Plugins
Update Plugins
Remove Plugins
Restart Jenkins
Here are the steps that you need to follow while working on this course tasks:
Give your 100% to solve the given tasks
Search Online for Official Documentation
Still not sure, Solution videos are provided for every task
Still have queries ?, We are here, Reach out to us through Q/A Section
Jenkins CI CD Hands-On with 70 Pipelines & Live Project | Practice Jenkins Declarative Pipelines, DSL & Jenkins Features
For all the tasks on Declarative Pipelines, DSL Pipelines, and Free Style Jobs, solutions will be provided just after every question.
You can also practice other Jenkins CI CD Projects after this course to enhance your skill set on Jenkins.
This course also includes a session on "How to delete the EC2 Machines on AWS and How to Terminate the Free Tier Account"
We are also offering other Hands On Courses on:
Bash Scripting Practice with 100 Tasks and 10 Live Projects
Gitlab CI CD Hands On | Build your own 50 Gitlab Pipelines
Master the Ansible by Solving 50 Ansible Playbooks Tasks
Learn Docker by doing with 50 Hands On Tasks and CI/CD Setup
Learn AWS LEX with Live Project, Slack Integration and CI/CD
#Jenkins #CI/CD #DevOps #ContinuousIntegration #ContinuousDeployment #Automation #SoftwareDevelopment #JenkinsPipeline #JenkinsJobs #DeclarativePipelines #DSL #DevOpsTools #DevOpsEngineering #BuildAutomation #DeploymentAutomation #ConfigurationManagement #InfrastructureAsCode #VersionControl #Testing #Deployment #Integration #DevOpsPractices #DevOpsCulture
All the Best Guys !!
Keep Learning and Keep Exploring !!
AutoPilot DevOps