From 4a8bfc622d59573305a5c7c19fbbe39195f91ebe Mon Sep 17 00:00:00 2001 From: mateuszwojcik Date: Tue, 3 Jun 2025 22:40:11 +0000 Subject: [PATCH] Update README.md --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ddc3516..d288278 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,45 @@ -# My Swagger Service +# Swagger Documentation Generator Pipeline -Minimal repo to test Jenkins pipeline with buf + docker. +This repository demonstrates a Jenkins pipeline that: + +1. Generates OpenAPI (Swagger) documentation from Protobuf (`.proto`) files using `buf`. +2. Converts OpenAPI v2 to OpenAPI v3. +3. Builds a Docker image that includes the generated documentation. +4. Pushes the image to a remote Docker registry. + +--- + +## 🚀 Prerequisites + +Before using this pipeline, your Jenkins setup must include the following: + +### ✅ Jenkins Configuration + +- **Jenkins Node (Agent):** + - This node must support Docker and allow running containers inside jobs. + - Either Docker-in-Docker or mounting host socket (`/var/run/docker.sock`) must be configured. + +- **Required Jenkins plugins:** + - Docker Pipeline (`docker-workflow`) + - Git Plugin + - Pipeline Plugin + - Credentials Binding Plugin + +- **Credentials:** + - Username and password or ssh key for cloning the Git repository. + - Docker registry credentials for pushing images. + +--- + +## 🔧 Required Tools (Agent-level) + +The Jenkins agent must be able to: + +- Run Docker commands (`docker build`, `docker push`) +- Pull and run the following images: + - `bufbuild/buf:latest` + - `python:3-bookworm` + +These tools are used inside isolated `docker` blocks and do not need to be globally installed on the agent host system. + +---