Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
8085aeb
Merge pull request #8 from oslabs-beta/feature/newzustandstores
williams21v Oct 17, 2025
1f16a35
feat: enable live GitHub repo fetch via MCP repo_reader and GitHub ad…
PVeazie951 Oct 20, 2025
51fef5b
implement retry/rollback strecht feature
lorencDedaj Oct 21, 2025
3a43947
Merge pull request #9 from oslabs-beta/feature/newzustandstores
williams21v Oct 22, 2025
3179dce
feat(auth,mcp,github): per-user GitHub OAuth + session cookie; secure…
PVeazie951 Oct 23, 2025
377fad6
merge: resolved lorenc-server branch into paython-mcp
PVeazie951 Oct 24, 2025
6372b0d
feat: re-add deployments route mount and resolve merge conflicts
PVeazie951 Oct 24, 2025
2baaf87
feat(pipeline_generator): add dynamic user lookup, repo inference, an…
PVeazie951 Oct 25, 2025
b825ea4
feat(agent): expand system prompt and improve repo_reader handling fo…
PVeazie951 Oct 25, 2025
fa1b3c9
feat(agent): add dynamic repo owner inference for bare repo names
PVeazie951 Oct 25, 2025
74f71a4
fix(agent): improved repo parsing to correctly extract labeled repo, …
PVeazie951 Oct 25, 2025
e2b254f
Merge pull request #10 from oslabs-beta/paython-mcp
williams21v Oct 30, 2025
0ab49e4
Add CI workflow with workflow_dispatch
lorencDedaj Oct 31, 2025
599b18b
Add smoke test so CI passes
lorencDedaj Nov 1, 2025
9eba36d
Addding dockerfile for jenkins
eodafoo Nov 1, 2025
7a50354
Add CI workflow
lorencDedaj Nov 2, 2025
b7f9366
adding Jenkins router
eodafoo Nov 4, 2025
e524f77
Add wokrflow_dispatch trigger to CI workflow
lorencDedaj Nov 4, 2025
7e89ea6
Fix ci.yml file wrap 'dev' in quotes
lorencDedaj Nov 4, 2025
7b67ef8
coment out run: npm test in ci.yml file to test the workflow dispatch
lorencDedaj Nov 4, 2025
9f59088
finalize a working version of dispatch/deploy a workflow
lorencDedaj Nov 4, 2025
1d5e36e
Merge pull request #11 from oslabs-beta/lorenc-server
lorencDedaj Nov 4, 2025
60c57a8
Merge pull request #12 from oslabs-beta/alex
eodafoo Nov 4, 2025
0f7cedc
updated with debug info
eodafoo Nov 4, 2025
8e30df6
feat: add Google OAuth adapter and route for GCP integration
PVeazie951 Nov 5, 2025
f5c8259
move jenkins endpoint before global err handler
eodafoo Nov 5, 2025
a2fcbb5
Added OPENAI_API_KEY in the ci.yml file
lorencDedaj Nov 5, 2025
fd74445
Added OPENAI_API_KEY in the ci.yml file
lorencDedaj Nov 5, 2025
398154e
Ensure smoke test exits cleanly
lorencDedaj Nov 5, 2025
665246e
CI smoke test stub: nothing to check yet
lorencDedaj Nov 5, 2025
529a37e
merge: resolved main branch into paython-mcp
PVeazie951 Nov 5, 2025
8c8fa72
Merge pull request #13 from oslabs-beta/lorenc-server
PVeazie951 Nov 6, 2025
45aa23d
Merge pull request #14 from oslabs-beta/alex
lorencDedaj Nov 6, 2025
aafc43a
feat: enable navigation from Configure to Secrets with persistent pip…
PVeazie951 Nov 6, 2025
c54dba7
Merge pull request #15 from oslabs-beta/paython-mcp
eodafoo Nov 6, 2025
f1a8d49
fix port misconfiguration in yaml file
lorencDedaj Nov 6, 2025
f203e10
Merge pull request #16 from oslabs-beta/lorenc-ci
PVeazie951 Nov 6, 2025
759d6b4
implement pipelineCommit to commit yaml files
lorencDedaj Nov 7, 2025
0bb005e
Merge pull request #17 from oslabs-beta/lorenc-ci
PVeazie951 Nov 7, 2025
96cdbec
review(server): add comments to server.js
jdvplus Nov 7, 2025
4dae787
chore(review): add comments/insights
jdvplus Nov 7, 2025
a455b14
✅ Deploy flow: wired pipeline_commit to send repoFullName + YAML from…
PVeazie951 Nov 8, 2025
2706280
Merge pull request #19 from oslabs-beta/paython-mcp
lorencDedaj Nov 8, 2025
c81e0e8
Added new Jenkins route
eodafoo Nov 8, 2025
83e504d
Add new Jenkins Route
eodafoo Nov 8, 2025
8660a3b
Merge pull request #18 from oslabs-beta/jaime/code-review-and-suggest…
eodafoo Nov 11, 2025
e2fcce7
Merge pull request #20 from oslabs-beta/alex
lorencDedaj Nov 11, 2025
41a88ea
implement pipeline_history endpoint
lorencDedaj Nov 11, 2025
2628b35
Merge pull request #21 from oslabs-beta/lorenc-ci
lorencDedaj Nov 13, 2025
d13d3b4
implement pipeline_version endpoint / rollback feature
lorencDedaj Nov 13, 2025
d71ffb8
Merge pull request #22 from oslabs-beta/lorenc-ci
PVeazie951 Nov 13, 2025
af15c3b
Merge branch 'main' into lorenc-ci
lorencDedaj Nov 13, 2025
f36c21e
Updates: to the MCP
PVeazie951 Nov 13, 2025
56c7e7f
Merge remote-tracking branch 'origin/main' into paython-mcp
PVeazie951 Nov 13, 2025
f71af23
cleaned up the server file and my files
lorencDedaj Nov 13, 2025
f2598fd
Merge branch 'main' into lorenc-ci
lorencDedaj Nov 13, 2025
15d5e4e
Merge pull request #23 from oslabs-beta/lorenc-ci
PVeazie951 Nov 13, 2025
175fcdb
Stabilize conversational pipeline workflow: hardened commit-intent de…
PVeazie951 Nov 13, 2025
110e4b3
Merge pull request #24 from oslabs-beta/paython-mcp
lorencDedaj Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI
on:
push:
branches:
- main
- lorenc-server

workflow_dispatch:
inputs:
environment:
description: 'Target environment'
required: false
type: string
default: 'dev'

jobs:
build:
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY}}
PORT: 4000
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run start & sleep 3
- run: npm test
- run: echo "Deploying to ${{ inputs.environment || 'dev' }}..."
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ web_modules/
.env
.env.*
!.env.example
curl.txt


# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down
Binary file not shown.
Binary file not shown.
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Jenkins LTS (with JDK 17). The current LTS line (>= 2.492.3) meets the MCP plugin minimum requirement.
FROM jenkins/jenkins:lts-jdk17

USER root

# Install base tools (git, curl, certificates).
# If you use dedicated Jenkins agents, also install git inside your agent images.
RUN apt-get update && apt-get install -y --no-install-recommends \
git curl ca-certificates && \
rm -rf /var/lib/apt/lists/*

# Switch back to jenkins user
USER jenkins

# Preinstall plugins:
# MCP Server, Git, Git Client, GitHub integration, Pipeline, and Credentials
# Note: jenkins-plugin-cli is included in the official Jenkins image.
RUN jenkins-plugin-cli --plugins \
mcp-server \
git \
git-client \
github \
github-branch-source \
workflow-aggregator \
credentials \
ssh-credentials \
configuration-as-code

# Expose ports
EXPOSE 8080 50000

# (Optional) Jenkins startup parameters
# Disable the setup wizard on first startup:
# ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"

# (Optional) Mount JCasC configuration file
# ENV CASC_JENKINS_CONFIG=/var/jenkins_home/casc.yaml
66 changes: 66 additions & 0 deletions Jenkins dockerfile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Jenkins Docker

Dockerfile:

```python
# Jenkins LTS (with JDK 17). The current LTS line (>= 2.492.3) meets the MCP plugin minimum requirement.
FROM jenkins/jenkins:lts-jdk17

USER root

# Install base tools (git, curl, certificates).
# If you use dedicated Jenkins agents, also install git inside your agent images.
RUN apt-get update && apt-get install -y --no-install-recommends \
git curl ca-certificates && \
rm -rf /var/lib/apt/lists/*

# Switch back to jenkins user
USER jenkins

# Preinstall plugins:
# MCP Server, Git, Git Client, GitHub integration, Pipeline, and Credentials
# Note: jenkins-plugin-cli is included in the official Jenkins image.
RUN jenkins-plugin-cli --plugins \
mcp-server \
git \
git-client \
github \
github-branch-source \
workflow-aggregator \
credentials \
ssh-credentials \
configuration-as-code

# Expose ports
EXPOSE 8080 50000

# (Optional) Jenkins startup parameters
# Disable the setup wizard on first startup:
# ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"

# (Optional) Mount JCasC configuration file
# ENV CASC_JENKINS_CONFIG=/var/jenkins_home/casc.yaml
```

build:

```python
docker build -t jks:latest .
```

Run: you can change the first 8080 to whatever port you like.

```python
docker run -d --name jks -p 8080:8080 jks:latest
```

login to docker server :

```python
docker exec -it jks bash
cat /var/jenkins_home/secrets/initialAdminPassword # to get admin password.
then don't install anything close all the tag, when you hit
"start to use jenkins" click that one. you will be able to use Jenkins.
it is in localhost:8080

```
191 changes: 191 additions & 0 deletions NEW_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# 🚀 AutoDeploy

### _Auto-Generated, Secure CI/CD Pipelines with AI + MCP_

---

## 🧭 Overview

**AutoDeploy** is a modular platform that automatically provisions and manages secure CI/CD pipelines powered by **AI orchestration (MCP)**.
It integrates seamlessly with **GitHub Actions**, **Supabase**, and **AWS**, while keeping security and transparency at its core.

---

## 📦 Tech Stack

| Layer | Technology | Description |
| :----------- | :---------------------------------------- | :------------------------------------------------- |
| **Frontend** | React • Tailwind • Zustand | Developer dashboard (by Victoria) |
| **Backend** | Node.js • Express • PostgreSQL (Supabase) | Orchestration + OAuth + API services (by Lorenc) |
| **Infra** | AWS • Terraform • GitHub Actions (OIDC) | Cloud deployment and workflow automation (by Alex) |
| **Testing** | Jest • Supertest • Integration scripts | Unit and integration coverage (by Paython) |

---

## 🗂️ Project Structure

```bash
mcp-ci-cd-builder/
├── client/ # React + Tailwind + Zustand frontend
│ ├── src/
│ ├── public/
│ └── package.json
├── server/ # MCP orchestrator + adapters
│ ├── src/
│ ├── routes/
│ ├── lib/
│ ├── db.js
│ ├── server.js
│ └── package.json
├── infra/ # AWS OIDC + GitHub Actions + Terraform
│ ├── workflows/
│ └── terraform/
├── tests/ # Shared test utilities
│ ├── integration/
│ └── unit/
├── .github/workflows/ # CI configuration
│ └── ci.yml
├── .env.example
└── README.md
```

---

## ⚙️ Backend Architecture

### 🧩 OAuth + User Flow (GitHub)

```mermaid
sequenceDiagram
Frontend ->> Backend: GET /auth/github/start
Backend ->> GitHub: Redirect user to OAuth consent
GitHub ->> Backend: Redirect back with code & state
Backend ->> GitHub: POST /login/oauth/access_token
GitHub ->> Backend: Returns access_token
Backend ->> GitHub: GET /user, GET /user/emails
Backend ->> Supabase: Upsert users + connections
Backend ->> Frontend: Redirect / JSON success
```

---

### 📁 Server Layout

```bash
AutoDeploy/
├── server/
│ ├── lib/
│ │ ├── state.js # CSRF state store (in-memory)
│ │ └── github-oauth.js # GitHub API helpers
│ ├── routes/
│ │ ├── auth.github.js # OAuth routes
│ │ ├── deployments.js # Deployment logs API
│ │ └── usersRoutes.js # User CRUD endpoints
│ ├── server.js # Express bootstrap
│ ├── auth.js # Generate CSRF protection token
│ ├── db.js # Postgres pool + healthCheck()
│ └── ...
├── .env
└── package.json
```

---

## ✅ Current Functionality

| Component | Status | Description |
| :-------------------- | :----: | :------------------------------------------------- |
| **Express App** | ✅ | Clean middleware: CORS, Helmet, JSON, Morgan |
| **Database** | ✅ | Supabase-hosted PostgreSQL connection |
| **/health** | ✅ | Service uptime |
| **/db/ping** | ✅ | Database readiness check |
| **/users (POST/GET)** | ✅ | User creation + listing |
| **/auth/github/** | ✅ | Full OAuth 2.0 flow implemented |
| **/auth/github/me** | ✅ | Verifies stored token + fetches GitHub user |
| **/deployments** | ⚙️ | Deployment logging API (WIP dashboard integration) |

---

## 🧱 Deployment Logs API

The **Deployment Logs API** provides a lightweight, flexible record of deployment activity from **GitHub Actions** or other CI/CD providers.
It’s designed to power AutoDeploy’s build history and performance dashboards.

### 🧩 Schema Highlights

- **Status tracking:** `queued`, `running`, `success`, `failed`, `canceled`
- **Context:** `provider`, `repo_full_name`, `environment`, `branch`
- **Timing:** `started_at`, `finished_at`, auto-computed `duration_ms`
- **Metadata:** flexible JSON for provider-specific fields (e.g., run IDs, AWS region)

---

### 🔌 Endpoints

| Method | Endpoint | Description |
| :-------- | :------------------------ | :------------------------------------------------- |
| **POST** | `/deployments` | Create a new deployment record (`status = queued`) |
| **PATCH** | `/deployments/:id/status` | Update status and merge metadata |
| **GET** | `/deployments` | List deployments (filter by repo/env/status) |
| **GET** | `/deployments/:id` | Retrieve a single deployment record by ID |

---

### 🧠 Example Metadata

```json
{
"gha_run_id": 5823438279,
"gha_job_id": 987654321,
"gha_url": "https://github.com/lorencd/AutoDeploy/actions/runs/5823438279/job/987654321",
"aws_region": "us-east-1"
}
```

---

## 🔒 Key Features

- 🔐 **CSRF protection** using secure OAuth `state` store
- 🔁 **Idempotent upserts** for users & connections
- 🧩 **Zod validation** for API payloads
- 🧠 **GitHub token verification** before every usage
- 🗄️ **Structured metadata logging** for deployments
- 🧰 **Postgres enum types** for consistent deployment statuses

---

## 🧰 Environment Setup

```bash
# 1. Clone the repo
git clone https://github.com/oslabs-beta/AutoDeploy.git

# 2. Install dependencies
cd server && npm install

# 3. Create your .env file
cp .env.example .env

# 4. Run the backend
npm run dev

# 5. Visit the app
http://localhost:3000
```

---

## 🧩 Future Roadmap

- [ ] 🔑 Encrypt GitHub tokens at rest
- [ ] 🔄 Add PKCE support to OAuth flow
- [ ] 📊 Frontend deployment dashboard
- [ ] 🧵 Slack notifications for failed deploys
- [ ] 🧪 Integration tests for deployment API

---

## 🧾 License

MIT © 2025 AutoDeploy Team
Loading