Skip to content

Commit c04f5f1

Browse files
committed
Merge main into paython-mcp to resolve conflicts
2 parents e389e57 + d1b49ec commit c04f5f1

53 files changed

Lines changed: 4416 additions & 1008 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
npm-debug.log
3+
Dockerfile
4+
Dockerfile.jenkins
5+
docker-compose*.yml
6+
.git
7+
.gitignore
8+
.env
9+
.vscode
10+
dist

.github/workflows/ci-docker.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI & Docker
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-test:
11+
runs-on: unbuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Use Node.js 20
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: npm
22+
23+
- name: Install dependencies
24+
run: |
25+
cd server
26+
npm ci
27+
28+
- name: Run tests
29+
run: |
30+
cd server
31+
npm test --if-present
32+
33+
docker-image:
34+
needs: build-test
35+
runs-on: unbuntu-latest
36+
37+
permissions:
38+
contents: read
39+
packages: write
40+
41+
env:
42+
IMAGE_NAME: mcp-backend
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
48+
- name: Login to GitHub Container Registry
49+
uses: docker/login-action@v3
50+
with:
51+
registry: ghcr.io
52+
username: ${{ github.actor }}
53+
password: ${{ secrets.GITHUB_TOKEN }}
54+
55+
- name: Build Docker image
56+
run: |
57+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
58+
VERSION=${{ github.sha }}
59+
60+
echo "IMAGE_ID=$IMAGE_ID" >> $GITHUB_ENV
61+
echo "VERSION=$VERSION" >> $GITHUB_ENV
62+
63+
docker build -t $IMAGE_ID:$VERSION -t $IMAGE_ID:latest .
64+
65+
- name: Push Docker image
66+
run: |
67+
docker push $IMAGE_ID:$VERSION
68+
docker push $IMAGE_ID:latest

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
env:
2020
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY}}
21-
PORT: 4000
21+
PORT: 3000
2222
steps:
2323
- uses: actions/checkout@v4
2424
- uses: actions/setup-node@v4

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,7 @@ coverage/
148148
.DS_Store
149149

150150
# SSH key for AWS
151-
jenkins.pem
151+
jenkins.pem
152+
153+
# Local change log (Chinese summary)
154+
change_log_cn.md

Dockerfile

Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,17 @@
1-
# Jenkins LTS (with JDK 17). The current LTS line (>= 2.492.3) meets the MCP plugin minimum requirement.
2-
FROM jenkins/jenkins:lts-jdk17
3-
4-
USER root
5-
6-
# Install base tools (git, curl, certificates).
7-
# If you use dedicated Jenkins agents, also install git inside your agent images.
8-
RUN apt-get update && apt-get install -y --no-install-recommends \
9-
git curl ca-certificates && \
10-
rm -rf /var/lib/apt/lists/*
11-
12-
# Switch back to jenkins user
13-
USER jenkins
14-
15-
# Preinstall plugins:
16-
# MCP Server, Git, Git Client, GitHub integration, Pipeline, and Credentials
17-
# Note: jenkins-plugin-cli is included in the official Jenkins image.
18-
RUN jenkins-plugin-cli --plugins \
19-
mcp-server \
20-
git \
21-
git-client \
22-
github \
23-
github-branch-source \
24-
workflow-aggregator \
25-
credentials \
26-
ssh-credentials \
27-
configuration-as-code
28-
29-
# Expose ports
30-
EXPOSE 8080 50000
31-
32-
# (Optional) Jenkins startup parameters
33-
# Disable the setup wizard on first startup:
34-
# ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
35-
36-
# (Optional) Mount JCasC configuration file
37-
# ENV CASC_JENKINS_CONFIG=/var/jenkins_home/casc.yaml
1+
FROM node:20-alpine
2+
3+
WORKDIR /app
4+
5+
ENV NODE_ENV=production
6+
7+
ENV PORT=3000
8+
9+
COPY package*.json ./
10+
11+
RUN npm ci --omit=dev
12+
13+
COPY . .
14+
15+
EXPOSE 3000
16+
17+
CMD ["node", "server/server.js"]

Dockerfile.jenkins

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Jenkins LTS (with JDK 17). The current LTS line (>= 2.492.3) meets the MCP plugin minimum requirement.
2+
FROM jenkins/jenkins:lts-jdk17
3+
4+
USER root
5+
6+
# Install base tools (git, curl, certificates).
7+
# If you use dedicated Jenkins agents, also install git inside your agent images.
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
git curl ca-certificates && \
10+
rm -rf /var/lib/apt/lists/*
11+
12+
# Switch back to jenkins user
13+
USER jenkins
14+
15+
# Preinstall plugins:
16+
# MCP Server, Git, Git Client, GitHub integration, Pipeline, and Credentials
17+
# Note: jenkins-plugin-cli is included in the official Jenkins image.
18+
RUN jenkins-plugin-cli --plugins \
19+
mcp-server \
20+
git \
21+
git-client \
22+
github \
23+
github-branch-source \
24+
workflow-aggregator \
25+
credentials \
26+
ssh-credentials \
27+
configuration-as-code
28+
29+
# Expose ports
30+
EXPOSE 8080 50000
31+
32+
# (Optional) Jenkins startup parameters
33+
# Disable the setup wizard on first startup:
34+
# ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
35+
36+
# (Optional) Mount JCasC configuration file
37+
# ENV CASC_JENKINS_CONFIG=/var/jenkins_home/casc.yaml

client/components.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.css",
8+
"css": "src/index.css",
9+
"baseColor": "gray",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"iconLibrary": "lucide",
14+
"aliases": {
15+
"components": "@/components",
16+
"utils": "@/lib/utils",
17+
"ui": "@/components/ui",
18+
"lib": "@/lib",
19+
"hooks": "@/hooks"
20+
},
21+
"registries": {}
22+
}

0 commit comments

Comments
 (0)