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

Mnagaraju5628 patch 2 #20

Open
wants to merge 80 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
814ba6c
Create node.js.yml
mnagaraju5628 Dec 22, 2023
7ae34da
Update node.js.yml
mnagaraju5628 Dec 22, 2023
fbb3a43
Update node.js.yml
mnagaraju5628 Dec 22, 2023
170de69
Delete .github/workflows directory
mnagaraju5628 Dec 22, 2023
56e9808
Create node.js.yml
mnagaraju5628 Dec 22, 2023
aa30f91
Delete .github/workflows directory
mnagaraju5628 Dec 22, 2023
08b9b18
Create node.js.yml
mnagaraju5628 Dec 22, 2023
b11f314
Delete .github/workflows directory
mnagaraju5628 Dec 22, 2023
7b870aa
Create node.js.yml
mnagaraju5628 Dec 22, 2023
f1a817d
Update node.js.yml
mnagaraju5628 Dec 22, 2023
a5de5b6
Update node.js.yml
mnagaraju5628 Dec 22, 2023
58a9416
Update index.js
mnagaraju5628 Dec 22, 2023
2d3b7b1
Delete .github/workflows directory
mnagaraju5628 Dec 22, 2023
fec758a
Create node.js.yml
mnagaraju5628 Dec 22, 2023
56fdf42
Update node.js.yml
mnagaraju5628 Dec 22, 2023
7bb51c0
Update index.js
mnagaraju5628 Dec 22, 2023
4a27c60
Update test.js
mnagaraju5628 Dec 22, 2023
a4df0af
Update deploymentservice.yml
mnagaraju5628 Dec 22, 2023
752d740
Update deployment.yml
mnagaraju5628 Dec 22, 2023
745a162
Update service.yml
mnagaraju5628 Dec 22, 2023
db29626
Update deploymentservice.yml
mnagaraju5628 Dec 27, 2023
88972c9
Update deployment.yml
mnagaraju5628 Dec 27, 2023
84f124d
Update node.js.yml
mnagaraju5628 Dec 27, 2023
3b08ed1
Update node.js.yml
mnagaraju5628 Dec 27, 2023
f57e684
Update node.js.yml
mnagaraju5628 Dec 27, 2023
bde795e
Update node.js.yml
mnagaraju5628 Dec 27, 2023
a44ffbd
Update node.js.yml
mnagaraju5628 Dec 27, 2023
b3a3fc3
Update node.js.yml
mnagaraju5628 Dec 27, 2023
58e430f
Update node.js.yml
mnagaraju5628 Dec 27, 2023
8e4d812
Update node.js.yml
mnagaraju5628 Dec 27, 2023
bed2c1b
Update node.js.yml
mnagaraju5628 Dec 27, 2023
9071f07
Update node.js.yml
mnagaraju5628 Dec 27, 2023
0862e74
Update node.js.yml
mnagaraju5628 Dec 27, 2023
dbd6616
Update node.js.yml
mnagaraju5628 Dec 27, 2023
20675b2
Update node.js.yml
mnagaraju5628 Dec 27, 2023
c7f11dd
Update node.js.yml
mnagaraju5628 Dec 27, 2023
f748d7c
Update node.js.yml
mnagaraju5628 Dec 27, 2023
8099589
deploymentservice.yml
mnagaraju5628 Dec 27, 2023
d0a9b3e
Delete deployment.yml
mnagaraju5628 Dec 27, 2023
31127ea
Delete service.yml
mnagaraju5628 Dec 27, 2023
a50168a
Update node.js.yml
mnagaraju5628 Dec 27, 2023
0d902a5
Create README.md
mnagaraju5628 Dec 27, 2023
ac872fb
Update node.js.yml
mnagaraju5628 Dec 29, 2023
7070877
Update node.js.yml
mnagaraju5628 Dec 29, 2023
f00884e
Update node.js.yml
mnagaraju5628 Dec 29, 2023
59d5cd9
Update node.js.yml
mnagaraju5628 Dec 29, 2023
24d709c
Update node.js.yml
mnagaraju5628 Dec 29, 2023
348082f
Update node.js.yml
mnagaraju5628 Dec 29, 2023
269148c
Update node.js.yml
mnagaraju5628 Dec 29, 2023
add794c
Update node.js.yml
mnagaraju5628 Dec 29, 2023
7b72be3
Update index.js
mnagaraju5628 Jan 4, 2024
4412aed
Update index.js
mnagaraju5628 Jan 4, 2024
930a3c4
Merge pull request #1 from mnagaraju5628/innodata-test-patch
mnagaraju5628 Jan 4, 2024
d0dd9b5
updated tagname
mnagaraju5628 Jan 4, 2024
0c4023e
Update node.js.yml
mnagaraju5628 Jan 4, 2024
9a69aba
Merge pull request #2 from mnagaraju5628/innodata-test-patch1
mnagaraju5628 Jan 4, 2024
05f1550
Update node.js.yml
mnagaraju5628 Jan 4, 2024
25eb579
Update dockerfile
mnagaraju5628 Jan 4, 2024
1d81893
Update deploymentservice.yml
mnagaraju5628 Jan 4, 2024
31e4b3b
Update node.js.yml
mnagaraju5628 Jan 4, 2024
ceaf92b
Merge pull request #3 from mnagaraju5628/innodata-testgcp-patch1-1
mnagaraju5628 Jan 4, 2024
b2f7947
Update deploymentservice.yml
mnagaraju5628 Jan 4, 2024
61e5179
Update node.js.yml
mnagaraju5628 Jan 4, 2024
1035d5b
Update node.js.yml
mnagaraju5628 Jan 4, 2024
43fbd9a
Update index.js
mnagaraju5628 Jan 4, 2024
77b7161
Update node.js.yml
mnagaraju5628 Jan 4, 2024
880e866
Update and rename deploymentservice.yml to deployment.yaml
mnagaraju5628 Jan 4, 2024
8a9cf53
Create service.yaml
mnagaraju5628 Jan 4, 2024
a904b79
Update node.js.yml
mnagaraju5628 Jan 4, 2024
a472713
Update node.js.yml
mnagaraju5628 Jan 4, 2024
a313414
Update node.js.yml
mnagaraju5628 Jan 4, 2024
bcf99b3
Update service.yaml
mnagaraju5628 Jan 4, 2024
f9c268d
Update service.yaml
mnagaraju5628 Jan 4, 2024
ae22ab1
Update index.js
mnagaraju5628 Jan 4, 2024
083e5e2
Update node.js.yml
mnagaraju5628 Jan 4, 2024
14594b0
Update index.js
mnagaraju5628 Jan 4, 2024
5d2fbf5
Merge pull request #4 from mnagaraju5628/innodata-testpatch1
mnagaraju5628 Jan 4, 2024
85e265a
Update index.js
mnagaraju5628 Jan 4, 2024
b6315c1
Merge pull request #5 from mnagaraju5628/inno-testpatch2
mnagaraju5628 Jan 4, 2024
4286462
Update index.js
mnagaraju5628 Jan 4, 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.

58 changes: 58 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

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

jobs:
deploy:

runs-on: self-hosted

strategy:
matrix:
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm install

- name: install the gcloud cli
uses: google-github-actions/setup-gcloud@v0.2.0
with:
project_id: ${{ secrets.GOOGLE_PROJECT }}
service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
install_components: 'gke-gcloud-auth-plugin'
export_default_credentials: true

- name: build and push the docker image
env:
GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }}
run: |
gcloud auth configure-docker us-central1-docker.pkg.dev
docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest .
docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest
- name: deploy to gke
env:
GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }}
run: |
gcloud container clusters get-credentials test-cluster --region asia-south1-c
sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deployment.yaml
sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" service.yaml
kubectl delete -f deployment.yaml
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Node.js Application
2 changes: 1 addition & 1 deletion deployment.yml → deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ spec:
spec:
containers:
- name: nodeserver
image: thetips4you/nodeapp:latest
image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest
ports:
- containerPort: 3000
38 changes: 0 additions & 38 deletions deploymentservice.yml

This file was deleted.

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 Inno-demoproject " }');
});

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);
});
});
});