OCI DevOps CI/CD Pipeline — Documentation

← Back to Projects

📌 Overview

This project demonstrates a fully automated CI/CD pipeline using Oracle Cloud Infrastructure DevOps. Whenever code is pushed to the repository, the pipeline:

It is designed as a realistic production-style project showcasing practical CI/CD skills.

📐 Architecture Diagram

GitHub Repo OCI DevOps Repo Build Pipeline Test Stage Deployment → OKE

⚙️ CI/CD Deployment Flow

1️⃣ Code Commit / Push

Developer pushes new code to GitHub. This triggers OCI DevOps via webhook.

2️⃣ Build Pipeline

3️⃣ Test Automation

Unit tests and integration tests run automatically.

4️⃣ Container Push

Image is pushed to OCI Container Registry (OCIR).

5️⃣ Deployment Pipeline

Deploys container to:

📄 build_spec.yaml

version: 0.1
component: build

steps:
  - type: Command
    name: "Install dependencies"
    command: |
      pip install -r requirements.txt

  - type: Command
    name: "Run tests"
    command: |
      pytest

  - type: Command
    name: "Build Docker Image"
    command: |
      docker build -t myapp:latest .

  - type: Command
    name: "Push to OCIR"
    command: |
      docker tag myapp:latest <region.ocir.io/tenancy/myapp:latest>
      docker push <region.ocir.io/tenancy/myapp:latest>
    

📄 deployment_spec.json

{
  "deploymentType": "OKE",
  "namespace": "default",
  "image": "",
  "replicas": 2,
  "ports": [
    {
      "containerPort": 80,
      "protocol": "TCP"
    }
  ]
}
    

🟦 Requirements

📘 Lessons Learned

🚀 Future Enhancements

← Back to Projects