Spring Boot Tutorial 0/110 lessons ~6 min read Lesson 81

    Jenkins Basics

    Jenkins is the legacy CI workhorse — still everywhere in enterprises.

    Course progress0%
    Focus
    2 guided sections
    Practice signal
    Examples included
    Career prep
    Foundation builder

    Introduction

    Jenkins is the legacy CI workhorse — still everywhere in enterprises. Knowing a Jenkinsfile is mandatory for many backend roles.

    Informative example

    bash
    // Jenkinsfile (declarative)
    pipeline {
    agent any
    tools { jdk 'temurin-21' }
    stages {
    stage('Build') { steps { sh './mvnw -B clean package -DskipTests' } }
    stage('Test') { steps { sh './mvnw -B test' }
    post { always { junit 'target/surefire-reports/*.xml' } } }
    stage('Image') { when { branch 'main' }
    steps { sh './mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=registry.acme.com/orders:${env.BUILD_NUMBER}' } }
    stage('Deploy') { when { branch 'main' }
    steps { sh 'kubectl set image deployment/orders app=registry.acme.com/orders:${env.BUILD_NUMBER}' } }
    }
    }
    Ready to mark this lesson complete?Track your journey across the entire course.