master
pan 4 years ago
parent 847ad1822d
commit 5e6b746ad7
  1. 8
      routes/index.js

@ -23,14 +23,14 @@ function error(message){
//web钩子事件
//git@gogs.kirito.cool:panqihua/RiskCloudMock.git push事件
router.post('/server', function(req, res, next) {
router.post('/deploy', function(req, res, next) {
const updated_at=req.body.repository.updated_at
info('调用自动部署命令')
const name=req.body.repository.name
info(`开始自动部署${name}`)
const promise = new Promise((resolve, reject) => {
const spawnObj = spawn('updateRisk', ['RiskCloudMock'], {encoding: 'utf-8'});
const spawnObj = spawn('updateRisk', [name], {encoding: 'utf-8'});
spawnObj.stdout.on('data', function(chunk) {
info(chunk.toString());
});

Loading…
Cancel
Save