Unity 빌드는 Jenkins Job 내부에서 따로 실행된다고 가정하고, 모니터링 환경만 도커 기반으로 완성한다.

<aside> 📌

목적

📁 디렉토리 구조 예시

monitoring/
├─ docker-compose.yml
├─ prometheus/
│   └─ prometheus.yml

📄 monitoring/docker-compose.yml

version: '3.8'

services:
  jenkins:
    image: jenkins/jenkins:lts
    container_name: jenkins
    ports:
      - "8080:8080"
    volumes:
      - jenkins_home:/var/jenkins_home
    networks:
      - monitoring-net

  prometheus:
    image: prom/prometheus
    container_name: prometheus
    ports:
      - "9090:9090"
    volumes:
      - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
    networks:
      - monitoring-net

  grafana:
    image: grafana/grafana
    container_name: grafana
    ports:
      - "3000:3000"
    networks:
      - monitoring-net

volumes:
  jenkins_home:

networks:
  monitoring-net:
  

📄 monitoring/prometheus/prometheus.yml

global:
  scrape_interval: 30s

scrape_configs:
  - job_name: 'jenkins'
    metrics_path: '/prometheus'
    static_configs:
      - targets: ['jenkins:8080']

실행

cd monitoring
docker compose up -d

🔗 접속 URL