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

Dev #17

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

Dev #17

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e30072a
adding ci
Aug 23, 2022
9aa0767
adding ci
Aug 23, 2022
3f337b8
adding ci
Aug 23, 2022
ec0e0ce
adding ci
Aug 24, 2022
791429f
adding nodejs-app
Aug 24, 2022
6345bf8
updating the ci.yaml file
Aug 24, 2022
abafaeb
updating the ci.yaml file
Aug 24, 2022
f1f1824
updating the build file for continuous integration
Aug 24, 2022
d76b842
updating the build file for continuous integration
Aug 24, 2022
a87e72a
updating the build file for continuous integration
Aug 24, 2022
7958ab6
updating the build file for continuous integration
Aug 24, 2022
da91c56
adding the jenkinsfile
Aug 24, 2022
c6a0cee
adding the jenkinsfile
Aug 24, 2022
6ed70fc
adding the jenkinsfile
Aug 24, 2022
8c6b7ce
adding the jenkinsfile
Aug 24, 2022
dfb50e7
adding the jenkinsfile
Aug 24, 2022
c21cb7a
adding the jenkinsfile
Aug 24, 2022
e8381c4
adding the jenkinsfile
Aug 24, 2022
fef8d8c
adding the jenkinsfile
Aug 24, 2022
7d90903
adding the jenkinsfile
Aug 24, 2022
60ba170
adding the jenkinsfile
Aug 24, 2022
f4ad854
adding the jenkinsfile
Aug 24, 2022
0ed64f0
adding the jenkinsfile
Aug 24, 2022
183f128
adding the jenkinsfile
Aug 24, 2022
f2526d0
adding the jenkinsfile
Aug 24, 2022
bf1792b
adding the jenkinsfile
Aug 24, 2022
9a2751c
adding the jenkinsfile
Aug 24, 2022
f4c2f57
adding the jenkinsfile
Aug 24, 2022
17720df
updating the jenkinsfile
QNNAKWUE Aug 25, 2022
c67eb76
updated jenkins
QNNAKWUE Aug 25, 2022
186f75b
Merge pull request #1 from QNNAKWUE/dev
QNNAKWUE Aug 25, 2022
dcd5f24
merged master
QNNAKWUE Aug 25, 2022
83abf01
merged master
QNNAKWUE Aug 25, 2022
24c9810
merged master
QNNAKWUE Aug 25, 2022
c90fc67
merged master
QNNAKWUE Aug 25, 2022
ce53392
merged master
QNNAKWUE Aug 25, 2022
f02b5ac
merged master
QNNAKWUE Aug 25, 2022
418ee2e
merged master
QNNAKWUE Aug 25, 2022
2f820a9
merged master
QNNAKWUE Aug 25, 2022
7bf849a
merged master
QNNAKWUE Aug 25, 2022
12da3ec
merged master
QNNAKWUE Aug 25, 2022
5f719b8
merged master
QNNAKWUE Aug 25, 2022
21cd532
merged master
QNNAKWUE Aug 25, 2022
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
Binary file modified .DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:10
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
ENV APP_PORT 8080
EXPOSE 8080
CMD [ "node", "app.js" ]
48 changes: 48 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
pipeline {
agent any

tools {
nodejs '18.8.0'
}

stages {

stage('Fetch Code') {
steps {
git branch: 'master', url: 'https://github.com/QNNAKWUE/Ecommerce-Nodejs.git'
}
}

stage('Install dependencies') {
steps {
echo 'Installing dependencies...'
sh 'rm -rf node_modules package-lock.json && npm install'
}
}
stage('Build') {
steps {
sh 'npm build'
}
}
stage ('Static Analysis') {
steps {
sh ' ./node_modules/eslint/bin/eslint.js -f checkstyle src > eslint.xml'
}
post {
always {
recordIssues enabledForFailure: true, aggregatingResults: true, tool: checkStyle(pattern: 'eslint.xml')
}
}
}
}

}

// # Path parameters
// export metric_id="n.name"

// curl -X DELETE "https://api.datadoghq.com/api/v2/logs/config/metrics/${n.name}" \
// -H "Accept: application/json" \
// -H "DD-API-KEY: ${DD_API_KEY}" \
// -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

2 changes: 1 addition & 1 deletion seed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var products =
quantity: 10,
department: 'Women',
category: 'Basics',
date: 1581397200000
date: 15813972000
}),
new Product({
_id: "5bedf3b9c14d7822b39d9d45",
Expand Down