Jenkins 描述 setter 不工作
Jenkins description setter is not working
我是詹金斯的新手。我开始使用这个名为“Description-setter”
的插件
https://plugins.jenkins.io/description-setter
基本上,我想在构建完成后在描述中设置构建ID。
我安装了插件 -> Post-build actions -> 我添加了如下插件:
正则表达式在我解析构建 console.logs 时有效,如下所示:
const str = `angularjs@1_4_7-ie8 found in path(s):
public/components/angularjs-ie8-build/dist/angular.min.js
[INFO] Registered manifest into CMPaaS:
https://deploy-apixyz.com/swdeploy/v2/manifests/demonodeserver/versions/1.0.0_20180628165604811
Your build metrics have been recorded with id
demonodeserver-06-29T00:07:42.845Z and manifest_id
demonodeserver-1.0.0_20180628165604811`;
const regex = /demonodeserver-(\d\.?){3}_\w+/gm;
const match = str.match(regex);
console.log(match);
问题:
正当我认为一切正常时,构建完成后我看到以下错误:
Successfully completed the CI Build
[description-setter] Could not determine description.
Finished: SUCCESS
我不确定为什么它无法确定描述。我想我错过了什么,有人可以启发我吗?
Regexp 字段没想到真正的 Regexp 已经在插件中用“/”屏蔽了。所以我希望正确的输入应该是这样的:
demonodeserver-(\d\.?){3}_\w+
下一步,当留空时,描述字段仅填充第一组。
所以我最好在描述中包含第一组:
Build ID:
然而,第一组将是第一个带点的数字。所以正则表达式应该在 id 周围使用另一个组:
demonodeserver-((\d\.?){3})_\w+
无法重新测试,因为不在工作,但当我回到办公桌后会这样做。
我是詹金斯的新手。我开始使用这个名为“Description-setter”
的插件https://plugins.jenkins.io/description-setter
基本上,我想在构建完成后在描述中设置构建ID。
我安装了插件 -> Post-build actions -> 我添加了如下插件:
正则表达式在我解析构建 console.logs 时有效,如下所示:
const str = `angularjs@1_4_7-ie8 found in path(s):
public/components/angularjs-ie8-build/dist/angular.min.js
[INFO] Registered manifest into CMPaaS:
https://deploy-apixyz.com/swdeploy/v2/manifests/demonodeserver/versions/1.0.0_20180628165604811
Your build metrics have been recorded with id
demonodeserver-06-29T00:07:42.845Z and manifest_id
demonodeserver-1.0.0_20180628165604811`;
const regex = /demonodeserver-(\d\.?){3}_\w+/gm;
const match = str.match(regex);
console.log(match);
问题: 正当我认为一切正常时,构建完成后我看到以下错误:
Successfully completed the CI Build
[description-setter] Could not determine description.
Finished: SUCCESS
我不确定为什么它无法确定描述。我想我错过了什么,有人可以启发我吗?
Regexp 字段没想到真正的 Regexp 已经在插件中用“/”屏蔽了。所以我希望正确的输入应该是这样的:
demonodeserver-(\d\.?){3}_\w+
下一步,当留空时,描述字段仅填充第一组。
所以我最好在描述中包含第一组:
Build ID:
然而,第一组将是第一个带点的数字。所以正则表达式应该在 id 周围使用另一个组:
demonodeserver-((\d\.?){3})_\w+
无法重新测试,因为不在工作,但当我回到办公桌后会这样做。