Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

innodata-testproject-patch1 #18

Open
wants to merge 655 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
655 commits
Select commit Hold shift + click to select a range
d0553e2
Update node.js.yml
mnagaraju5628 Feb 14, 2024
86b8db3
Update repo.yaml
mnagaraju5628 Feb 14, 2024
b1bd43d
Update repo.yaml
mnagaraju5628 Feb 14, 2024
bd65301
Update repo.yaml
mnagaraju5628 Feb 14, 2024
76ba55c
Update repo.yaml
mnagaraju5628 Feb 14, 2024
44e8f7b
Update repo.yaml
mnagaraju5628 Feb 14, 2024
4f684f5
Update repo.yaml
mnagaraju5628 Feb 15, 2024
43c4697
Update repo.yaml
mnagaraju5628 Feb 15, 2024
db9d318
Update repo.yaml
mnagaraju5628 Feb 15, 2024
cfc14da
Update repo.yaml
mnagaraju5628 Feb 15, 2024
0f34335
Update repo.yaml
mnagaraju5628 Feb 15, 2024
cca9aa3
Update repo.yaml
mnagaraju5628 Feb 15, 2024
2e3e2ce
Update node.js.yml
mnagaraju5628 Feb 15, 2024
3e907fc
Update repo.yaml
mnagaraju5628 Feb 15, 2024
5d101a0
Update repo.yaml
mnagaraju5628 Feb 15, 2024
0f2d882
Update repo.yaml
mnagaraju5628 Feb 15, 2024
a57ba44
Update repo.yaml
mnagaraju5628 Feb 15, 2024
64e9e28
Update repo.yaml
mnagaraju5628 Feb 15, 2024
8375267
Update node.js.yml
mnagaraju5628 Feb 15, 2024
c6d6cf2
Update repo.yaml
mnagaraju5628 Feb 15, 2024
fdd9457
Update node.js.yml
mnagaraju5628 Feb 15, 2024
f0f115a
Update node.js.yml
mnagaraju5628 Feb 15, 2024
00f792b
Update repo.yaml
mnagaraju5628 Feb 15, 2024
8cfd0b8
Update repo.yaml
mnagaraju5628 Feb 15, 2024
b30eac5
Update repo.yaml
mnagaraju5628 Feb 15, 2024
11ab142
Delete .github/workflows/node.js.yml
mnagaraju5628 Feb 15, 2024
3342df1
Update testansible-build
mnagaraju5628 Feb 15, 2024
42f8a66
Update repo.yaml
mnagaraju5628 Feb 15, 2024
58df0b4
Delete .github/workflows/testansible-build
mnagaraju5628 Feb 15, 2024
0920765
Create node.js.yml
mnagaraju5628 Feb 15, 2024
2b24d73
Update repo.yaml
mnagaraju5628 Feb 15, 2024
308fcc2
Update repo.yaml
mnagaraju5628 Feb 15, 2024
d29f3f0
Update repo.yaml
mnagaraju5628 Feb 15, 2024
7a28770
Update repo.yaml
mnagaraju5628 Feb 15, 2024
b176640
Update repo.yaml
mnagaraju5628 Feb 15, 2024
51b74d9
Update repo.yaml
mnagaraju5628 Feb 15, 2024
4ff2600
Update repo.yaml
mnagaraju5628 Feb 16, 2024
3fe44ce
Update repo.yaml
mnagaraju5628 Feb 16, 2024
9dd5fb4
Update repo.yaml
mnagaraju5628 Feb 16, 2024
7a74987
Update repo.yaml
mnagaraju5628 Feb 16, 2024
6d2c7cb
Update repo.yaml
mnagaraju5628 Feb 16, 2024
33d710f
Update repo.yaml
mnagaraju5628 Feb 16, 2024
535960d
Update repo.yaml
mnagaraju5628 Feb 16, 2024
ff5dd1b
Update repo.yaml
mnagaraju5628 Feb 16, 2024
ba995e9
Update repo.yaml
mnagaraju5628 Feb 16, 2024
3c59d4e
Update repo.yaml
mnagaraju5628 Feb 16, 2024
3f2ce26
Update repo.yaml
mnagaraju5628 Feb 16, 2024
6404413
Update repo.yaml
mnagaraju5628 Feb 16, 2024
a966bb8
Update repo.yaml
mnagaraju5628 Feb 16, 2024
dc7d5e2
Update repo.yaml
mnagaraju5628 Feb 16, 2024
db4402c
Update repo.yaml
mnagaraju5628 Feb 16, 2024
b42c2d5
Update repo.yaml
mnagaraju5628 Feb 16, 2024
86116a4
Update repo.yaml
mnagaraju5628 Feb 19, 2024
05858f5
Update repo.yaml
mnagaraju5628 Feb 19, 2024
9facb84
Update repo.yaml
mnagaraju5628 Feb 19, 2024
2e0e2b6
Update node.js.yml
mnagaraju5628 Feb 19, 2024
388e784
Update repo.yaml
mnagaraju5628 Feb 19, 2024
94bfc7d
Update repo.yaml
mnagaraju5628 Feb 19, 2024
6d58cf0
Update repo.yaml
mnagaraju5628 Feb 19, 2024
693aaf8
Update repo.yaml
mnagaraju5628 Feb 19, 2024
8761817
Update repo.yaml
mnagaraju5628 Feb 19, 2024
a5d051f
Update repo.yaml
mnagaraju5628 Feb 19, 2024
3e52787
Update repo.yaml
mnagaraju5628 Feb 19, 2024
cfc979b
Update repo.yaml
mnagaraju5628 Feb 19, 2024
48168d0
Update repo.yaml
mnagaraju5628 Feb 19, 2024
350e4de
Update repo.yaml
mnagaraju5628 Feb 19, 2024
2f36a60
Update repo.yaml
mnagaraju5628 Feb 19, 2024
08002a5
Update repo.yaml
mnagaraju5628 Feb 19, 2024
465ecb1
Update repo.yaml
mnagaraju5628 Feb 19, 2024
827e1dd
Update repo.yaml
mnagaraju5628 Feb 19, 2024
7013a0f
Update repo.yaml
mnagaraju5628 Feb 19, 2024
d00b644
Update repo.yaml
mnagaraju5628 Feb 19, 2024
263a1e1
Update node.js.yml
mnagaraju5628 Feb 19, 2024
b68c65f
Update repo.yaml
mnagaraju5628 Feb 19, 2024
cb90aeb
Update repo.yaml
mnagaraju5628 Feb 19, 2024
349f4fe
Update repo.yaml
mnagaraju5628 Feb 19, 2024
b98ff76
Update repo.yaml
mnagaraju5628 Feb 19, 2024
d96ec75
Update index.js
mnagaraju5628 Feb 19, 2024
3f3f9c4
Update index.js
mnagaraju5628 Feb 19, 2024
ab8c2d9
Merge pull request #26 from mnagaraju5628/Inno-test-patch-1
mnagaraju5628 Feb 19, 2024
25f1c71
Update index.js
mnagaraju5628 Feb 19, 2024
6315439
Merge pull request #27 from mnagaraju5628/Inno-test-patch-2
mnagaraju5628 Feb 19, 2024
ec4e4c7
Update index.js
mnagaraju5628 Feb 19, 2024
a1ba4e5
Merge pull request #28 from mnagaraju5628/Inno-test-patch-3
mnagaraju5628 Feb 19, 2024
b675c48
Update index.js
mnagaraju5628 Feb 19, 2024
0eab8cb
Merge pull request #29 from mnagaraju5628/Inno-test-patch-4
mnagaraju5628 Feb 19, 2024
b1af083
Update node.js.yml
mnagaraju5628 Feb 21, 2024
03d8c95
Update node.js.yml
mnagaraju5628 Feb 21, 2024
be464db
Update node.js.yml
mnagaraju5628 Feb 21, 2024
b2ee57b
Update node.js.yml
mnagaraju5628 Feb 21, 2024
3a8b73d
Update node.js.yml
mnagaraju5628 Feb 21, 2024
d009f4c
Update node.js.yml
mnagaraju5628 Feb 21, 2024
da710b9
Update node.js.yml
mnagaraju5628 Feb 21, 2024
5a9459e
Update node.js.yml
mnagaraju5628 Feb 21, 2024
acc147c
Update node.js.yml
mnagaraju5628 Feb 21, 2024
237fc73
Update node.js.yml
mnagaraju5628 Feb 21, 2024
f768d85
Update node.js.yml
mnagaraju5628 Feb 21, 2024
7a342d6
Update node.js.yml
mnagaraju5628 Feb 21, 2024
c71a642
Update node.js.yml
mnagaraju5628 Feb 21, 2024
6a1e307
Update node.js.yml
mnagaraju5628 Feb 21, 2024
5e972b7
Update node.js.yml
mnagaraju5628 Feb 21, 2024
d564b0d
Update node.js.yml
mnagaraju5628 Feb 21, 2024
5c510c2
Update node.js.yml
mnagaraju5628 Feb 21, 2024
c54fb32
Update node.js.yml
mnagaraju5628 Feb 21, 2024
ebf3332
Update node.js.yml
mnagaraju5628 Feb 21, 2024
5887683
Update node.js.yml
mnagaraju5628 Feb 21, 2024
dee95c8
Update node.js.yml
mnagaraju5628 Mar 26, 2024
63fab2f
Update node.js.yml
mnagaraju5628 Mar 26, 2024
07939f3
Update node.js.yml
mnagaraju5628 Mar 26, 2024
da8b442
Update node.js.yml
mnagaraju5628 Mar 26, 2024
1dbb2f8
Update node.js.yml
mnagaraju5628 Mar 26, 2024
0cd301f
Update node.js.yml
mnagaraju5628 Mar 26, 2024
ae6145c
Update node.js.yml
mnagaraju5628 Mar 26, 2024
708828b
Update node.js.yml
mnagaraju5628 Mar 26, 2024
7120435
Update node.js.yml
mnagaraju5628 Mar 26, 2024
126d536
Update node.js.yml
mnagaraju5628 Mar 26, 2024
082cf51
Update node.js.yml
mnagaraju5628 Mar 26, 2024
c9f6e7f
Update node.js.yml
mnagaraju5628 Mar 26, 2024
93b991e
Update node.js.yml
mnagaraju5628 Mar 26, 2024
286abe7
Update node.js.yml
mnagaraju5628 Mar 26, 2024
a402673
Update node.js.yml
mnagaraju5628 Mar 26, 2024
cd5f831
Update node.js.yml
mnagaraju5628 Mar 26, 2024
e7794cb
Update node.js.yml
mnagaraju5628 Mar 26, 2024
ab7dc2c
Update node.js.yml
mnagaraju5628 Mar 26, 2024
dbf9503
Update node.js.yml
mnagaraju5628 Mar 26, 2024
2f778cd
Update node.js.yml
mnagaraju5628 Mar 26, 2024
32d0da4
Update node.js.yml
mnagaraju5628 Mar 26, 2024
3be9988
Update node.js.yml
mnagaraju5628 Mar 26, 2024
7d500f2
Update node.js.yml
mnagaraju5628 Mar 26, 2024
b64081b
Update node.js.yml
mnagaraju5628 Mar 26, 2024
06545f0
Update node.js.yml
mnagaraju5628 Mar 26, 2024
340703a
Update node.js.yml
mnagaraju5628 Mar 26, 2024
b4a3333
Update node.js.yml
mnagaraju5628 Mar 26, 2024
7f05f44
Update node.js.yml
mnagaraju5628 Mar 26, 2024
c58a5f1
Update node.js.yml
mnagaraju5628 Mar 26, 2024
309bc22
Update node.js.yml
mnagaraju5628 Mar 26, 2024
acee833
Update node.js.yml
mnagaraju5628 Mar 26, 2024
7e642d4
Update node.js.yml
mnagaraju5628 Mar 26, 2024
0a7bff7
Update node.js.yml
mnagaraju5628 Mar 26, 2024
0b1109d
Update node.js.yml
mnagaraju5628 Mar 26, 2024
ccb2876
Update node.js.yml
mnagaraju5628 Mar 26, 2024
1f03ead
Update node.js.yml
mnagaraju5628 Mar 26, 2024
98bb7a4
Update node.js.yml
mnagaraju5628 Mar 26, 2024
71f99b2
Update deployment.yaml
mnagaraju5628 May 9, 2024
85d6a19
Update node.js.yml
mnagaraju5628 May 9, 2024
29fa742
Update node.js.yml
mnagaraju5628 May 9, 2024
a015f03
Update node.js.yml
mnagaraju5628 May 9, 2024
d222736
Update node.js.yml
mnagaraju5628 May 9, 2024
58369f6
Update node.js.yml
mnagaraju5628 May 9, 2024
0c341cf
Update node.js.yml
mnagaraju5628 May 9, 2024
a2201e0
Update node.js.yml
mnagaraju5628 May 9, 2024
6dc987b
Update node.js.yml
mnagaraju5628 May 14, 2024
5aed163
Update node.js.yml
mnagaraju5628 May 14, 2024
a15b85e
Update node.js.yml
mnagaraju5628 May 14, 2024
2b74976
Update node.js.yml
mnagaraju5628 May 14, 2024
a79fca6
Update node.js.yml
mnagaraju5628 May 14, 2024
13b5b9c
Update node.js.yml
mnagaraju5628 May 14, 2024
bdb36cc
Update node.js.yml
mnagaraju5628 May 14, 2024
51faa8d
Update node.js.yml
mnagaraju5628 May 14, 2024
18a0afa
Update node.js.yml
mnagaraju5628 May 14, 2024
a49a573
Update node.js.yml
mnagaraju5628 May 14, 2024
d2665cd
Update node.js.yml
mnagaraju5628 May 14, 2024
94507fb
Update node.js.yml
mnagaraju5628 May 14, 2024
3e175b6
Update node.js.yml
mnagaraju5628 May 14, 2024
4ba385c
Update node.js.yml
mnagaraju5628 May 14, 2024
41b9801
Update node.js.yml
mnagaraju5628 May 14, 2024
0af4f6f
Update node.js.yml
mnagaraju5628 May 17, 2024
95c5930
Update node.js.yml
mnagaraju5628 May 17, 2024
d1f226b
Update node.js.yml
mnagaraju5628 May 17, 2024
649a237
Update node.js.yml
mnagaraju5628 May 17, 2024
da9a50e
Update node.js.yml
mnagaraju5628 May 17, 2024
40c98ac
Update node.js.yml
mnagaraju5628 May 17, 2024
43ca8dd
Update node.js.yml
mnagaraju5628 May 17, 2024
2b43d9f
Update node.js.yml
mnagaraju5628 May 17, 2024
c41e7f7
Update deployment.yaml
mnagaraju5628 May 17, 2024
cc8e291
Update node.js.yml
mnagaraju5628 May 17, 2024
e546a5e
Update node.js.yml
mnagaraju5628 May 17, 2024
743a252
Create testing with SA key
mnagaraju5628 May 17, 2024
905ef6c
Update node.js.yml
mnagaraju5628 May 17, 2024
0d823da
Rename node.js.yml to testing with SA keys
mnagaraju5628 May 17, 2024
18b9db8
Update testing with SA keys
mnagaraju5628 May 17, 2024
2801cef
Delete .github/workflows/testing with SA key
mnagaraju5628 May 17, 2024
7756dab
Create testing with workload identity
mnagaraju5628 May 17, 2024
f2f41fd
Update testing with workload identity
mnagaraju5628 May 17, 2024
13d837e
Create node.js.yml
mnagaraju5628 May 17, 2024
d174c00
Delete .github/workflows/node.js.yml
mnagaraju5628 May 17, 2024
bff2a2e
Update testing with workload identity
mnagaraju5628 May 17, 2024
88d436a
Create nodejs.yaml
mnagaraju5628 May 27, 2024
1e12480
Create testing with sa key
mnagaraju5628 May 27, 2024
40be31f
Create testing with WI
mnagaraju5628 May 27, 2024
b3f913f
Create testing with Workload Identity
mnagaraju5628 May 27, 2024
c4574de
Update nodejs.yaml
mnagaraju5628 May 27, 2024
8fd06e7
Update nodejs.yaml
mnagaraju5628 May 27, 2024
7fe3451
Update nodejs.yaml
mnagaraju5628 May 27, 2024
cb58f8d
Update nodejs.yaml
mnagaraju5628 May 27, 2024
fd238bd
Update nodejs.yaml
mnagaraju5628 May 27, 2024
07feb1d
testing with Workload identity
mnagaraju5628 May 27, 2024
4670c47
Update and rename nodejs.yaml to testing with wi
mnagaraju5628 May 27, 2024
8ef4ec6
Delete .github/workflows/testing with wi
mnagaraju5628 May 27, 2024
7137538
Delete .github/workflows/testing with WI
mnagaraju5628 May 27, 2024
f273ba4
Delete .github/workflows/testing with Workload Identity
mnagaraju5628 May 27, 2024
b654410
Create Testing with Workload Identity
mnagaraju5628 May 27, 2024
7b618c2
Create node.js.yml
mnagaraju5628 May 27, 2024
775b607
Update node.js.yml
mnagaraju5628 May 27, 2024
5f1024f
Update node.js.yml
mnagaraju5628 May 27, 2024
979382b
Update node.js.yml
mnagaraju5628 May 27, 2024
2b67ddb
Update node.js.yml
mnagaraju5628 May 27, 2024
c8fdadc
Rename node.js.yml to testing with Workload Identity
mnagaraju5628 May 27, 2024
03df70f
Create Testing with sa key
mnagaraju5628 May 27, 2024
4c7f77e
Delete .github/workflows/Testing with Workload Identity
mnagaraju5628 May 27, 2024
79d83b8
Delete .github/workflows/Testing with sa key
mnagaraju5628 May 27, 2024
d1e9c4f
Delete .github/workflows/testing with SA keys
mnagaraju5628 May 27, 2024
acd6839
Delete .github/workflows/testing with Workload Identity
mnagaraju5628 May 27, 2024
9cbbda1
Delete .github/workflows/testing with sa key
mnagaraju5628 May 27, 2024
5ff9cbc
Delete .github/workflows/testing with workload identity
mnagaraju5628 May 27, 2024
06923ee
Create testing with Workload identity
mnagaraju5628 May 27, 2024
cf55278
Update testing with Workload identity
mnagaraju5628 May 27, 2024
a3b7266
Delete .github/workflows/testing with Workload identity
mnagaraju5628 May 27, 2024
2a226c1
Create node.js.yml
mnagaraju5628 May 27, 2024
d585862
Create nodejs.yml
mnagaraju5628 May 27, 2024
eb7065e
Update nodejs.yml
mnagaraju5628 May 27, 2024
be904c9
Update node.js.yml
mnagaraju5628 May 27, 2024
da1ddb2
Update node.js.yml
mnagaraju5628 May 27, 2024
6fdee03
Delete .github/workflows/nodejs.yml
mnagaraju5628 May 27, 2024
85d883d
Update node.js.yml
mnagaraju5628 May 27, 2024
b5bc645
Update node.js.yml
mnagaraju5628 May 27, 2024
3fb839d
Update node.js.yml
mnagaraju5628 May 27, 2024
49cdb50
Update node.js.yml
mnagaraju5628 May 28, 2024
b97ab11
Update node.js.yml
mnagaraju5628 May 28, 2024
cd134d6
Update node.js.yml
mnagaraju5628 May 28, 2024
d622adf
Update node.js.yml
mnagaraju5628 May 28, 2024
dfc3eee
Update node.js.yml
mnagaraju5628 May 28, 2024
7dd7b47
Update dockerfile
mnagaraju5628 May 28, 2024
21321d9
Update node.js.yml
mnagaraju5628 May 28, 2024
375fda4
Update node.js.yml
mnagaraju5628 May 28, 2024
c50828c
Update node.js.yml
mnagaraju5628 May 28, 2024
a8817d5
Update node.js.yml
mnagaraju5628 May 28, 2024
31e9c8c
Update node.js.yml
mnagaraju5628 May 28, 2024
eb7292d
Update node.js.yml
mnagaraju5628 May 28, 2024
0488d4e
Update node.js.yml
mnagaraju5628 May 29, 2024
4c080e0
Update node.js.yml
mnagaraju5628 May 29, 2024
0f5a53f
Update node.js.yml
mnagaraju5628 May 29, 2024
6a971b4
Update node.js.yml
mnagaraju5628 May 29, 2024
15374fe
Update node.js.yml
mnagaraju5628 May 29, 2024
8c173c3
Update node.js.yml
mnagaraju5628 May 29, 2024
55fc6db
Update node.js.yml
mnagaraju5628 May 29, 2024
9bfa0bb
Update node.js.yml
mnagaraju5628 May 29, 2024
f3fdd8b
Update node.js.yml
mnagaraju5628 May 29, 2024
f499ffe
Update node.js.yml
mnagaraju5628 May 29, 2024
5f15be2
Update node.js.yml
mnagaraju5628 May 29, 2024
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
33 changes: 0 additions & 33 deletions .github/workflows/main.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Setup Workload Identity Federation

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
setup:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Authenticate with Google Cloud
uses: google-github-actions/setup-gcloud@v2

- name: Get cluster credentials
run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a

- name: Create namespace
run: |
kubectl get namespace test-ns || kubectl create namespace test-ns

- name: Create ServiceAccount
run: |
kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns

- name: Bind IAM policy for GCS bucket creation
run: |
gcloud projects add-iam-policy-binding goldengate-1 \
--role=roles/storage.objectAdmin \
--member=serviceAccount:goldengate-1.svc.id.goog[test-ns/test-ksa] \
--condition=None

- name: GCS Bucket
run: |
gsutil ls gs://test-innobucket1534

- name: Store application in GCS Bucket
run: |
gsutil cp -r /home/mnagaraju/actions-runner/Testproject-INNO gs://test-innobucket1534
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Node.js Application
44 changes: 44 additions & 0 deletions ansible/repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
- name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE
hosts: localhost
gather_facts: false

tasks:
- name: Ensure git is installed
become: true
apt:
name: git
state: present

- name: Ensure Docker dependencies are installed
become: true
apt:
name: "{{ item }}"
state: present
loop:
- containerd
- docker.io

- name: Clone Node.js code from GitHub
git:
repo: https://github.com/mnagaraju5628/Testproject-INNO.git
dest: /home/ubuntu/actions-runner/Testproject-INNO
version: main
become: true

- name: Build Docker image
command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO"
become: true

- name: Push Docker image to artifact registry
command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest"
become: true

- name: Deploy to GKE
become: true
shell: |
cd /home/ubuntu/actions-runner/Testproject-INNO/
gcloud container clusters get-credentials innotest-cluster --region us-central1-c
kubectl rollout restart deployment nodeapp-deployment
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
8 changes: 6 additions & 2 deletions deployment.yml → deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ spec:
template:
metadata:
labels:
app: nodeapp
app: nodeapp
spec:
containers:
- name: nodeserver
image: thetips4you/nodeapp:latest
image: us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest
ports:
- containerPort: 3000
imagePullPolicy: Always
strategy:
type: RollingUpdate

38 changes: 0 additions & 38 deletions deploymentservice.yml

This file was deleted.

4 changes: 3 additions & 1 deletion dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:latest
FROM node:20-alpine

WORKDIR /usr/src/app

Expand All @@ -9,4 +9,6 @@ RUN npm install
COPY . .

EXPOSE 4000

CMD [ "node", "index.js" ]

4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ var express = require('express');
var app = express();

app.get('/', function (req, res) {
res.send('{ "response": "Hello From Thetips4you" }');
res.send('{ "response": "Welcome to Github-action CI/CD via ansible " }');
});

app.get('/will', function (req, res) {
res.send('{ "response": "Hello World" }');
res.send('{ "response": "Welcome" }');
});
app.get('/ready', function (req, res) {
res.send('{ "response": " Great!, It works!" }');
Expand Down
5 changes: 3 additions & 2 deletions service.yml → service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Service
metadata:
Expand All @@ -8,6 +9,6 @@ spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 5000
port: 8000
targetPort: 3000
nodePort: 31110
nodePort: 31000
6 changes: 3 additions & 3 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var request = require('supertest');
var app = require('../index.js');
describe('GET /will', function() {
it('respond with hello world', function(done) {
request(app).get('/will').expect('{ "response": "Hello World" }', done);
it('respond with Welcome', function(done) {
request(app).get('/will').expect('{ "response": "Welcome" }', done);
});
});
});