Skip to content

Jenkins Tutorials

This page collects practical Jenkins setup notes and pipeline examples.

Declarative Pipeline Example

pipeline {
  agent any
  stages {
    stage('Test') {
      steps {
        sh 'make test'
      }
    }
    stage('Build') {
      steps {
        sh 'make build'
      }
    }
  }
}

Common Workflow

  1. Create a job or multibranch pipeline.
  2. Add a Jenkinsfile to the repository.
  3. Connect the repository webhook.
  4. Store credentials in Jenkins.
  5. Promote builds after tests pass.

Practical Notes

  • Prefer declarative pipelines for most teams.
  • Use agents with the right tooling instead of overloading the controller.
  • Keep shared logic in libraries when multiple pipelines repeat the same steps.