# bjegan92-saineha/jenkins-cicd-projects architecture

> Architecture diagram of the GitHub repository bjegan92-saineha/jenkins-cicd-projects, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bjegan92-saineha/jenkins-cicd-projects
- Repository: https://github.com/bjegan92-saineha/jenkins-cicd-projects

## Overview

This repository is a Jenkins CI/CD learning playbook, progressing from a manually triggered Freestyle job to pipeline-as-code, container deployment, multibranch builds, and distributed agents. Its six project directories also contain small Express demo APIs; sampled API code confirms basic and health endpoints, but does not show how pipeline stages invoke them. The README documents the first five projects; Project 6’s ECR/ECS scope is indicated by its directory name, so its deployment wiring is not inferred here.

Main entry points: [`project-3-cicd-docker-deploy/Jenkinsfile`](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-3-cicd-docker-deploy/Jenkinsfile) (Docker deploy pipeline), [`project-1-freestyle`](https://github.com/bjegan92-saineha/jenkins-cicd-projects/tree/master/project-1-freestyle) (Freestyle job), [`project-2-pipeline-jenkinsfile/Jenkinsfile`](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-2-pipeline-jenkinsfile/Jenkinsfile) (Declarative pipeline), [`project-6-cicd-docker-ecr-ecs/Jenkinsfile`](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-6-cicd-docker-ecr-ecs/Jenkinsfile) (ECR/ECS pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_basics["Jenkins basics"]
  node_project1["Freestyle job"]
  node_pipe2["Declarative pipeline"]
end

subgraph group_containers["Container delivery"]
  node_pipe3["Docker deploy pipeline"]
  node_image3["Container image"]
  node_pipe6["ECR/ECS pipeline"]
  node_image6["Container image"]
end

subgraph group_scaling["Pipeline scaling"]
  node_multi["Multibranch pipeline"]
  node_agents["Controller and agents"]
  node_docker4["Container image"]
  node_docker5["Container image"]
end

subgraph group_demos["Demo APIs"]
  node_api1["Project 1 API<br/>[index.js]"]
  node_api2["Project 2 API<br/>[index.js]"]
  node_api3["Project 3 API<br/>[index.js]"]
  node_api4["Project 4 API<br/>[index.js]"]
  node_api5["Project 5 API<br/>[index.js]"]
  node_api6["Project 6 API<br/>[index.js]"]
end

node_learner(("Learner"))
node_git[("Git repository")]
node_jenkins["Jenkins"]
node_registry[("Image registry")]
node_target["Deploy target"]

node_learner -->|"creates job"| node_jenkins
node_git -->|"provides source"| node_project1
node_jenkins -->|"runs job"| node_project1
node_git -->|"provides changes"| node_pipe2
node_jenkins -->|"runs stages"| node_pipe2
node_git -->|"provides changes"| node_pipe3
node_jenkins -->|"runs stages"| node_pipe3
node_pipe3 -->|"builds image"| node_image3
node_pipe3 -->|"pushes image"| node_registry
node_pipe3 -->|"deploys"| node_target
node_git -->|"provides branches"| node_multi
node_jenkins -->|"discovers branches"| node_multi
node_git -->|"provides source"| node_agents
node_jenkins -->|"assigns workloads"| node_agents
node_git -.->|"provides source"| node_pipe6
node_jenkins -.->|"runs pipeline"| node_pipe6
node_learner -->|"requests endpoint"| node_api1
node_learner -->|"requests endpoint"| node_api2
node_learner -->|"requests endpoint"| node_api3
node_learner -->|"requests endpoint"| node_api4
node_learner -->|"requests endpoint"| node_api5
node_learner -->|"requests endpoint"| node_api6

click node_project1 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/tree/master/project-1-freestyle"
click node_pipe2 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-2-pipeline-jenkinsfile/Jenkinsfile"
click node_pipe3 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-3-cicd-docker-deploy/Jenkinsfile"
click node_image3 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-3-cicd-docker-deploy/Dockerfile"
click node_pipe6 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-6-cicd-docker-ecr-ecs/Jenkinsfile"
click node_image6 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-6-cicd-docker-ecr-ecs/Dockerfile"
click node_multi "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-4-multibranch-pipeline/Jenkinsfile"
click node_agents "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-5-master-agent/Jenkinsfile"
click node_docker4 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-4-multibranch-pipeline/Dockerfile"
click node_docker5 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-5-master-agent/Dockerfile"
click node_api1 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-1-freestyle/index.js"
click node_api2 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-2-pipeline-jenkinsfile/index.js"
click node_api3 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-3-cicd-docker-deploy/index.js"
click node_api4 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-4-multibranch-pipeline/index.js"
click node_api5 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-5-master-agent/index.js"
click node_api6 "https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-6-cicd-docker-ecr-ecs/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_project1,node_pipe2 toneBlue
class node_pipe3,node_image3,node_pipe6,node_image6,node_git,node_registry toneAmber
class node_multi,node_agents,node_docker4,node_docker5 toneMint
class node_api1,node_api2,node_api3,node_api4,node_api5,node_api6 toneRose
class node_learner,node_jenkins,node_target toneIndigo
```

## Components

### Jenkins basics

- [Freestyle job](https://github.com/bjegan92-saineha/jenkins-cicd-projects/tree/master/project-1-freestyle): `project-1-freestyle`
- [Declarative pipeline](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-2-pipeline-jenkinsfile/Jenkinsfile): `project-2-pipeline-jenkinsfile/Jenkinsfile`

### Container delivery

- [Docker deploy pipeline](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-3-cicd-docker-deploy/Jenkinsfile): `project-3-cicd-docker-deploy/Jenkinsfile`
- [Container image](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-3-cicd-docker-deploy/Dockerfile): `project-3-cicd-docker-deploy/Dockerfile`
- [ECR/ECS pipeline](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-6-cicd-docker-ecr-ecs/Jenkinsfile): `project-6-cicd-docker-ecr-ecs/Jenkinsfile`
- [Container image](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-6-cicd-docker-ecr-ecs/Dockerfile): `project-6-cicd-docker-ecr-ecs/Dockerfile`

### Pipeline scaling

- [Multibranch pipeline](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-4-multibranch-pipeline/Jenkinsfile): `project-4-multibranch-pipeline/Jenkinsfile`
- [Controller and agents](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-5-master-agent/Jenkinsfile): `project-5-master-agent/Jenkinsfile`
- [Container image](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-4-multibranch-pipeline/Dockerfile): `project-4-multibranch-pipeline/Dockerfile`
- [Container image](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-5-master-agent/Dockerfile): `project-5-master-agent/Dockerfile`

### Demo APIs

- [Project 1 API](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-1-freestyle/index.js): `project-1-freestyle/index.js`
- [Project 2 API](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-2-pipeline-jenkinsfile/index.js): `project-2-pipeline-jenkinsfile/index.js`
- [Project 3 API](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-3-cicd-docker-deploy/index.js): `project-3-cicd-docker-deploy/index.js`
- [Project 4 API](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-4-multibranch-pipeline/index.js): `project-4-multibranch-pipeline/index.js`
- [Project 5 API](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-5-master-agent/index.js): `project-5-master-agent/index.js`
- [Project 6 API](https://github.com/bjegan92-saineha/jenkins-cicd-projects/blob/master/project-6-cicd-docker-ecr-ecs/index.js): `project-6-cicd-docker-ecr-ecs/index.js`

### Other components

- **Learner**
- **Git repository**
- **Jenkins**
- **Image registry**
- **Deploy target**

## Connections

- Learner → Jenkins: creates job
- Git repository → Freestyle job: provides source
- Jenkins → Freestyle job: runs job
- Git repository → Declarative pipeline: provides changes
- Jenkins → Declarative pipeline: runs stages
- Git repository → Docker deploy pipeline: provides changes
- Jenkins → Docker deploy pipeline: runs stages
- Docker deploy pipeline → Container image: builds image
- Docker deploy pipeline → Image registry: pushes image
- Docker deploy pipeline → Deploy target: deploys
- Git repository → Multibranch pipeline: provides branches
- Jenkins → Multibranch pipeline: discovers branches
- Git repository → Controller and agents: provides source
- Jenkins → Controller and agents: assigns workloads
- Git repository → ECR/ECS pipeline: provides source
- Jenkins → ECR/ECS pipeline: runs pipeline
- Learner → Project 1 API: requests endpoint
- Learner → Project 2 API: requests endpoint
- Learner → Project 3 API: requests endpoint
- Learner → Project 4 API: requests endpoint
- Learner → Project 5 API: requests endpoint
- Learner → Project 6 API: requests endpoint
