1.3 KiB
1.3 KiB
Swagger Documentation Generator Pipeline
This repository demonstrates a Jenkins pipeline that:
- Generates OpenAPI (Swagger) documentation from Protobuf (
.proto) files usingbuf. - Converts OpenAPI v2 to OpenAPI v3.
- Builds a Docker image that includes the generated documentation.
- 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
- Docker Pipeline (
-
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:latestpython:3-bookworm
These tools are used inside isolated docker blocks and do not need to be globally installed on the agent host system.