diff --git a/routes/index.js b/routes/index.js index acf8c62..7617373 100644 --- a/routes/index.js +++ b/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()); });