What you’ll learn

  • Jenkins controller and agent concepts.
  • Workspaces and Pipeline jobs.
  • The structure of a Declarative Pipeline.

When you’re finished

  • Open Jenkins successfully.
  • Run a tiny manual Pipeline.
  • Find its Console Output.

2.1 Jenkins architecture

The two most important Jenkins execution concepts are:

Browser
   │
   ▼
Jenkins Controller
   │ schedules work
   ▼
Jenkins Agent / Executor
   │
   ▼
Workspace → commands → logs/artifacts
  • Controller — coordinates Jenkins, stores configuration, schedules work, and provides the web UI.
  • Agent — machine/executor that runs build work.

For the first labs, a single Windows machine can play both roles:

Windows 11 PC
└── Jenkins
    ├── Controller
    └── Local executor/workspace

A workspace is the directory Jenkins uses for checked-out source and temporary build output.

2.2 Local installation strategy

For the beginner path, use Jenkins LTS locally rather than adding Docker, Kubernetes, or an EC2 server immediately.

Prerequisites for the C# lab:

  • Git
  • .NET SDK
  • Jenkins LTS
  • Java version supported by the Jenkins LTS release
  • PowerShell

Later, the static-site lab adds:

  • AWS CLI
  • AWS credentials supplied securely

2.2.1 Verify local prerequisites

git --version
dotnet --info
java -version

Expected result: each command should print version information and exit successfully.

Exact supported Java versions can change with Jenkins releases. Check the Jenkins installation documentation before installing or upgrading Jenkins.

2.3 First pipeline

A minimal Declarative Pipeline looks like this:

pipeline {
    agent any

    stages {
        stage('Hello') {
            steps {
                echo 'Hello from Jenkins!'
            }
        }
    }
}

2.3.1 What each line means

  • pipeline — begins the Declarative Pipeline.
  • agent any — allow Jenkins to run the pipeline on any eligible agent.
  • stages — container for the named stages.
  • stage('Hello') — creates a visible pipeline stage.
  • steps — the commands Jenkins runs in that stage.
  • echo — writes text to the Jenkins console log.

2.3.2 First manual exercise

  1. Open Jenkins in your browser.
  2. Create a new Pipeline job.
  3. Give it a simple name such as jenkins-first-pipeline.
  4. Paste the minimal pipeline above into the Pipeline script field.
  5. Save the job.
  6. Select Build Now.
  7. Open the build.
  8. Open Console Output.
  9. Confirm that Hello from Jenkins! appears.

This intentionally avoids GitHub. The point is to prove the Jenkins engine is working before adding SCM integration.

Chapter checkpoint

You should now understand:

  • controller,
  • agent,
  • workspace,
  • Pipeline job,
  • Declarative Pipeline,
  • stage,
  • step,
  • console output.