githubEdit

Jenkins

Overview

Agent Types

  • Permanent Agents

    • Dedicated servers for running jobs: need java installed and ssh is setup

  • Cloud Agents

    • Ephemeral/Dynamic Agents spun up on demand

Build Types

  • Freestyle Build

    • Simplest method to create a build, like Shell Scripting

  • Pipelines

    • Use Groovy syntax

    • Use stages to break down components of build

Installation

Install on Docker

Build the Jenkins BlueOcean Docker Image

IF you are having problems building the image yourself, you can pull from my registry and rename it to myjenkins-blueocean:2.332.3-1

Create the network 'jenkins'

Run the Container

MacOS / Linux

Windows

Get the Password

Connect to the Jenkins

  • https://localhost:8080/

Jenkins Agents

Dynamic Jenkins Agent using Docker

Pre-requisite

  • Jenkins setup in one vm

  • Docker host setup in another vm, port 4243 and 32768 - 60999 opened in docker host machine

Implementation

  1. Configure docker host with Remote API

  2. Build jenkins slave docker image

  3. Configure Jenkins to integrate with Docker host

  4. Configure Docker Agent Templates

  5. Create a job in jenkins to test

Reference

  • https://github.com/devopsjourney1/jenkins-101

  • https://www.youtube.com/watch?v=6YZvp2GwT0A

  • Setup Linux Master Slave Agent in Jenkins with SSH-KEY: https://www.youtube.com/watch?v=Se7JtzFVZGE

  • Setup Jenkins Master Slave Agent in Windows 11 Using JNLP: https://www.youtube.com/watch?v=VwliiaOI5po

  • Jenkins Videos: https://www.youtube.com/watch?v=cu7cIMTaEFs&list=PL_Tu5Dicv_WCyKwf9B4F4ljcpJMYhRJ36

  • Dynamic Jenkins Slave Using Docker: https://www.youtube.com/watch?v=kHJGYTcLNj0

Last updated