Skip to content

Commit 5b97078

Browse files
author
Shreyas Nayak
committed
Argo CD Test deploy
1 parent ebf53d2 commit 5b97078

4 files changed

Lines changed: 15 additions & 35 deletions

File tree

.devcontainer/workflows/deploy.yml

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,22 @@
1-
name: Node.js CI/CD
1+
name: Docker Image CI
22

33
on:
44
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
5+
tags:
6+
- '*' # Triggers on any tag push
87

98
jobs:
10-
build-deploy:
11-
runs-on: node:20-bookworm-slim
9+
build:
10+
runs-on: ubuntu-latest
1211

1312
steps:
14-
- name: Checkout Code
15-
uses: actions/checkout@v4
13+
- uses: actions/checkout@v4
1614

17-
- name: Setup Node.js
18-
uses: actions/setup-node@v4
19-
with:
20-
node-version: 'v18.17.0'
15+
- name: Log in to Docker Hub
16+
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
2117

22-
- name: Install Dependencies
23-
run: npm install
18+
- name: Build the Docker image
19+
run: docker build . -f Dockerfile -t shreyasnayak21/nodejs-faas:${{ github.ref_name }}
2420

25-
- name: Run Build (optional)
26-
run: npm run build
27-
28-
- name: Run Tests (optional)
29-
run: npm test
30-
31-
Optional: Docker image build & push
32-
- name: Build Docker Image
33-
run: docker build -t shreyasnayak21/nodejs-faas:beta .
34-
35-
# - name: Push to DockerHub or GHCR
36-
# run: echo "push step here"
37-
38-
# Example Deploy: rsync to server (update credentials & IP)
39-
# - name: Deploy to Server
40-
# run: rsync -avz ./ user@your-server-ip:/opt/nodejs-faas/
41-
# env:
42-
# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
21+
- name: Push Docker image
22+
run: docker push shreyasnayak21/nodejs-faas:${{ github.ref_name }}

kubernetes/production/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
value: "1X2A0p84VmmLF3NYz3uHPx1hLuhT2U24"
2525
volumeMounts:
2626
- name: functions-volume
27-
mountPath: /opt/app/storage/functions
27+
mountPath: /opt/app/storage
2828
volumes:
2929
- name: functions-volume
3030
persistentVolumeClaim:

kubernetes/production/ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
traefik.ingress.kubernetes.io/router.entrypoints: web
77
spec:
88
rules:
9-
- host: faas.homelab.sunitha.local
9+
- host: faas.production.k3s.txcontact.com
1010
http:
1111
paths:
1212
- path: /

kubernetes/staging/ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
traefik.ingress.kubernetes.io/router.entrypoints: web
77
spec:
88
rules:
9-
- host: faas.homelab.sunitha.local
9+
- host: faas.staging.k3s.txcontact.com
1010
http:
1111
paths:
1212
- path: /

0 commit comments

Comments
 (0)