소스 관리부터 배포까지 한 흐름으로 잇는 예제다. 다음 도구로 소스를 관리하고 자동으로 빌드한 뒤 Kubernetes 클러스터에 배포한다.
애플리케이션 코드, Helm 차트, Kubernetes 매니페스트, 설정 파일을 한 저장소에 둔다. Jenkins 는 dockerfile 로 이미지를 만들고, ArgoCD 는 k8s/ 또는 charts/ 를 바라본다.
├── dockerfile
├── app/ # Python application
│ ├── main.py
│ ├── router.py
│ ├── core/
│ │ ├── __init__.py
│ │ ├── web.py
│ │ ├── webhook.py
│ │ └── refresh.py
│ ├── services/
│ │ ├── __init__.py
│ │ ├── mail_api_check.py
│ │ ├── messanger_api_check.py
│ │ ├── status.py
│ │ ├── send_msg.py
│ │ └── send_mail.py
│ ├── configs/
│ │ ├── config.yaml
│ │ └── target.yaml
│ ├── authentication/
│ │ ├── __init__.py
│ │ └── authentication.py
│ ├── templates/
│ │ ├── index.html
│ │ ├── login.html
│ │ └── base.html
│ ├── static/
│ │ ├── css/
│ │ │ └── style.css
│ │ └── js/
│ │ └── main.js
│ └── requirements.txt
├── charts/
│ ├── chart.yaml
│ └── values.yaml
├── config/
│ ├── core-site.xml
│ ├── hdfs-site.xml
│ └── other-config.yaml
├── files/
│ ├── entrypoint.sh
│ ├── app/ # java application
│ │ ├── application-runtime.bin
│ │ └── libs/
│ │ └── trino-connector-jdbc.jar
│ └── other-config.yaml
├── k8s/
│ ├── configmap.yaml
│ ├── deployment.yaml
│ ├── ingress.yaml
│ └── service.yaml
└── README.md
dockerfile 로 이미지를 빌드해 레지스트리에 푸시하고, k8s/deployment.yaml 또는 charts/values.yaml 의 이미지 태그를 올려 커밋한다 (Docker build Pipeline).파이프라인 스크립트의 실제 예는 SCP Kubernetes 빌드/배포 파이프라인 생성 에 있다.