refactor: 优化

This commit is contained in:
xiaojunnuo
2020-12-22 22:47:07 +08:00
parent af0875ac4c
commit 49b96592a0
17 changed files with 45 additions and 2125 deletions

View File

@@ -33,6 +33,15 @@ export class Executor {
}
async run (options, args) {
try {
return this.doRun(options, args)
} catch (e) {
logger.error('任务执行出错:', e)
throw e
}
}
async doRun (options, args) {
if (args != null) {
_.merge(options.args, args)
}

View File

@@ -40,6 +40,7 @@ const defaultOptions = {
deploy: [
{
name: '流程1-部署到阿里云系列产品',
disabled: true,
tasks: [
{
name: '上传证书到云',
@@ -79,6 +80,7 @@ const defaultOptions = {
},
{
deployName: '流程3-触发jenkins任务',
disabled: true,
tasks: [
{
name: '触发jenkins任务',