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

test #17

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

test #17

Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI/CD Pipeline

# Trigger the workflow on push and pull request events
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

deploy:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

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

- name: Deploy to Production
run: |
# Add your deployment script/commands here
echo "Deploying to production..."
# Example:
# npm run deploy
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,5 @@ In package.json add below entry,

npm login --registry=NexusRepoURL

Execute below command to upload packages to nexus repo.

npm publish


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "This Project explains all Node JS examples",
"main": "app.js",
"publishConfig": {
"registry": "http://3.236.129.45:8081/repository/ebay-npm-repo/"
"registry": "http://34.238.125.146:8081/repository/ebay-npm/"
},
"scripts": {
"server": "http-server -c-1 -p 9999",
Expand Down
4 changes: 2 additions & 2 deletions sonar-project.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const sonarqubeScanner = require('sonarqube-scanner');

sonarqubeScanner({
serverUrl: 'http://3.236.129.45:9000/',
serverUrl: 'http://54.161.163.175:9000/',
options : {
'sonar.projectDescription': 'This is a Node JS application',
'sonar.projectName': 'Node JS Application - Sample',
'sonar.projectKey':'NodeJsLandmarkTechnologies',
'sonar.login': '3e9ee4f64a40359b3f9c904bc34392412e2c9d80',
'sonar.login': 'ef43528407d3494ed8beb4cd6283695552e2c349',
//'sonar.password': 'admin',
'sonar.projectVersion':'1.0',
'sonar.language':'js',
Expand Down