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

PR #26

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
48 changes: 48 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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

jobs:
build:
runs-on: ubuntu-20

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '15.2.1'

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

deploy:
runs-on: ubuntu-20
needs: build

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '15.2.1'

- name: Deploy to production
run: |
npm install
# Add any deployment steps you need
# For example, restart your Node.js app
pm2 restart app.js
9 changes: 7 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
email=devopstrainingblr@gmail.com
email=yashaswinivv@gmail.com
#always-auth=true
#<<<<<<< master
#_auth=YWRtaW46cGFzc3dvcmQ=
#registry.npmjs.org/:_auth=YWRtaW46cGFzc3dvcmQ
#=======
#_auth=YYWRtaW46ZGV2b3Bz
registry.npmjs.org/:_auth=bWl0aHVudGVjaG5vbG9naWVzOmRldm9wcw==
#registry.npmjs.org/:_auth=bWl0aHVudGVjaG5vbG9naWVzOmRldm9wcw==
#>>>>>>> master
allowRepublish=true
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"description": "This Project explains all Node JS examples",
"main": "app.js",
"publishConfig": {
"registry": "http://13.201.133.218:9980/mithuntechnologies/repository/mssnodejsrepo/"
#<<<<<<< master
# "registry": "http://13.232.145.86:9036/nexus/repository/mss-nodejs-repo/"
#=======
#"registry": "http://13.201.133.218:9980/mithuntechnologies/repository/mssnodejsrepo/"
#>>>>>>> master
},

"scripts": {
Expand Down
14 changes: 12 additions & 2 deletions sonar-project.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
const sonarqubeScanner = require('sonarqube-scanner');

sonarqubeScanner({
serverUrl: 'http://15.206.148.60:9000/',
#<<<<<<< master
# serverUrl: 'http://65.2.83.58:9000/',
#=======
# serverUrl: 'http://15.206.148.60:9000/',
#>>>>>>> master
options : {
'sonar.projectDescription': 'This is a Node JS application',
'sonar.projectName': 'Node JS Application - Sample',
'sonar.projectKey':'NodeJsMithunTechnologies',
'sonar.login': 'squ_142ce4d94e9ac7da1944264298805e114a858d89',
#<<<<<<< master
// 'sonar.login': 'squ_dd9c695804fe2d2f68846dc0fe99b20f7d906d88',
'sonar.login': 'admin',
'sonar.password': 'password',
#=======
# 'sonar.login': 'squ_142ce4d94e9ac7da1944264298805e114a858d89',
//'sonar.login': 'admin',
//'sonar.password': 'admin',
#>>>>>>> master
'sonar.projectVersion':'1.0',
'sonar.language':'js',
'sonar.sourceEncoding':'UTF-8',
Expand Down