Module 11 - Jenkins

Lab 1: Create a Freestyle Job

  • How do you create a Freestyle Job named hello-job?

  • How do you add a build step that runs a shell script printing “Hello from Jenkins!”?

  • How do you save and build the job?

  • How do you view the console output?


Lab 2: Jenkins Pipeline Basics

  • How do you create a Jenkins pipeline with build, test, and deploy stages?

  • How do you echo messages inside each stage?

  • How do you run the pipeline either from the Jenkins UI or using a Jenkinsfile in Git?

  • What declarative pipeline syntax is needed?


Lab 3: Git Integration

  • How do you create a Jenkins pipeline that pulls code from GitHub?

  • How do you configure Jenkins to automatically trigger the job when a new commit is pushed?

  • How do you configure and verify GitHub webhook delivery?

  • Which plugins are required?


Lab 4: Parameterized Build

  • How do you create a parameterized job with:

    • a String parameter named ENVIRONMENT

    • a Boolean parameter named DEBUG_MODE?

  • How do you use these parameters inside a shell script?

  • How do you print the selected values in the build output?


Lab 5: Build a Java or Python Project

  • How do you create a Jenkins pipeline that pulls a Java or Python project from GitHub?

  • How do you install dependencies inside the pipeline?

  • How do you run automated tests using Jenkins?


Lab 6: Jenkins + Docker Integration

  • How do you install Docker on the Jenkins server?

  • How do you create a pipeline that builds a Docker image?

  • How do you tag the Docker image?

  • How do you push the image to DockerHub?

  • How do you use Jenkins credentials for DockerHub authentication?


Lab 7: Jenkins Pipeline With Email Notification

  • How do you configure SMTP settings in Jenkins?

  • How do you create a pipeline that intentionally fails to test email notifications?

  • How do you configure the pipeline to send email notifications on:

    • build SUCCESS

    • build FAILURE?


Lab 8: Configure Jenkins Agent (Node)

  • How do you create a new Jenkins agent node using a Linux VM or Docker container?

  • How do you install Java on the agent?

  • How do you connect the Jenkins agent using SSH or JNLP?

  • How do you configure a job to run specifically on that agent?

  • How do you verify the workspace location on the agent?


Lab 9: Webhook for Multibranch Pipeline

  • How do you create a Multibranch Pipeline in Jenkins?

  • How do you connect it to a GitHub repository with multiple branches?

  • How do you configure GitHub webhooks for the multibranch setup?

  • How do you verify that:

    • a commit to main triggers its pipeline

    • a commit to a feature branch triggers its own pipeline?


Lab 10: Scheduled (Cron) Builds

  • How do you configure a job to run daily at 2 PM using cron syntax?

  • How do you add a pipeline step that cleans old files or temporary build data?

  • How do you verify the scheduled runs using Build History?

Last updated