{"id":81129,"date":"2026-07-24T23:50:26","date_gmt":"2026-07-24T15:50:26","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/81129.html"},"modified":"2026-07-24T23:50:26","modified_gmt":"2026-07-24T15:50:26","slug":"jenkins-%e6%9e%84%e5%bb%ba%e5%8e%86%e5%8f%b2%e7%ae%a1%e7%90%86%e4%b8%8e%e7%a3%81%e7%9b%98%e6%b8%85%e7%90%86%e5%85%a8%e6%94%bb%e7%95%a5%ef%bc%9a5%e6%ad%a5%e6%a0%b9%e6%b2%bb%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/81129.html","title":{"rendered":"Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565\uff1a5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1"},"content":{"rendered":"<\/p>\n<h4>Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565&#xff1a;5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1<\/h4>\n<ul>\n<li>\n<ul>\n<li>\n<ul>\n<li>&#x1f4c8; \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u5168\u666f\u6d41\u7a0b\u56fe<\/li>\n<li>\u4e00\u3001<font color=\"red\">\u6838\u5fc3\u6982\u5ff5<\/font>&#xff1a;\u6784\u5efa\u5386\u53f2\u5230\u5e95\u5360\u7528\u4e86\u54ea\u4e9b\u7a7a\u95f4&#xff1f;<\/li>\n<li>\n<ul>\n<li>1. \u6784\u5efa\u5386\u53f2\u7684\u5b58\u50a8\u7ed3\u6784<\/li>\n<li>2. \u78c1\u76d8\u7a7a\u95f4\u5360\u7528\u5206\u6790<\/li>\n<\/ul>\n<\/li>\n<li>\u4e8c\u3001<font color=\"orange\">\u7b56\u7565\u4e00<\/font>&#xff1a;\u5168\u5c40\u81ea\u52a8\u6e05\u7406\u914d\u7f6e&#xff08;\u6700\u57fa\u7840&#xff09;<\/li>\n<li>\n<ul>\n<li>\u64cd\u4f5c\u6b65\u9aa4<\/li>\n<\/ul>\n<\/li>\n<li>\u4e09\u3001<font color=\"orange\">\u7b56\u7565\u4e8c<\/font>&#xff1a;Job \u7ea7\u522b\u7684\u4e22\u5f03\u7b56\u7565&#xff08;\u6700\u5e38\u7528&#xff09;<\/li>\n<li>\n<ul>\n<li>\u64cd\u4f5c\u6b65\u9aa4<\/li>\n<\/ul>\n<\/li>\n<li>\u56db\u3001<font color=\"orange\">\u7b56\u7565\u4e09<\/font>&#xff1a;Pipeline \u4e2d\u4e3b\u52a8\u6e05\u7406&#xff08;\u6700\u7075\u6d3b&#xff09;<\/li>\n<li>\n<ul>\n<li>1. \u6e05\u7406\u5de5\u4f5c\u7a7a\u95f4<\/li>\n<li>2. \u5f52\u6863\u4ea7\u7269\u6309\u9700\u6e05\u7406<\/li>\n<li>3. \u4f7f\u7528 buildDiscarder \u5c5e\u6027&#xff08;\u811a\u672c\u5f0fPipeline&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u4e94\u3001<font color=\"orange\">\u7b56\u7565\u56db<\/font>&#xff1a;\u811a\u672c\u6279\u91cf\u6e05\u7406&#xff08;\u5e94\u6025\u6551\u706b&#xff09;<\/li>\n<li>\n<ul>\n<li>1. Groovy\u811a\u672c&#xff08;\u5728Jenkins Script Console\u4e2d\u6267\u884c&#xff09;<\/li>\n<li>2. Shell\u811a\u672c&#xff08;\u76f4\u63a5\u5728\u670d\u52a1\u5668\u6267\u884c&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u516d\u3001<font color=\"orange\">\u76d1\u63a7\u4f53\u7cfb<\/font>&#xff1a;\u4ece\u88ab\u52a8\u6e05\u7406\u5230\u4e3b\u52a8\u9884\u8b66<\/li>\n<li>\n<ul>\n<li>1. \u5b89\u88c5\u78c1\u76d8\u76d1\u63a7\u63d2\u4ef6<\/li>\n<li>2. \u914d\u7f6e\u78c1\u76d8\u9608\u503c\u544a\u8b66<\/li>\n<li>3. \u5b9a\u671f\u5de1\u68c0Pipeline<\/li>\n<\/ul>\n<\/li>\n<li>&#x1f4ca; \u56db\u79cd\u6e05\u7406\u7b56\u7565\u5bf9\u6bd4<\/li>\n<li>&#x1f4da; \u5e38\u89c1\u95ee\u9898\u6392\u67e5<\/li>\n<li>&#x1f48e; \u603b\u7ed3<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"50%\">\n<p>     <font face=\"STCAIYUN\" color=\"red\" size=\"4\">&#x1f33a;The Begin&#x1f33a;\u70b9\u70b9\u5173\u6ce8&#xff0c;\u6536\u85cf\u4e0d\u8ff7\u8def&#x1f33a;<\/font> <\/p>\n<p>      <font face=\"STCAIYUN\" color=\"#08979D\" size=\"4\">\u2b07 \u2b07 \u5e95\u90e8 \u2b07 \u2b07<\/font>\n     <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<p>\u4f60\u662f\u5426\u9047\u5230\u8fc7\u8fd9\u6837\u7684\u573a\u666f&#xff1a;Jenkins\u8fd0\u884c\u4e86\u534a\u5e74\u540e&#xff0c;\u670d\u52a1\u5668\u78c1\u76d8\u7a81\u7136\u544a\u8b66&#xff0c;\u767b\u5f55\u4e00\u770b&#xff0c;jobs \u76ee\u5f55\u5360\u7528\u4e86\u4e0a\u767eGB\u7a7a\u95f4\u2014\u2014\u51e0\u4e07\u6b21\u7684\u5386\u53f2\u6784\u5efa\u3001\u51e0\u767eG\u7684\u5f52\u6863\u4ea7\u7269&#xff0c;\u8ba9\u670d\u52a1\u5668\u4e0d\u582a\u91cd\u8d1f\u3002\u6784\u5efa\u5386\u53f2\u7ba1\u7406\u5c31\u662f\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\u7684\u7cfb\u7edf\u6027\u65b9\u6848\u3002<\/p>\n<h4>&#x1f4c8; \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u5168\u666f\u6d41\u7a0b\u56fe<\/h4>\n<p>\u5148\u901a\u8fc7\u4e00\u5f20\u56fe\u7406\u89e3\u6784\u5efa\u5386\u53f2\u4ece\u4ea7\u751f\u5230\u6e05\u7406\u7684\u5b8c\u6574\u751f\u547d\u5468\u671f&#xff1a;<\/p>\n<p>  #mermaid-svg-SBQ1dQEmwhU2Zhl5{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .error-icon{fill:#552222;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .marker.cross{stroke:#333333;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 p{margin:0;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .cluster-label text{fill:#333;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .cluster-label span{color:#333;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .cluster-label span p{background-color:transparent;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .label text,#mermaid-svg-SBQ1dQEmwhU2Zhl5 span{fill:#333;color:#333;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .node rect,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .node circle,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .node ellipse,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .node polygon,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .rough-node .label text,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .node .label text,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .image-shape .label,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .icon-shape .label{text-anchor:middle;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .rough-node .label,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .node .label,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .image-shape .label,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .icon-shape .label{text-align:center;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .node.clickable{cursor:pointer;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .arrowheadPath{fill:#333333;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .cluster text{fill:#333;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .cluster span{color:#333;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 rect.text{fill:none;stroke-width:0;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .icon-shape,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .icon-shape p,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .icon-shape .label rect,#mermaid-svg-SBQ1dQEmwhU2Zhl5 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-SBQ1dQEmwhU2Zhl5 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u5b9a\u671f\u6267\u884c<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u2699\ufe0f \u6bcf\u6b21Pipeline\u6267\u884c<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>&#x1f4e6; \u751f\u6210\u6784\u5efa\u8bb0\u5f55<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5b58\u50a8\u5185\u5bb9<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>&#x1f4cb; \u6784\u5efa\u65e5\u5fd7log\u6587\u4ef6<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>&#x1f4e6; \u5f52\u6863\u4ea7\u7269artifacts<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>&#x1f4ca; JUnit\u6d4b\u8bd5\u62a5\u544a<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>&#x1f4be; \u5de5\u4f5c\u7a7a\u95f4\u5feb\u7167<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5b58\u50a8\u4e8e $JENKINS_HOME\/jobs\/<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u7ba1\u7406\u7b56\u7565<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u7b56\u75651: \u5168\u5c40\u81ea\u52a8\u6e05\u7406\u914d\u7f6e<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u7b56\u75652: Job\u7ea7\u522b\u4e22\u5f03\u7b56\u7565<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u7b56\u75653: Pipeline\u4e2d\u6e05\u7406<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u7b56\u75654: \u811a\u672c\u6279\u91cf\u5220\u9664<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>&#x1f5d1;\ufe0f \u6e05\u7406\u8fc7\u671f\u6784\u5efa<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u2705 \u91ca\u653e\u78c1\u76d8\u7a7a\u95f4<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>&#x1f4ca; \u76d1\u63a7 &#043; \u544a\u8b66<\/p>\n<p><\/span><\/p>\n<p><font color=\"red\">\u6838\u5fc3\u903b\u8f91&#xff1a;<\/font> \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u662f\u4e00\u4e2a\u95ed\u73af\u2014\u2014\u6e05\u7406\u4e0d\u662f\u76ee\u7684&#xff0c;\u5efa\u7acb\u81ea\u52a8\u5316\u7684\u6e05\u7406\u7b56\u7565 &#043; \u76d1\u63a7\u544a\u8b66\u624d\u662f\u6839\u672c\u3002<\/p>\n<hr \/>\n<h4>\u4e00\u3001<font color=\"red\">\u6838\u5fc3\u6982\u5ff5<\/font>&#xff1a;\u6784\u5efa\u5386\u53f2\u5230\u5e95\u5360\u7528\u4e86\u54ea\u4e9b\u7a7a\u95f4&#xff1f;<\/h4>\n<p>\u5728\u52a8\u624b\u6e05\u7406\u4e4b\u524d&#xff0c;\u5fc5\u987b\u641e\u6e05\u695aJenkins\u5230\u5e95\u628a\u6570\u636e\u5b58\u5728\u54ea\u91cc\u3001\u5b58\u4e86\u4ec0\u4e48\u3002<\/p>\n<h5>1. \u6784\u5efa\u5386\u53f2\u7684\u5b58\u50a8\u7ed3\u6784<\/h5>\n<p><font color=\"green\">Jenkins\u6784\u5efa\u6570\u636e\u5b58\u50a8\u8def\u5f84&#xff1a;<\/font><\/p>\n<p><span class=\"token variable\">$JENKINS_HOME<\/span>\/jobs\/<br \/>\n\u251c\u2500\u2500 project-A\/<br \/>\n\u2502   \u251c\u2500\u2500 builds\/<br \/>\n\u2502   \u2502   \u251c\u2500\u2500 <span class=\"token number\">1<\/span>\/          <span class=\"token comment\"># \u7b2c1\u6b21\u6784\u5efa<\/span><br \/>\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 log           <span class=\"token comment\"># \u6784\u5efa\u65e5\u5fd7<\/span><br \/>\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 archive\/      <span class=\"token comment\"># \u5f52\u6863\u4ea7\u7269&#xff08;jar\u5305\u7b49&#xff09;<\/span><br \/>\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 junitResult.xml  <span class=\"token comment\"># \u6d4b\u8bd5\u62a5\u544a<\/span><br \/>\n\u2502   \u2502   \u2502   \u2514\u2500\u2500 build.xml     <span class=\"token comment\"># \u6784\u5efa\u5143\u6570\u636e<\/span><br \/>\n\u2502   \u2502   \u251c\u2500\u2500 <span class=\"token number\">2<\/span>\/          <span class=\"token comment\"># \u7b2c2\u6b21\u6784\u5efa<\/span><br \/>\n\u2502   \u2502   \u2514\u2500\u2500 <span class=\"token punctuation\">..<\/span>.<br \/>\n\u2502   \u251c\u2500\u2500 workspace\/      <span class=\"token comment\"># \u5de5\u4f5c\u7a7a\u95f4&#xff08;\u53ef\u80fd\u5f88\u5927&#xff09;<\/span><br \/>\n\u2502   \u2514\u2500\u2500 config.xml      <span class=\"token comment\"># Job\u914d\u7f6e<\/span><br \/>\n\u2514\u2500\u2500 project-B\/<br \/>\n    \u2514\u2500\u2500 <span class=\"token punctuation\">..<\/span>.<\/p>\n<h5>2. \u78c1\u76d8\u7a7a\u95f4\u5360\u7528\u5206\u6790<\/h5>\n<table>\n<tr>\u5b58\u50a8\u5185\u5bb9<font color=\"red\">\u78c1\u76d8\u5360\u7528\u6bd4\u4f8b<\/font><font color=\"green\">\u6e05\u7406\u4f18\u5148\u7ea7<\/font><\/tr>\n<tbody>\n<tr>\n<td>\u5f52\u6863\u4ea7\u7269&#xff08;Artifacts&#xff09;<\/td>\n<td align=\"center\">40-60%<\/td>\n<td align=\"center\">\u2b50\u2b50\u2b50\u2b50\u2b50 \u6700\u9ad8<\/td>\n<\/tr>\n<tr>\n<td>\u5de5\u4f5c\u7a7a\u95f4&#xff08;Workspace&#xff09;<\/td>\n<td align=\"center\">20-30%<\/td>\n<td align=\"center\">\u2b50\u2b50\u2b50\u2b50<\/td>\n<\/tr>\n<tr>\n<td>\u6784\u5efa\u65e5\u5fd7&#xff08;Logs&#xff09;<\/td>\n<td align=\"center\">10-15%<\/td>\n<td align=\"center\">\u2b50\u2b50\u2b50<\/td>\n<\/tr>\n<tr>\n<td>\u6d4b\u8bd5\u62a5\u544a&#xff08;Reports&#xff09;<\/td>\n<td align=\"center\">5-10%<\/td>\n<td align=\"center\">\u2b50\u2b50<\/td>\n<\/tr>\n<tr>\n<td>\u6784\u5efa\u5143\u6570\u636e&#xff08;XML&#xff09;<\/td>\n<td align=\"center\">1-5%<\/td>\n<td align=\"center\">\u2b50&#xff08;\u4e0d\u5efa\u8bae\u6e05\u7406&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><font color=\"purple\">\u5173\u952e\u8ba4\u77e5&#xff1a;<\/font> \u5f52\u6863\u4ea7\u7269&#xff08;Artifacts&#xff09;\u548c\u5de5\u4f5c\u7a7a\u95f4&#xff08;Workspace&#xff09;\u662f\u6700\u5927\u7684\u78c1\u76d8\u6d88\u8017\u8005&#xff0c;\u5e94\u4f5c\u4e3a\u6e05\u7406\u7684\u91cd\u70b9\u76ee\u6807\u3002<\/p>\n<hr \/>\n<h4>\u4e8c\u3001<font color=\"orange\">\u7b56\u7565\u4e00<\/font>&#xff1a;\u5168\u5c40\u81ea\u52a8\u6e05\u7406\u914d\u7f6e&#xff08;\u6700\u57fa\u7840&#xff09;<\/h4>\n<p>\u8fd9\u662fJenkins\u5185\u7f6e\u7684**<font color=\"red\">\u5168\u5c40\u515c\u5e95\u7b56\u7565<\/font>**&#xff0c;\u5bf9\u6240\u6709Job\u751f\u6548\u3002<\/p>\n<h5>\u64cd\u4f5c\u6b65\u9aa4<\/h5>\n<li>\u767b\u5f55Jenkins&#xff0c;\u8fdb\u5165 <font color=\"orange\">Manage Jenkins \u2192 System<\/font>\u3002<\/li>\n<li>\u627e\u5230 <font color=\"red\">Global Build Discarders<\/font> \u90e8\u5206\u3002<\/li>\n<li>\u52fe\u9009\u5e76\u914d\u7f6e\u6e05\u7406\u7b56\u7565\u3002<\/li>\n<p><font color=\"blue\">\u63a8\u8350\u914d\u7f6e&#xff1a;<\/font><\/p>\n<p>\u7b56\u7565\u7c7b\u578b&#xff1a;Log Rotation<br \/>\n\u4fdd\u7559\u5929\u6570&#xff1a;30\u5929<br \/>\n\u4fdd\u7559\u6700\u5927\u6784\u5efa\u6570&#xff1a;50<\/p>\n<p><font color=\"purple\">\u6ce8\u610f&#xff1a;<\/font><\/p>\n<ul>\n<li>\u8fd9\u4e2a\u914d\u7f6e\u662f\u5168\u5c40\u9ed8\u8ba4\u503c&#xff0c;\u6bcf\u4e2aJob\u53ef\u4ee5\u72ec\u7acb\u8986\u76d6\u3002<\/li>\n<li>\u5efa\u8bae\u8bbe\u7f6e\u5f97\u5bbd\u677e\u4e00\u4e9b&#xff08;\u5982\u4fdd\u755930\u5929&#xff09;&#xff0c;\u7136\u540e\u5728\u4e2a\u522b\u9ad8\u9891Job\u4e0a\u5355\u72ec\u6536\u7d27\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>\u4e09\u3001<font color=\"orange\">\u7b56\u7565\u4e8c<\/font>&#xff1a;Job \u7ea7\u522b\u7684\u4e22\u5f03\u7b56\u7565&#xff08;\u6700\u5e38\u7528&#xff09;<\/h4>\n<p>\u5bf9\u4e8e\u6bcf\u5929\u6784\u5efa\u51e0\u5341\u6b21\u7684\u9ad8\u9891\u9879\u76ee&#xff0c;\u9700\u8981\u5728Job\u7ea7\u522b\u8bbe\u7f6e\u66f4\u6fc0\u8fdb\u7684\u6e05\u7406\u7b56\u7565\u3002<\/p>\n<h5>\u64cd\u4f5c\u6b65\u9aa4<\/h5>\n<li>\u8fdb\u5165\u5177\u4f53Job\u7684 <font color=\"orange\">Configure \u2192 General<\/font>\u3002<\/li>\n<li>\u627e\u5230 <font color=\"red\">Discard old builds<\/font>&#xff08;\u4e22\u5f03\u65e7\u7684\u6784\u5efa&#xff09;\u3002<\/li>\n<li>\u914d\u7f6e\u4ee5\u4e0b\u53c2\u6570&#xff1a;<\/li>\n<p><font color=\"blue\">\u7b56\u7565\u914d\u7f6e\u8bf4\u660e&#xff1a;<\/font><\/p>\n<table>\n<tr>\u53c2\u6570\u63a8\u8350\u503c&#xff08;\u9ad8\u9891Job&#xff09;\u63a8\u8350\u503c&#xff08;\u4f4e\u9891Job&#xff09;\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>Days to keep builds<\/td>\n<td align=\"center\">7\u5929<\/td>\n<td align=\"center\">30\u5929<\/td>\n<td>\u6309\u65f6\u95f4\u4fdd\u7559<\/td>\n<\/tr>\n<tr>\n<td>Max # of builds to keep<\/td>\n<td align=\"center\">20\u6b21<\/td>\n<td align=\"center\">50\u6b21<\/td>\n<td>\u6309\u6570\u91cf\u4fdd\u7559<\/td>\n<\/tr>\n<tr>\n<td>Days to keep artifacts<\/td>\n<td align=\"center\">3\u5929<\/td>\n<td align=\"center\">14\u5929<\/td>\n<td>\u4ea7\u7269\u4fdd\u7559\u65f6\u957f&#xff08;\u53ef\u77ed\u4e8e\u6784\u5efa\u4fdd\u7559&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>Max # of builds with artifacts<\/td>\n<td align=\"center\">5\u6b21<\/td>\n<td align=\"center\">20\u6b21<\/td>\n<td>\u53ea\u4fdd\u7559\u6700\u8fd1N\u6b21\u7684\u4ea7\u7269<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><font color=\"green\">\u5de5\u4f5c\u673a\u5236&#xff1a;<\/font> \u4e24\u4e2a\u6761\u4ef6\u4ee5**<font color=\"red\">\u5148\u6ee1\u8db3\u8005\u4e3a\u51c6<\/font>**\u3002\u4f8b\u5982\u540c\u65f6\u8bbe\u7f6e&#034;\u4fdd\u75597\u5929&#034;\u548c&#034;\u4fdd\u755920\u6b21&#034;&#xff0c;\u67d0\u5929\u7b2c21\u6b21\u6784\u5efa\u6210\u529f\u65f6&#xff0c;\u5373\u4f7f\u5b83\u53ea\u8fc7\u4e861\u5929&#xff0c;\u6700\u8001\u7684\u7b2c1\u6b21\u4e5f\u4f1a\u88ab\u6e05\u7406\u3002<\/p>\n<p><font color=\"purple\">\u6700\u4f73\u5b9e\u8df5&#xff1a;<\/font><\/p>\n<ul>\n<li>\u5f52\u6863\u4ea7\u7269&#xff08;Artifacts&#xff09;\u7684\u4fdd\u7559\u65f6\u957f\u5e94\u77ed\u4e8e\u6784\u5efa\u8bb0\u5f55\u3002<\/li>\n<li>\u751f\u4ea7\u53d1\u5e03Job\u7684\u6784\u5efa\u5386\u53f2\u5efa\u8bae\u6c38\u4e45\u4fdd\u7559&#xff08;\u4e0d\u8bbe\u7f6e\u4e22\u5f03\u7b56\u7565&#xff09;\u3002<\/li>\n<li>\u7279\u6027\u5206\u652fJob\u5efa\u8bae\u4fdd\u75595\u6b21\u4ee5\u5185\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>\u56db\u3001<font color=\"orange\">\u7b56\u7565\u4e09<\/font>&#xff1a;Pipeline \u4e2d\u4e3b\u52a8\u6e05\u7406&#xff08;\u6700\u7075\u6d3b&#xff09;<\/h4>\n<p>\u5728Pipeline\u811a\u672c\u4e2d&#xff0c;\u53ef\u4ee5\u7cbe\u786e\u63a7\u5236\u6784\u5efa\u7ed3\u675f\u540e\u6e05\u7406\u54ea\u4e9b\u5185\u5bb9\u3002<\/p>\n<h5>1. \u6e05\u7406\u5de5\u4f5c\u7a7a\u95f4<\/h5>\n<p><font color=\"blue\">\u58f0\u660e\u5f0fPipeline\u793a\u4f8b&#xff1a;<\/font><\/p>\n<p>pipeline <span class=\"token punctuation\">{<\/span><br \/>\n    agent any<\/p>\n<p>    stages <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token function\">stage<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;Build&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n            steps <span class=\"token punctuation\">{<\/span><br \/>\n                sh <span class=\"token string\">&#039;mvn clean package&#039;<\/span><br \/>\n            <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    post <span class=\"token punctuation\">{<\/span><br \/>\n        always <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token comment\">\/\/ \u65b9\u6cd51&#xff1a;\u4f7f\u7528cleanWs\u63d2\u4ef6\u6e05\u7406\u5de5\u4f5c\u7a7a\u95f4<\/span><br \/>\n            <span class=\"token function\">cleanWs<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                cleanWhenAborted<span class=\"token punctuation\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                cleanWhenFailure<span class=\"token punctuation\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                cleanWhenNotBuilt<span class=\"token punctuation\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                cleanWhenUnstable<span class=\"token punctuation\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                deleteDirs<span class=\"token punctuation\">:<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                patterns<span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n                    <span class=\"token punctuation\">[<\/span>pattern<span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;target\/&#039;<\/span><span class=\"token punctuation\">,<\/span> type<span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;INCLUDE&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                    <span class=\"token punctuation\">[<\/span>pattern<span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;node_modules\/&#039;<\/span><span class=\"token punctuation\">,<\/span> type<span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;INCLUDE&#039;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n                <span class=\"token punctuation\">]<\/span><br \/>\n            <span class=\"token punctuation\">)<\/span><\/p>\n<p>            <span class=\"token comment\">\/\/ \u65b9\u6cd52&#xff1a;\u76f4\u63a5\u5220\u9664\u76ee\u5f55<\/span><br \/>\n            <span class=\"token comment\">\/\/ deleteDir()<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h5>2. \u5f52\u6863\u4ea7\u7269\u6309\u9700\u6e05\u7406<\/h5>\n<p>pipeline <span class=\"token punctuation\">{<\/span><br \/>\n    agent any<\/p>\n<p>    stages <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token function\">stage<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;Archive&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n            steps <span class=\"token punctuation\">{<\/span><br \/>\n                <span class=\"token comment\">\/\/ \u4ec5\u5f52\u6863\u91cd\u8981\u4ea7\u7269<\/span><br \/>\n                archiveArtifacts artifacts<span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;target\/*.jar&#039;<\/span><span class=\"token punctuation\">,<\/span> fingerprint<span class=\"token punctuation\">:<\/span> <span class=\"token boolean\">true<\/span><br \/>\n            <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    post <span class=\"token punctuation\">{<\/span><br \/>\n        always <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token comment\">\/\/ \u6e05\u7406\u6784\u5efa\u8fc7\u7a0b\u4e2d\u4ea7\u751f\u7684\u4e34\u65f6\u6587\u4ef6<\/span><br \/>\n            sh <span class=\"token string\">&#039;&#039;&#039;<br \/>\n                rm -rf target\/tmp\/<br \/>\n                rm -rf target\/*-sources.jar<br \/>\n            &#039;&#039;&#039;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h5>3. \u4f7f\u7528 buildDiscarder \u5c5e\u6027&#xff08;\u811a\u672c\u5f0fPipeline&#xff09;<\/h5>\n<p><span class=\"token function\">properties<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">[<\/span><br \/>\n    <span class=\"token function\">buildDiscarder<\/span><span class=\"token punctuation\">(<\/span><br \/>\n        <span class=\"token function\">logRotator<\/span><span class=\"token punctuation\">(<\/span><br \/>\n            artifactDaysToKeepStr<span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;3&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            artifactNumToKeepStr<span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;10&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            daysToKeepStr<span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;7&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            numToKeepStr<span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;30&#039;<\/span><br \/>\n        <span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>node <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token function\">stage<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;Build&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u6784\u5efa\u903b\u8f91<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><font color=\"orange\">\u4f18\u52bf&#xff1a;<\/font> \u5c06\u6e05\u7406\u7b56\u7565\u4ee3\u7801\u5316&#xff0c;\u968fJenkinsfile\u7248\u672c\u63a7\u5236&#xff0c;\u56e2\u961f\u6210\u5458\u90fd\u80fd\u770b\u5230\u548c\u4fee\u6539\u3002<\/p>\n<hr \/>\n<h4>\u4e94\u3001<font color=\"orange\">\u7b56\u7565\u56db<\/font>&#xff1a;\u811a\u672c\u6279\u91cf\u6e05\u7406&#xff08;\u5e94\u6025\u6551\u706b&#xff09;<\/h4>\n<p>\u5f53\u78c1\u76d8\u5df2\u7ecf\u7206\u6ee1&#xff0c;\u9700\u8981**<font color=\"red\">\u7acb\u5373\u91ca\u653e\u7a7a\u95f4<\/font>**\u65f6&#xff0c;\u4f7f\u7528\u811a\u672c\u6279\u91cf\u64cd\u4f5c\u3002<\/p>\n<h5>1. Groovy\u811a\u672c&#xff08;\u5728Jenkins Script Console\u4e2d\u6267\u884c&#xff09;<\/h5>\n<p>\u8fdb\u5165 <font color=\"orange\">Manage Jenkins \u2192 Script Console<\/font>&#xff0c;\u6267\u884c\u4ee5\u4e0b\u811a\u672c&#xff1a;<\/p>\n<p><font color=\"blue\">\u6279\u91cf\u5220\u9664\u6240\u6709Job\u7684\u65e7\u6784\u5efa&#xff08;\u4fdd\u7559\u6700\u8fd110\u6b21&#xff09;&#xff1a;<\/font><\/p>\n<p><span class=\"token comment\">\/\/ \u904d\u5386\u6240\u6709Job<\/span><br \/>\nJenkins<span class=\"token punctuation\">.<\/span>instance<span class=\"token punctuation\">.<\/span>allItems<span class=\"token punctuation\">.<\/span>findAll <span class=\"token punctuation\">{<\/span> it <span class=\"token keyword\">instanceof<\/span> <span class=\"token class-name\">hudson<span class=\"token punctuation\">.<\/span>model<span class=\"token punctuation\">.<\/span>Job<\/span> <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">.<\/span>each <span class=\"token punctuation\">{<\/span> job <span class=\"token operator\">-&gt;<\/span><br \/>\n    println <span class=\"token interpolation-string\"><span class=\"token string\">&#034;\u6e05\u7406Job: <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">job<span class=\"token punctuation\">.<\/span>fullName<\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u83b7\u53d6\u6240\u6709\u6784\u5efa\u8bb0\u5f55&#xff0c;\u6309\u7f16\u53f7\u5012\u5e8f\u6392\u5217<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> builds <span class=\"token operator\">&#061;<\/span> job<span class=\"token punctuation\">.<\/span>builds<span class=\"token punctuation\">.<\/span>sort <span class=\"token punctuation\">{<\/span> it<span class=\"token punctuation\">.<\/span>number <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">reverse<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u4fdd\u7559\u6700\u8fd110\u6b21\u6784\u5efa<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> buildsToKeep <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">10<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>builds<span class=\"token punctuation\">.<\/span><span class=\"token function\">size<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&gt;<\/span> buildsToKeep<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        builds<span class=\"token punctuation\">.<\/span><span class=\"token function\">drop<\/span><span class=\"token punctuation\">(<\/span>buildsToKeep<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>each <span class=\"token punctuation\">{<\/span> build <span class=\"token operator\">-&gt;<\/span><br \/>\n            println <span class=\"token interpolation-string\"><span class=\"token string\">&#034;  \u5220\u9664\u6784\u5efa #<\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">build<span class=\"token punctuation\">.<\/span>number<\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><br \/>\n            build<span class=\"token punctuation\">.<\/span><span class=\"token function\">delete<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\nprintln <span class=\"token interpolation-string\"><span class=\"token string\">&#034;\u6e05\u7406\u5b8c\u6210&#xff01;&#034;<\/span><\/span><\/p>\n<p><font color=\"blue\">\u4ec5\u6e05\u7406\u6784\u5efa\u4ea7\u7269&#xff0c;\u4fdd\u7559\u6784\u5efa\u65e5\u5fd7&#xff1a;<\/font><\/p>\n<p>Jenkins<span class=\"token punctuation\">.<\/span>instance<span class=\"token punctuation\">.<\/span>allItems<span class=\"token punctuation\">.<\/span>findAll <span class=\"token punctuation\">{<\/span> it <span class=\"token keyword\">instanceof<\/span> <span class=\"token class-name\">hudson<span class=\"token punctuation\">.<\/span>model<span class=\"token punctuation\">.<\/span>Job<\/span> <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">.<\/span>each <span class=\"token punctuation\">{<\/span> job <span class=\"token operator\">-&gt;<\/span><br \/>\n    println <span class=\"token interpolation-string\"><span class=\"token string\">&#034;\u6e05\u7406\u4ea7\u7269: <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">job<span class=\"token punctuation\">.<\/span>fullName<\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><\/p>\n<p>    job<span class=\"token punctuation\">.<\/span>builds<span class=\"token punctuation\">.<\/span>each <span class=\"token punctuation\">{<\/span> build <span class=\"token operator\">-&gt;<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u83b7\u53d6\u5f52\u6863\u4ea7\u7269\u76ee\u5f55<\/span><br \/>\n        <span class=\"token keyword\">def<\/span> artifactsDir <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">File<\/span><span class=\"token punctuation\">(<\/span>build<span class=\"token punctuation\">.<\/span>rootDir<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;archive&#039;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>artifactsDir<span class=\"token punctuation\">.<\/span><span class=\"token function\">exists<\/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 keyword\">def<\/span> size <span class=\"token operator\">&#061;<\/span> artifactsDir<span class=\"token punctuation\">.<\/span><span class=\"token function\">directorySize<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n            println <span class=\"token interpolation-string\"><span class=\"token string\">&#034;  \u6784\u5efa #<\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">build<span class=\"token punctuation\">.<\/span>number<\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\"> \u4ea7\u7269\u5927\u5c0f: <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">size <span class=\"token interpolation-string\"><span class=\"token string\">\/ 1024 \/<\/span><\/span> <span class=\"token number\">1024<\/span><\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\"> MB&#034;<\/span><\/span><\/p>\n<p>            <span class=\"token comment\">\/\/ \u5220\u9664\u4ea7\u7269&#xff08;\u4fdd\u7559\u6784\u5efa\u8bb0\u5f55\u548c\u65e5\u5fd7&#xff09;<\/span><br \/>\n            artifactsDir<span class=\"token punctuation\">.<\/span><span class=\"token function\">deleteDir<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n            println <span class=\"token interpolation-string\"><span class=\"token string\">&#034;  \u5df2\u5220\u9664\u6784\u5efa #<\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">build<span class=\"token punctuation\">.<\/span>number<\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\"> \u7684\u4ea7\u7269&#034;<\/span><\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><font color=\"blue\">\u67e5\u627e\u5e76\u6e05\u7406\u5927\u6587\u4ef6\u6784\u5efa&#xff1a;<\/font><\/p>\n<p><span class=\"token comment\">\/\/ \u67e5\u627e\u6240\u6709\u6784\u5efa&#xff0c;\u6309\u78c1\u76d8\u5360\u7528\u6392\u5e8f<\/span><br \/>\n<span class=\"token keyword\">def<\/span> buildSizes <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><br \/>\nJenkins<span class=\"token punctuation\">.<\/span>instance<span class=\"token punctuation\">.<\/span>allItems<span class=\"token punctuation\">.<\/span>findAll <span class=\"token punctuation\">{<\/span> it <span class=\"token keyword\">instanceof<\/span> <span class=\"token class-name\">hudson<span class=\"token punctuation\">.<\/span>model<span class=\"token punctuation\">.<\/span>Job<\/span> <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">.<\/span>each <span class=\"token punctuation\">{<\/span> job <span class=\"token operator\">-&gt;<\/span><br \/>\n    job<span class=\"token punctuation\">.<\/span>builds<span class=\"token punctuation\">.<\/span>each <span class=\"token punctuation\">{<\/span> build <span class=\"token operator\">-&gt;<\/span><br \/>\n        <span class=\"token keyword\">def<\/span> size <span class=\"token operator\">&#061;<\/span> build<span class=\"token punctuation\">.<\/span>rootDir<span class=\"token punctuation\">.<\/span><span class=\"token function\">directorySize<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        buildSizes <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token punctuation\">[<\/span>job<span class=\"token punctuation\">:<\/span> job<span class=\"token punctuation\">.<\/span>fullName<span class=\"token punctuation\">,<\/span> number<span class=\"token punctuation\">:<\/span> build<span class=\"token punctuation\">.<\/span>number<span class=\"token punctuation\">,<\/span> sizeMB<span class=\"token punctuation\">:<\/span> size <span class=\"token interpolation-string\"><span class=\"token string\">\/ 1024 \/<\/span><\/span> <span class=\"token number\">1024<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u6309\u5927\u5c0f\u964d\u5e8f\u6392\u5217&#xff0c;\u8f93\u51fa\u524d20\u4e2a<\/span><br \/>\nbuildSizes<span class=\"token punctuation\">.<\/span>sort <span class=\"token punctuation\">{<\/span> <span class=\"token operator\">&#8211;<\/span>it<span class=\"token punctuation\">.<\/span>sizeMB <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">take<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">20<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>each <span class=\"token punctuation\">{<\/span><br \/>\n    println <span class=\"token interpolation-string\"><span class=\"token string\">&#034;<\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">it<span class=\"token punctuation\">.<\/span>job<\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\"> &#8211; Build #<\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">it<span class=\"token punctuation\">.<\/span>number<\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\">: <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">it<span class=\"token punctuation\">.<\/span>sizeMB<span class=\"token punctuation\">.<\/span><span class=\"token function\">round<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span><\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\"> MB&#034;<\/span><\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h5>2. Shell\u811a\u672c&#xff08;\u76f4\u63a5\u5728\u670d\u52a1\u5668\u6267\u884c&#xff09;<\/h5>\n<p><font color=\"green\">\u67e5\u627e\u5360\u7528\u6700\u5927\u7684Job\u76ee\u5f55&#xff1a;<\/font><\/p>\n<p><span class=\"token shebang important\">#!\/bin\/bash<\/span><br \/>\n<span class=\"token assign-left variable\">JENKINS_HOME<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/var\/lib\/jenkins&#034;<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#061;&#061;&#061; Jenkins \u78c1\u76d8\u5360\u7528 Top 20 &#061;&#061;&#061;&#034;<\/span><br \/>\n<span class=\"token function\">du<\/span> <span class=\"token parameter variable\">-sh<\/span> <span class=\"token variable\">$JENKINS_HOME<\/span>\/jobs\/*\/ <span class=\"token operator\">|<\/span> <span class=\"token function\">sort<\/span> <span class=\"token parameter variable\">-rh<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span> <span class=\"token parameter variable\">-20<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#061;&#061;&#061; Workspace \u5360\u7528 Top 10 &#061;&#061;&#061;&#034;<\/span><br \/>\n<span class=\"token function\">du<\/span> <span class=\"token parameter variable\">-sh<\/span> <span class=\"token variable\">$JENKINS_HOME<\/span>\/jobs\/*\/workspace\/ <span class=\"token operator\">|<\/span> <span class=\"token function\">sort<\/span> <span class=\"token parameter variable\">-rh<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span> <span class=\"token parameter variable\">-10<\/span><\/p>\n<p><font color=\"green\">\u5220\u9664\u6240\u6709\u8d85\u8fc730\u5929\u7684\u6784\u5efa\u4ea7\u7269&#xff1a;<\/font><\/p>\n<p><span class=\"token shebang important\">#!\/bin\/bash<\/span><br \/>\n<span class=\"token assign-left variable\">JENKINS_HOME<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/var\/lib\/jenkins&#034;<\/span><br \/>\n<span class=\"token assign-left variable\">DAYS_OLD<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">30<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;\u6e05\u7406\u8d85\u8fc7 <span class=\"token variable\">${DAYS_OLD}<\/span> \u5929\u7684\u6784\u5efa\u4ea7\u7269&#8230;&#034;<\/span><\/p>\n<p><span class=\"token function\">find<\/span> <span class=\"token variable\">$JENKINS_HOME<\/span>\/jobs\/*\/builds\/ <span class=\"token parameter variable\">-maxdepth<\/span> <span class=\"token number\">3<\/span> <span class=\"token parameter variable\">-type<\/span> d <span class=\"token parameter variable\">-name<\/span> <span class=\"token string\">&#034;archive&#034;<\/span> <span class=\"token parameter variable\">-mtime<\/span> &#043;<span class=\"token variable\">$DAYS_OLD<\/span> <span class=\"token operator\">|<\/span> <span class=\"token keyword\">while<\/span> <span class=\"token builtin class-name\">read<\/span> <span class=\"token function\">dir<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">do<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;\u5220\u9664: <span class=\"token variable\">$dir<\/span> (\u5927\u5c0f: <span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">du<\/span> <span class=\"token parameter variable\">-sh<\/span> $dir <span class=\"token operator\">|<\/span> <span class=\"token function\">cut<\/span> <span class=\"token parameter variable\">-f1<\/span><span class=\"token variable\">)<\/span><\/span>)&#034;<\/span><br \/>\n    <span class=\"token function\">rm<\/span> <span class=\"token parameter variable\">-rf<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$dir<\/span>&#034;<\/span><br \/>\n<span class=\"token keyword\">done<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;\u6e05\u7406\u5b8c\u6210&#xff01;&#034;<\/span><\/p>\n<p><font color=\"purple\">\u26a0\ufe0f \u5b89\u5168\u8b66\u544a&#xff1a;<\/font> \u4f7f\u7528Shell\u811a\u672c\u524d\u52a1\u5fc5&#xff1a;<\/p>\n<li>\u5148\u5907\u4efd $JENKINS_HOME\u3002<\/li>\n<li>\u5728\u6d4b\u8bd5\u73af\u5883\u9a8c\u8bc1\u811a\u672c\u3002<\/li>\n<li>\u786e\u8ba4 find \u547d\u4ee4\u7684 -mtime \u53c2\u6570\u903b\u8f91\u6b63\u786e\u3002<\/li>\n<hr \/>\n<h4>\u516d\u3001<font color=\"orange\">\u76d1\u63a7\u4f53\u7cfb<\/font>&#xff1a;\u4ece\u88ab\u52a8\u6e05\u7406\u5230\u4e3b\u52a8\u9884\u8b66<\/h4>\n<p>\u6e05\u7406\u53ea\u662f\u6cbb\u6807&#xff0c;\u76d1\u63a7\u624d\u662f\u6cbb\u672c\u3002<\/p>\n<h5>1. \u5b89\u88c5\u78c1\u76d8\u76d1\u63a7\u63d2\u4ef6<\/h5>\n<p>\u5b89\u88c5 <font color=\"red\">Disk Usage Plugin<\/font>&#xff1a;<\/p>\n<ul>\n<li>\u8fdb\u5165 <font color=\"orange\">Manage Jenkins \u2192 Plugins<\/font>&#xff0c;\u641c\u7d22\u5b89\u88c5 Disk Usage\u3002<\/li>\n<li>\u5b89\u88c5\u540e\u5728 Manage Jenkins \u9875\u9762\u770b\u5230 Disk Usage \u94fe\u63a5\u3002<\/li>\n<li>\u53ef\u89c6\u5316\u7ba1\u7406\u6bcf\u4e2aJob\u7684\u78c1\u76d8\u5360\u7528\u3002<\/li>\n<\/ul>\n<h5>2. \u914d\u7f6e\u78c1\u76d8\u9608\u503c\u544a\u8b66<\/h5>\n<p>\u5728 <font color=\"orange\">Manage Jenkins \u2192 System<\/font> \u4e2d\u8bbe\u7f6e&#xff1a;<\/p>\n<p>\u78c1\u76d8\u7a7a\u95f2\u7a7a\u95f4\u544a\u8b66\u9608\u503c&#xff1a;10GB<br \/>\n\u5f53\u4f4e\u4e8e\u9608\u503c\u65f6&#xff1a;\u53d1\u9001\u90ae\u4ef6\u901a\u77e5\u7ba1\u7406\u5458<\/p>\n<h5>3. \u5b9a\u671f\u5de1\u68c0Pipeline<\/h5>\n<p>\u521b\u5efa\u4e00\u4e2a\u4e13\u95e8\u7684Jenkins Job&#xff0c;\u6bcf\u5468\u6267\u884c\u4e00\u6b21\u78c1\u76d8\u5de1\u68c0&#xff1a;<\/p>\n<p>pipeline <span class=\"token punctuation\">{<\/span><br \/>\n    agent any<\/p>\n<p>    triggers <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token function\">cron<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;0 8 * * 1&#039;<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\">\/\/ \u6bcf\u5468\u4e00\u65e9\u4e0a8\u70b9\u6267\u884c<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    stages <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token function\">stage<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;Check Disk Usage&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n            steps <span class=\"token punctuation\">{<\/span><br \/>\n                script <span class=\"token punctuation\">{<\/span><br \/>\n                    <span class=\"token keyword\">def<\/span> jenkinsHome <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">File<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;\/var\/lib\/jenkins&#039;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                    <span class=\"token keyword\">def<\/span> freeSpace <span class=\"token operator\">&#061;<\/span> jenkinsHome<span class=\"token punctuation\">.<\/span>freeSpace <span class=\"token interpolation-string\"><span class=\"token string\">\/ 1024 \/<\/span><\/span> <span class=\"token number\">1024<\/span> <span class=\"token operator\">\/<\/span> <span class=\"token number\">1024<\/span><br \/>\n                    <span class=\"token keyword\">def<\/span> totalSpace <span class=\"token operator\">&#061;<\/span> jenkinsHome<span class=\"token punctuation\">.<\/span>totalSpace <span class=\"token interpolation-string\"><span class=\"token string\">\/ 1024 \/<\/span><\/span> <span class=\"token number\">1024<\/span> <span class=\"token operator\">\/<\/span> <span class=\"token number\">1024<\/span><\/p>\n<p>                    echo <span class=\"token interpolation-string\"><span class=\"token string\">&#034;Jenkins\u78c1\u76d8\u603b\u7a7a\u95f4: <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">totalSpace<span class=\"token punctuation\">.<\/span><span class=\"token function\">round<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span><\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\"> GB&#034;<\/span><\/span><br \/>\n                    echo <span class=\"token interpolation-string\"><span class=\"token string\">&#034;Jenkins\u78c1\u76d8\u5269\u4f59\u7a7a\u95f4: <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">freeSpace<span class=\"token punctuation\">.<\/span><span class=\"token function\">round<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span><\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\"> GB&#034;<\/span><\/span><\/p>\n<p>                    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>freeSpace <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n                        <span class=\"token function\">emailext<\/span><span class=\"token punctuation\">(<\/span><br \/>\n                            subject<span class=\"token punctuation\">:<\/span> <span class=\"token interpolation-string\"><span class=\"token string\">&#034;&#x1f6a8; Jenkins\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3\u544a\u8b66&#034;<\/span><\/span><span class=\"token punctuation\">,<\/span><br \/>\n                            body<span class=\"token punctuation\">:<\/span> <span class=\"token interpolation-string\"><span class=\"token string\">&#034;\u5269\u4f59\u7a7a\u95f4: <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span><span class=\"token expression\">freeSpace<span class=\"token punctuation\">.<\/span><span class=\"token function\">round<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span><\/span><span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\"> GB&#xff0c;\u8bf7\u7acb\u5373\u6e05\u7406&#xff01;&#034;<\/span><\/span><span class=\"token punctuation\">,<\/span><br \/>\n                            to<span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;admin&#064;company.com&#039;<\/span><br \/>\n                        <span class=\"token punctuation\">)<\/span><br \/>\n                        error <span class=\"token interpolation-string\"><span class=\"token string\">&#034;\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3&#xff0c;\u5de1\u68c0\u5931\u8d25&#xff01;&#034;<\/span><\/span><br \/>\n                    <span class=\"token punctuation\">}<\/span><br \/>\n                <span class=\"token punctuation\">}<\/span><br \/>\n            <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><\/p>\n<p>        <span class=\"token function\">stage<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;Clean Old Workspaces&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n            steps <span class=\"token punctuation\">{<\/span><br \/>\n                sh <span class=\"token string\">&#039;&#039;&#039;<br \/>\n                    find \/var\/lib\/jenkins\/jobs\/*\/workspace\/ \\\\<br \/>\n                      -maxdepth 0 \\\\<br \/>\n                      -type d \\\\<br \/>\n                      -mtime &#043;14 \\\\<br \/>\n                      -exec rm -rf {} \\\\\\\\;<br \/>\n                &#039;&#039;&#039;<\/span><br \/>\n            <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<hr \/>\n<h4>&#x1f4ca; \u56db\u79cd\u6e05\u7406\u7b56\u7565\u5bf9\u6bd4<\/h4>\n<table>\n<tr>\u7b56\u7565<font color=\"orange\">\u9002\u7528\u573a\u666f<\/font><font color=\"blue\">\u7c92\u5ea6<\/font><font color=\"red\">\u4f18\u70b9<\/font><font color=\"purple\">\u7f3a\u70b9<\/font><\/tr>\n<tbody>\n<tr>\n<td>\u5168\u5c40\u914d\u7f6e<\/td>\n<td>\u515c\u5e95\u7b56\u7565<\/td>\n<td align=\"center\">\u5168\u5c40<\/td>\n<td>\u7b80\u5355\u3001\u4e00\u52b3\u6c38\u9038<\/td>\n<td>\u65e0\u6cd5\u5dee\u5f02\u5316\u5904\u7406<\/td>\n<\/tr>\n<tr>\n<td>Job\u7ea7\u522b<\/td>\n<td>\u65e5\u5e38\u7ba1\u7406<\/td>\n<td align=\"center\">Job\u7ea7<\/td>\n<td>\u7075\u6d3b\u3001\u7cbe\u7ec6<\/td>\n<td>\u9700\u9010\u4e2a\u914d\u7f6e<\/td>\n<\/tr>\n<tr>\n<td>Pipeline\u4e2d<\/td>\n<td>\u4ee3\u7801\u5316\u56e2\u961f\u534f\u4f5c<\/td>\n<td align=\"center\">\u6784\u5efa\u7ea7<\/td>\n<td>\u53ef\u7248\u672c\u63a7\u5236\u3001\u7cbe\u786e<\/td>\n<td>\u9700\u8981\u7f16\u7801\u80fd\u529b<\/td>\n<\/tr>\n<tr>\n<td>\u811a\u672c\u6279\u91cf<\/td>\n<td>\u5e94\u6025\u6551\u706b<\/td>\n<td align=\"center\">\u65e0\u9650\u5236<\/td>\n<td>\u5feb\u901f\u3001\u5f3a\u529b<\/td>\n<td>\u98ce\u9669\u9ad8\u3001\u4e0d\u53ef\u9006<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>&#x1f4da; \u5e38\u89c1\u95ee\u9898\u6392\u67e5<\/h4>\n<table>\n<tr>\u95ee\u9898<font color=\"purple\">\u539f\u56e0<\/font><font color=\"green\">\u89e3\u51b3\u65b9\u6848<\/font><\/tr>\n<tbody>\n<tr>\n<td>\u8bbe\u7f6e\u4e86\u4e22\u5f03\u7b56\u7565\u4f46\u6ca1\u751f\u6548<\/td>\n<td>\u65e7\u7b56\u7565\u4e0e\u65b0\u7b56\u7565\u51b2\u7a81<\/td>\n<td>\u624b\u52a8\u5220\u9664\u4e00\u6b21\u65e7\u6784\u5efa&#xff0c;\u540e\u7eed\u81ea\u52a8\u7b56\u7565\u751f\u6548<\/td>\n<\/tr>\n<tr>\n<td>Pipeline\u811a\u672c\u6e05\u7406\u5931\u8d25<\/td>\n<td>Jenkins\u7528\u6237\u65e0\u5220\u9664\u6743\u9650<\/td>\n<td>\u786e\u8ba4Jenkins\u8fdb\u7a0b\u7528\u6237\u5bf9 jobs\/ \u76ee\u5f55\u6709\u5199\u6743\u9650<\/td>\n<\/tr>\n<tr>\n<td>\u6e05\u7406\u540e\u78c1\u76d8\u7a7a\u95f4\u672a\u91ca\u653e<\/td>\n<td>\u5220\u9664\u7684\u6587\u4ef6\u4ecd\u88ab\u8fdb\u7a0b\u5360\u7528<\/td>\n<td>\u91cd\u542fJenkins\u670d\u52a1\u6216\u4f7f\u7528 lsof \u68c0\u67e5\u5360\u7528<\/td>\n<\/tr>\n<tr>\n<td>\u6784\u5efa\u5386\u53f2\u88ab\u8bef\u5220<\/td>\n<td>\u811a\u672c\u53c2\u6570\u8fc7\u5927<\/td>\n<td>\u63d0\u524d\u5907\u4efd&#xff0c;\u4f7f\u7528\u66f4\u4fdd\u5b88\u7684\u4fdd\u7559\u6570\u91cf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>&#x1f48e; \u603b\u7ed3<\/h4>\n<p>\u901a\u8fc7\u672c\u6587&#xff0c;\u4f60\u5df2\u5efa\u7acb\u5b8c\u6574\u7684Jenkins\u6784\u5efa\u5386\u53f2\u7ba1\u7406\u77e5\u8bc6\u4f53\u7cfb&#xff1a;<\/p>\n<li><font color=\"red\">\u56db\u5c42\u6e05\u7406\u7b56\u7565<\/font>&#xff1a;\u5168\u5c40\u914d\u7f6e \u2192 Job\u7ea7\u522b \u2192 Pipeline\u811a\u672c \u2192 \u5e94\u6025\u811a\u672c\u3002<\/li>\n<li><font color=\"orange\">\u7a7a\u95f4\u5360\u7528\u5927\u5934<\/font>&#xff1a;\u5f52\u6863\u4ea7\u7269&#xff08;40-60%&#xff09;\u548c\u5de5\u4f5c\u7a7a\u95f4&#xff08;20-30%&#xff09;\u5e94\u4f18\u5148\u6e05\u7406\u3002<\/li>\n<li><font color=\"blue\">\u4fdd\u7559\u539f\u5219<\/font>&#xff1a;\u6784\u5efa\u65e5\u5fd7\u4fdd\u7559\u65f6\u95f4 &gt; \u5f52\u6863\u4ea7\u7269\u4fdd\u7559\u65f6\u95f4&#xff1b;\u751f\u4ea7Job\u6c38\u4e45\u4fdd\u7559\u3002<\/li>\n<li><font color=\"green\">\u76d1\u63a7\u95ed\u73af<\/font>&#xff1a;\u5b9a\u671f\u5de1\u68c0 &#043; \u9608\u503c\u544a\u8b66&#xff0c;\u53d8\u88ab\u52a8\u6e05\u7406\u4e3a\u4e3b\u52a8\u9884\u9632\u3002<\/li>\n<p><font color=\"red\">\u9ec4\u91d1\u6cd5\u5219&#xff1a;<\/font> \u4e0d\u8981\u628aJenkins\u5f53\u4ed3\u5e93\u2014\u2014\u6784\u5efa\u4ea7\u7269\u7684\u5f52\u5bbf\u662fNexus\/Artifactory&#xff0c;\u6784\u5efa\u5386\u53f2\u7684\u5f52\u5bbf\u662f\u5b9a\u671f\u5f52\u6863&#xff0c;\u5de5\u4f5c\u7a7a\u95f4\u6c38\u8fdc\u662f\u4e34\u65f6\u7684\u3002\u505a\u597d\u8fd9\u4e09\u70b9&#xff0c;\u4f60\u7684Jenkins\u670d\u52a1\u5668\u5c31\u80fd\u957f\u671f\u4fdd\u6301\u5065\u5eb7\u72b6\u6001\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724155025-6a6389c1d74f8.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"50%\">\n<p>     <font face=\"STCAIYUN\" color=\"red\" size=\"4\">&#x1f33a;The End&#x1f33a;\u70b9\u70b9\u5173\u6ce8&#xff0c;\u6536\u85cf\u4e0d\u8ff7\u8def&#x1f33a;<\/font> <\/p>\n<p>      <font face=\"STCAIYUN\" color=\"#08979D\" size=\"4\">\u2b06 \u2b06 \u9876\u90e8 \u2b06 \u2b06<\/font>\n     <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565&#xff1a;5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1&#x1f4c8; \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u5168\u666f\u6d41\u7a0b\u56fe\u4e00\u3001\u6838\u5fc3\u6982\u5ff5&#xff1a;\u6784\u5efa\u5386\u53f2\u5230\u5e95\u5360\u7528\u4e86\u54ea\u4e9b\u7a7a\u95f4&#xff1f;1. \u6784\u5efa\u5386\u53f2\u7684\u5b58\u50a8\u7ed3\u67842. \u78c1\u76d8\u7a7a\u95f4\u5360\u7528\u5206\u6790\u4e8c\u3001\u7b56\u7565\u4e00&#xff1a;\u5168\u5c40\u81ea\u52a8\u6e05\u7406\u914d\u7f6e&#xff08;\u6700\u57fa\u7840&#xff09;\u64cd\u4f5c\u6b65\u9aa4\u4e09\u3001\u7b56\u7565\u4e8c&#xff1a;Job \u7ea7\u522b\u7684\u4e22\u5f03\u7b56\u7565&#xff08;\u6700\u5e38\u7528&#xff09;\u64cd\u4f5c\u6b65\u9aa4\u56db\u3001\u7b56\u7565\u4e09&#xff1a;Pipeline \u4e2d\u4e3b\u52a8\u6e05\u7406&amp;#<\/p>\n","protected":false},"author":2,"featured_media":81128,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[392,1133,43],"topic":[],"class_list":["post-81129","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-jenkins","tag-servlet","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565\uff1a5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1 - \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\/81129.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565\uff1a5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565&#xff1a;5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1&#x1f4c8; \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u5168\u666f\u6d41\u7a0b\u56fe\u4e00\u3001\u6838\u5fc3\u6982\u5ff5&#xff1a;\u6784\u5efa\u5386\u53f2\u5230\u5e95\u5360\u7528\u4e86\u54ea\u4e9b\u7a7a\u95f4&#xff1f;1. \u6784\u5efa\u5386\u53f2\u7684\u5b58\u50a8\u7ed3\u67842. \u78c1\u76d8\u7a7a\u95f4\u5360\u7528\u5206\u6790\u4e8c\u3001\u7b56\u7565\u4e00&#xff1a;\u5168\u5c40\u81ea\u52a8\u6e05\u7406\u914d\u7f6e&#xff08;\u6700\u57fa\u7840&#xff09;\u64cd\u4f5c\u6b65\u9aa4\u4e09\u3001\u7b56\u7565\u4e8c&#xff1a;Job \u7ea7\u522b\u7684\u4e22\u5f03\u7b56\u7565&#xff08;\u6700\u5e38\u7528&#xff09;\u64cd\u4f5c\u6b65\u9aa4\u56db\u3001\u7b56\u7565\u4e09&#xff1a;Pipeline \u4e2d\u4e3b\u52a8\u6e05\u7406&amp;#\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/81129.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-24T15:50:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724155025-6a6389c1d74f8.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=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/81129.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/81129.html\",\"name\":\"Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565\uff1a5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-24T15:50:26+00:00\",\"dateModified\":\"2026-07-24T15:50:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/81129.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/81129.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/81129.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565\uff1a5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1\"}]},{\"@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":"Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565\uff1a5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1 - \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\/81129.html","og_locale":"zh_CN","og_type":"article","og_title":"Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565\uff1a5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565&#xff1a;5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1&#x1f4c8; \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u5168\u666f\u6d41\u7a0b\u56fe\u4e00\u3001\u6838\u5fc3\u6982\u5ff5&#xff1a;\u6784\u5efa\u5386\u53f2\u5230\u5e95\u5360\u7528\u4e86\u54ea\u4e9b\u7a7a\u95f4&#xff1f;1. \u6784\u5efa\u5386\u53f2\u7684\u5b58\u50a8\u7ed3\u67842. \u78c1\u76d8\u7a7a\u95f4\u5360\u7528\u5206\u6790\u4e8c\u3001\u7b56\u7565\u4e00&#xff1a;\u5168\u5c40\u81ea\u52a8\u6e05\u7406\u914d\u7f6e&#xff08;\u6700\u57fa\u7840&#xff09;\u64cd\u4f5c\u6b65\u9aa4\u4e09\u3001\u7b56\u7565\u4e8c&#xff1a;Job \u7ea7\u522b\u7684\u4e22\u5f03\u7b56\u7565&#xff08;\u6700\u5e38\u7528&#xff09;\u64cd\u4f5c\u6b65\u9aa4\u56db\u3001\u7b56\u7565\u4e09&#xff1a;Pipeline \u4e2d\u4e3b\u52a8\u6e05\u7406&amp;#","og_url":"https:\/\/www.wsisp.com\/helps\/81129.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-24T15:50:26+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724155025-6a6389c1d74f8.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/81129.html","url":"https:\/\/www.wsisp.com\/helps\/81129.html","name":"Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565\uff1a5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-24T15:50:26+00:00","dateModified":"2026-07-24T15:50:26+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/81129.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/81129.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/81129.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Jenkins \u6784\u5efa\u5386\u53f2\u7ba1\u7406\u4e0e\u78c1\u76d8\u6e05\u7406\u5168\u653b\u7565\uff1a5\u6b65\u6839\u6cbb\u670d\u52a1\u5668\u78c1\u76d8\u7206\u6ee1"}]},{"@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\/81129","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=81129"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/81129\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/81128"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=81129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=81129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=81129"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=81129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}