{"id":98669,"date":"2026-09-01T09:25:13","date_gmt":"2026-09-01T01:25:13","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/98669.html"},"modified":"2026-09-01T09:25:13","modified_gmt":"2026-09-01T01:25:13","slug":"%e4%ba%8c%ef%bc%9a%e4%bb%8e%e9%9b%b6%e4%b8%8a%e6%89%8b-jenkins-%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%ef%bc%9a%e5%81%9a%e4%b8%80%e4%b8%aa%e5%8f%af%e5%a4%8d%e7%94%a8-pipeline-%e8%87%aa%e5%ae%9a%e4%b9%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/98669.html","title":{"rendered":"\u4e8c\uff1a\u4ece\u96f6\u4e0a\u624b Jenkins \u63d2\u4ef6\u5f00\u53d1\uff1a\u505a\u4e00\u4e2a\u53ef\u590d\u7528 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6"},"content":{"rendered":"<p>\u6700\u8fd1\u770b\u4e86 ai-agent-plugin \u7684\u6e90\u7801&#xff0c;\u60f3\u81ea\u5df1\u5b9e\u73b0\u4e00\u4e2a\u53ef\u590d\u7528\u7684 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6\u3002<\/p>\n<p>\u81ea\u5b9a\u4e49\u6b65\u9aa4\u7684\u5165\u53e3\u662f\u4e0b\u9762\u8fd9\u4e2a perform \u65b9\u6cd5\u3002\u672c\u7bc7\u627f\u63a5\u4e0a\u4e00\u7bc7&#xff0c;\u8bf4\u660e TaskListener \u548c Launcher \u7684\u7528\u6cd5&#xff0c;\u4ee5\u53ca Action \u7684\u4f5c\u7528\u3002<\/p>\n<p><span class=\"token annotation punctuation\">&#064;Override<\/span><br \/>\n<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token function\">perform<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">Run<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token operator\">?<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token operator\">?<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> run<span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">FilePath<\/span> workspace<span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">EnvVars<\/span> env<span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">Launcher<\/span> launcher<span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">TaskListener<\/span> listener<span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">throws<\/span> <span class=\"token class-name\">InterruptedException<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">IOException<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u5728\u8fd9\u91cc\u5b9e\u73b0\u6b65\u9aa4\u903b\u8f91<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h3>TaskListener \u7684\u7528\u6cd5<\/h3>\n<p>listener \u4e3b\u8981\u7528\u4e8e\u6253\u5370\u65e5\u5fd7&#xff1a;\u5148\u901a\u8fc7 getLogger() \u62ff\u5230\u65e5\u5fd7\u5bf9\u8c61&#xff0c;\u518d\u628a\u60f3\u8981\u8f93\u51fa\u7684\u5185\u5bb9\u5199\u5165\u6784\u5efa\u63a7\u5236\u53f0\u3002<\/p>\n<p>\u5982\u4e0b\u9762\u4e24\u5f20\u56fe\u6240\u793a&#xff0c;\u4ee3\u7801\u4e2d\u53ea\u6709\u7528 listener.getLogger().println() \u6253\u5370\u7684\u5185\u5bb9\u624d\u4f1a\u51fa\u73b0\u5728\u63a7\u5236\u53f0&#xff0c;\u4f5c\u7528\u7c7b\u4f3c Pipeline \u91cc\u7684 echo&#xff1a;<\/p>\n<p>listener<span class=\"token punctuation\">.<\/span><span class=\"token function\">getLogger<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;start say Action&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260901012510-6a962976ec20f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>Launcher \u7684\u7528\u6cd5<\/h3>\n<p>launcher \u7528\u4e8e\u5728 node \u7aef\u542f\u52a8\u8fdb\u7a0b\u3001\u6267\u884c\u4efb\u52a1\u3002\u5b83\u662f\u8282\u70b9\u611f\u77e5\u7684&#xff1a;\u4f1a\u81ea\u52a8\u628a\u5de5\u4f5c\u76ee\u5f55\u3001\u73af\u5883\u53d8\u91cf\u7b49\u8bbe\u7f6e\u5230\u6b63\u786e\u7684\u6784\u5efa\u8282\u70b9\u4e0a\u3002<\/p>\n<p>\u5982\u679c\u4e0d\u4f7f\u7528 Launcher&#xff0c;\u800c\u662f\u76f4\u63a5\u8c03\u7528 ProcessBuilder \u6216 Runtime.exec()&#xff0c;\u8fdb\u7a0b\u53ea\u4f1a\u5728\u5f53\u524d JVM \u6240\u5728\u7684\u673a\u5668\u4e0a\u8fd0\u884c&#xff0c;\u4e14\u73af\u5883\u53d8\u91cf\u3001\u5de5\u4f5c\u76ee\u5f55\u90fd\u4e0d\u53d7 Jenkins \u7ba1\u63a7&#xff0c;\u5bb9\u6613\u51fa\u73b0 sh \u627e\u4e0d\u5230\u3001\u76ee\u5f55\u4e0d\u5b58\u5728\u7b49\u95ee\u9898\u3002<br \/>\n\u5982\u4e0b\u4ee3\u7801\u7684\u6267\u884c\u7ed3\u679c\u5982\u4e0b\u56fe<\/p>\n<p> <span class=\"token comment\">\/\/ \u65b9\u5f0f\u4e00&#xff1a;Launcher \u542f\u52a8\u8fdb\u7a0b\u6267\u884c\u547d\u4ee4&#xff08;\u7b49\u4ef7\u4e8e shell: echo &#039;hello-from-command&#039;&#xff09;<\/span><br \/>\n        <span class=\"token keyword\">int<\/span> launchExitCode <span class=\"token operator\">&#061;<\/span> launcher<span class=\"token punctuation\">.<\/span><span class=\"token function\">launch<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">cmds<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;pwd&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">envs<\/span><span class=\"token punctuation\">(<\/span>env<span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">stdout<\/span><span class=\"token punctuation\">(<\/span>listener<span class=\"token punctuation\">.<\/span><span class=\"token function\">getLogger<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">stderr<\/span><span class=\"token punctuation\">(<\/span>listener<span class=\"token punctuation\">.<\/span><span class=\"token function\">getLogger<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">pwd<\/span><span class=\"token punctuation\">(<\/span>workspace<span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">join<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        listener<span class=\"token punctuation\">.<\/span><span class=\"token function\">getLogger<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;[launcher] exitCode&#061;&#034;<\/span> <span class=\"token operator\">&#043;<\/span> launchExitCode<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        listener<span class=\"token punctuation\">.<\/span><span class=\"token function\">getLogger<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;[demo-plugin] &#034;<\/span> <span class=\"token operator\">&#043;<\/span> message<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ \u65b9\u5f0f\u4e8c&#xff1a;\u76f4\u63a5\u6267\u884c\u547d\u4ee4&#xff08;ProcessBuilder&#xff0c;\u4e0d\u7ecf\u8fc7 Launcher&#xff09;&#xff0c;\u7528\u4e8e\u5bf9\u6bd4<\/span><br \/>\n        <span class=\"token class-name\">Process<\/span> process <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">ProcessBuilder<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/bin\/sh&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;-c&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;pwd&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">directory<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">new<\/span> <span class=\"token class-name\">File<\/span><span class=\"token punctuation\">(<\/span>workspace<span class=\"token punctuation\">.<\/span><span class=\"token function\">getRemote<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">start<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">int<\/span> directExitCode <span class=\"token operator\">&#061;<\/span> process<span class=\"token punctuation\">.<\/span><span class=\"token function\">waitFor<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token class-name\">String<\/span> directOut <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">String<\/span><span class=\"token punctuation\">(<\/span>process<span class=\"token punctuation\">.<\/span><span class=\"token function\">getInputStream<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">readAllBytes<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">StandardCharsets<\/span><span class=\"token punctuation\">.<\/span><span class=\"token constant\">UTF_8<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token class-name\">String<\/span> directErr <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">String<\/span><span class=\"token punctuation\">(<\/span>process<span class=\"token punctuation\">.<\/span><span class=\"token function\">getErrorStream<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">readAllBytes<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">StandardCharsets<\/span><span class=\"token punctuation\">.<\/span><span class=\"token constant\">UTF_8<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        listener<span class=\"token punctuation\">.<\/span><span class=\"token function\">getLogger<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;[direct] exitCode&#061;&#034;<\/span> <span class=\"token operator\">&#043;<\/span> directExitCode<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        listener<span class=\"token punctuation\">.<\/span><span class=\"token function\">getLogger<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>directOut<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260901012511-6a9629775d985.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>Action \u7684\u4f5c\u7528\u57df<\/h3>\n<p>Action \u7684\u4f5c\u7528\u57df\u662f\u6574\u4e2a Pipeline&#xff1a;\u540c\u4e00\u6b21 Pipeline \u91cc\u591a\u6b21\u8c03\u7528\u81ea\u5b9a\u4e49\u6b65\u9aa4\u65f6&#xff0c;\u53ef\u4ee5\u5171\u4eab\u540c\u4e00\u4e2a Action \u5bf9\u8c61&#xff0c;\u8ba9\u6267\u884c\u7ed3\u679c\u91cc\u663e\u793a\u300c\u4e00\u4e2a\u5bf9\u8c61\u7684\u591a\u6b21\u6267\u884c\u8bb0\u5f55\u300d&#xff0c;\u800c\u4e0d\u662f\u300c\u591a\u4e2a\u5bf9\u8c61\u5404\u81ea\u7684\u8bb0\u5f55\u300d\u3002<\/p>\n<p><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">static<\/span> <span class=\"token class-name\">SayAction<\/span> <span class=\"token function\">getOrCreate<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">Run<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token operator\">?<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token operator\">?<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> run<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token class-name\">SayAction<\/span> existing <span class=\"token operator\">&#061;<\/span> run<span class=\"token punctuation\">.<\/span><span class=\"token function\">getAction<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">SayAction<\/span><span class=\"token punctuation\">.<\/span><span class=\"token keyword\">class<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>existing <span class=\"token operator\">!&#061;<\/span> <span class=\"token keyword\">null<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token class-name\">System<\/span><span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Existing action found: &#034;<\/span> <span class=\"token operator\">&#043;<\/span> existing<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> existing<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token class-name\">System<\/span><span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Creating new action for run: &#034;<\/span> <span class=\"token operator\">&#043;<\/span> run<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token class-name\">SayAction<\/span> created <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">SayAction<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    run<span class=\"token punctuation\">.<\/span><span class=\"token function\">addAction<\/span><span class=\"token punctuation\">(<\/span>created<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    created<span class=\"token punctuation\">.<\/span><span class=\"token function\">onAttached<\/span><span class=\"token punctuation\">(<\/span>run<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> created<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5982\u4e0b\u56fe\u5bf9\u6bd4\u4e24\u6b21build\u7684\u6784\u5efa\u7ed3\u679c\u6700\u76f4\u63a5\u4e86<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260901012511-6a962977e6f56.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260901012512-6a9629782e4eb.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u770b\u4e86 ai-agent-plugin \u7684\u6e90\u7801&#xff0c;\u60f3\u81ea\u5df1\u5b9e\u73b0\u4e00\u4e2a\u53ef\u590d\u7528\u7684 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6\u3002<br \/>\n\u81ea\u5b9a\u4e49\u6b65\u9aa4\u7684\u5165\u53e3\u662f\u4e0b\u9762\u8fd9\u4e2a perform \u65b9\u6cd5\u3002\u672c\u7bc7\u627f\u63a5\u4e0a\u4e00\u7bc7&#xff0c;\u8bf4\u660e TaskListener \u548c Launcher \u7684\u7528\u6cd5&#xff0c;\u4ee5\u53ca Action \u7684\u4f5c\u7528\u3002<br \/>\nOverride<br \/>\npublic void perform(Run run, FilePath workspace, EnvVars env, Launcher<\/p>\n","protected":false},"author":2,"featured_media":98665,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,392,1133],"topic":[],"class_list":["post-98669","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-java","tag-jenkins","tag-servlet"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4e8c\uff1a\u4ece\u96f6\u4e0a\u624b Jenkins \u63d2\u4ef6\u5f00\u53d1\uff1a\u505a\u4e00\u4e2a\u53ef\u590d\u7528 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/98669.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4e8c\uff1a\u4ece\u96f6\u4e0a\u624b Jenkins \u63d2\u4ef6\u5f00\u53d1\uff1a\u505a\u4e00\u4e2a\u53ef\u590d\u7528 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6700\u8fd1\u770b\u4e86 ai-agent-plugin \u7684\u6e90\u7801&#xff0c;\u60f3\u81ea\u5df1\u5b9e\u73b0\u4e00\u4e2a\u53ef\u590d\u7528\u7684 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6\u3002 \u81ea\u5b9a\u4e49\u6b65\u9aa4\u7684\u5165\u53e3\u662f\u4e0b\u9762\u8fd9\u4e2a perform \u65b9\u6cd5\u3002\u672c\u7bc7\u627f\u63a5\u4e0a\u4e00\u7bc7&#xff0c;\u8bf4\u660e TaskListener \u548c Launcher \u7684\u7528\u6cd5&#xff0c;\u4ee5\u53ca Action \u7684\u4f5c\u7528\u3002 Override public void perform(Run run, FilePath workspace, EnvVars env, Launcher\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/98669.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-01T01:25:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260901012510-6a962976ec20f.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/98669.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/98669.html\",\"name\":\"\u4e8c\uff1a\u4ece\u96f6\u4e0a\u624b Jenkins \u63d2\u4ef6\u5f00\u53d1\uff1a\u505a\u4e00\u4e2a\u53ef\u590d\u7528 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-01T01:25:13+00:00\",\"dateModified\":\"2026-09-01T01:25:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/98669.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/98669.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/98669.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4e8c\uff1a\u4ece\u96f6\u4e0a\u624b Jenkins \u63d2\u4ef6\u5f00\u53d1\uff1a\u505a\u4e00\u4e2a\u53ef\u590d\u7528 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4e8c\uff1a\u4ece\u96f6\u4e0a\u624b Jenkins \u63d2\u4ef6\u5f00\u53d1\uff1a\u505a\u4e00\u4e2a\u53ef\u590d\u7528 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/98669.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4e8c\uff1a\u4ece\u96f6\u4e0a\u624b Jenkins \u63d2\u4ef6\u5f00\u53d1\uff1a\u505a\u4e00\u4e2a\u53ef\u590d\u7528 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6700\u8fd1\u770b\u4e86 ai-agent-plugin \u7684\u6e90\u7801&#xff0c;\u60f3\u81ea\u5df1\u5b9e\u73b0\u4e00\u4e2a\u53ef\u590d\u7528\u7684 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6\u3002 \u81ea\u5b9a\u4e49\u6b65\u9aa4\u7684\u5165\u53e3\u662f\u4e0b\u9762\u8fd9\u4e2a perform \u65b9\u6cd5\u3002\u672c\u7bc7\u627f\u63a5\u4e0a\u4e00\u7bc7&#xff0c;\u8bf4\u660e TaskListener \u548c Launcher \u7684\u7528\u6cd5&#xff0c;\u4ee5\u53ca Action \u7684\u4f5c\u7528\u3002 Override public void perform(Run run, FilePath workspace, EnvVars env, Launcher","og_url":"https:\/\/www.wsisp.com\/helps\/98669.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-01T01:25:13+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260901012510-6a962976ec20f.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/98669.html","url":"https:\/\/www.wsisp.com\/helps\/98669.html","name":"\u4e8c\uff1a\u4ece\u96f6\u4e0a\u624b Jenkins \u63d2\u4ef6\u5f00\u53d1\uff1a\u505a\u4e00\u4e2a\u53ef\u590d\u7528 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-01T01:25:13+00:00","dateModified":"2026-09-01T01:25:13+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/98669.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/98669.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/98669.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4e8c\uff1a\u4ece\u96f6\u4e0a\u624b Jenkins \u63d2\u4ef6\u5f00\u53d1\uff1a\u505a\u4e00\u4e2a\u53ef\u590d\u7528 Pipeline \u81ea\u5b9a\u4e49\u6b65\u9aa4\u63d2\u4ef6"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/98669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=98669"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/98669\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/98665"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=98669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=98669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=98669"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=98669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}