From c335d97a3ff1f663efb1bedf05080815713bfa4b Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 15 Jan 2025 11:40:11 +0800 Subject: [PATCH] =?UTF-8?q?feat(devops):=20=E4=B8=BA=20web=20=E5=92=8C=20w?= =?UTF-8?q?xwork=20=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=89=93=E5=8C=85=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=B7=BB=E5=8A=A0=20webhook=20=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在打包信息中增加了 webhook 字段 - 更新了构建配置参数,将 webhook 传递给 Jenkins 构建任务 --- src/websocket/custom/getZip.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/websocket/custom/getZip.js b/src/websocket/custom/getZip.js index b611851..112eb23 100644 --- a/src/websocket/custom/getZip.js +++ b/src/websocket/custom/getZip.js @@ -61,7 +61,7 @@ const handleZip = (id, ws) => { const {signal} = controller; const progress = new counter(`正在处理 ${info.name} 的打包工作...`) if (['web','wxwork'].includes(info.type)) { - const {name, version, dist} = info + const {name, version, dist,webhook} = info const deploy = dist?.trim() || `${name}v${version}` const buildConfig = { web: {task: "devops-web", token: 'fLeOGSVIRs405Me'}, @@ -72,7 +72,7 @@ const handleZip = (id, ws) => { .then(() => progress.set(30, id)) .then(() => fse.emptyDir(dist || `../zips/${deploy}`)) .then(() => http.get(`/view/devops/job/${buildConfig.task}/api/json`).then(res => currentJob = (res.data?.nextBuildNumber || 1))) - .then(() => http.get(`/view/devops/job/${buildConfig.task}/buildWithParameters`, {params: {token: buildConfig.token, pid: id, dist: deploy}})) + .then(() => http.get(`/view/devops/job/${buildConfig.task}/buildWithParameters`, {params: {token: buildConfig.token, pid: id, dist: deploy,webhook}})) .then(() => new Promise((resolve, reject) => { jobs[id] = {task: buildConfig.task, build: currentJob} const timer = setInterval(() => {