mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 15:49:10 +00:00
Update
This commit is contained in:
parent
4e3037889e
commit
6276619425
@ -7,7 +7,6 @@
|
||||
# Define stages
|
||||
stages:
|
||||
- BuildAndTest
|
||||
- Publish
|
||||
- E2E
|
||||
- DeployStaging
|
||||
- DeployProduction
|
||||
@ -188,18 +187,6 @@ build_n_test_server-monitor:
|
||||
script:
|
||||
- echo "No test implemented"
|
||||
|
||||
## PUBLISH STAGE - SERVER MONITOR
|
||||
publish_server-monitor:
|
||||
stage: Publish
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- sudo apt-get install nodejs -y
|
||||
- cd server-monitor
|
||||
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
|
||||
- npm publish
|
||||
- cd ..
|
||||
|
||||
##E2E Stage.
|
||||
e2e_test:
|
||||
stage: E2E
|
||||
@ -601,6 +588,38 @@ deploy_production_dashboard:
|
||||
environment:
|
||||
name: production
|
||||
|
||||
## DEPLOYMENT STAGE - Server Monitor
|
||||
deploy_staging_server-monitor:
|
||||
stage: DeployStaging
|
||||
script:
|
||||
- sudo apt-get install nodejs -y
|
||||
- cd server-monitor
|
||||
- sudo npm install -g json
|
||||
- json -I -f package.json -e 'this.name="fyipe-server-monitor-staging"'
|
||||
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
|
||||
- npm publish
|
||||
- cd ..
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
- hotfix-master
|
||||
environment:
|
||||
name: staging
|
||||
|
||||
deploy_production_server-monitor:
|
||||
stage: DeployProduction
|
||||
script:
|
||||
- sudo apt-get install nodejs -y
|
||||
- cd server-monitor
|
||||
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
|
||||
- npm publish
|
||||
- cd ..
|
||||
only:
|
||||
refs:
|
||||
-release
|
||||
environment:
|
||||
name: production
|
||||
|
||||
## SMOKE TEST STAGE
|
||||
smoke_test_production:
|
||||
stage: SmokeTest
|
||||
|
4
server-monitor/.gitignore
vendored
4
server-monitor/.gitignore
vendored
@ -1 +1,3 @@
|
||||
node_modules/
|
||||
node_modules/
|
||||
|
||||
.env
|
7
server-monitor/index.js → server-monitor/bin/server-monitor.js
Executable file → Normal file
7
server-monitor/index.js → server-monitor/bin/server-monitor.js
Executable file → Normal file
@ -95,4 +95,9 @@ function getParamValue(params, name) {
|
||||
resolve(program[name]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
checkParams,
|
||||
getParamValue
|
||||
};
|
@ -2,6 +2,6 @@
|
||||
// connect to a route at the backend to validate api and projectId
|
||||
// update serverStat model based on the projectId
|
||||
|
||||
const apiUrl = 'http://localhost:3002';
|
||||
const apiUrl = process.env.API_URL || 'http://localhost:3002';
|
||||
|
||||
module.exports = { apiUrl };
|
||||
|
1369
server-monitor/package-lock.json
generated
1369
server-monitor/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,32 +1,26 @@
|
||||
{
|
||||
"name": "fyipe-server-monitor",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.7",
|
||||
"description": "A fyipe shell package that monitor's server resources - disk, memory and CPU percentage - used.",
|
||||
"main": "index.js",
|
||||
"main": "./lib/monitor.js",
|
||||
"bin": {
|
||||
"fyipe-server-monitor": "index.js"
|
||||
"fyipe-server-monitor": "./bin/server-monitor.js"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node ./bin/server-monitor.js",
|
||||
"dev": "NODE_ENV=development nodemon ./bin/server-monitor.js",
|
||||
"pretest": "eslint --fix --ignore-path .gitignore .",
|
||||
"start": "node index.js",
|
||||
"dev": "NODE_ENV=development nodemon index.js",
|
||||
"test": "NODE_ENV=development mocha --exit",
|
||||
"audit": "npm-audit-ci-wrapper --threshold=high",
|
||||
"lint": "eslint .",
|
||||
"postversion": "git push --follow-tags"
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"author": "HackerBay, Inc.",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"axios": "^0.18.1",
|
||||
"commander": "^2.19.0",
|
||||
"cron": "^1.6.0",
|
||||
"eslint": "^5.10.0",
|
||||
"inquirer": "^6.2.1",
|
||||
"node-cron": "^2.0.3",
|
||||
"npm-audit-ci-wrapper": "^2.3.0",
|
||||
"os-utils": "0.0.14",
|
||||
"q": "^1.5.1",
|
||||
"commander": "^2.20.0",
|
||||
"cron": "^1.7.2",
|
||||
"inquirer": "^6.5.2",
|
||||
"systeminformation": "^4.14.8"
|
||||
},
|
||||
"keywords": [
|
||||
@ -34,5 +28,15 @@
|
||||
"server",
|
||||
"server monitor",
|
||||
"server stats"
|
||||
]
|
||||
],
|
||||
"devDependencies": {
|
||||
"chai": "^4.2.0",
|
||||
"eslint": "^5.16.0",
|
||||
"mocha": "^6.2.0",
|
||||
"npm-audit-ci-wrapper": "^2.3.0"
|
||||
},
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "test"
|
||||
}
|
||||
}
|
||||
|
0
server-monitor/test/index.js
Normal file
0
server-monitor/test/index.js
Normal file
Loading…
Reference in New Issue
Block a user