{"id":820,"date":"2023-03-03T22:24:10","date_gmt":"2023-03-03T14:24:10","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=820"},"modified":"2023-04-29T16:52:32","modified_gmt":"2023-04-29T08:52:32","slug":"jenkins-build-github-project","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/03\/jenkins-build-github-project\/","title":{"rendered":"Jenkins\u6784\u5efaGitHub\u9879\u76ee"},"content":{"rendered":"<h2>\u521b\u5efa GitHub \u9879\u76ee\u7684\u6784\u5efa<\/h2>\n<h3>\u65b0\u5efa\u9879\u76ee<\/h3>\n<p>\u5728 Jenkins \u9996\u9875\uff0c\u70b9\u51fb <strong>\u65b0\u5efa<\/strong>\u3002\u8bbe\u7f6e\u9879\u76ee\u540d\u79f0\uff1aGitHub Project<\/p>\n<p>\u9009\u62e9 <strong>\u6784\u5efa\u4e00\u4e2a\u81ea\u7531\u98ce\u683c\u7684\u8f6f\u4ef6\u9879\u76ee<\/strong><\/p>\n<p><!-- more --><\/p>\n<h3>\u6dfb\u52a0 GitHub \u4e0a\u7684\u9879\u76ee<\/h3>\n<p>\u52fe\u9009 <strong>GitHub Project<\/strong> \u9009\u9879<\/p>\n<ul>\n<li>Project url\uff1a\u8bbe\u7f6e github \u7684\u9879\u76ee\u5730\u5740\u3002<\/li>\n<\/ul>\n<h3>\u8bbe\u7f6eGit<\/h3>\n<p>\u52fe\u9009 <strong>Git<\/strong> \u9009\u9879<\/p>\n<ul>\n<li>Repository URL: \u586b\u5199 GitHub \u9879\u76ee\u5730\u5740<\/li>\n<li>credentials\uff1a\u8bbe\u7f6e\u8d44\u683c\u8bc1\u4e66\uff0c\u542c\u8fc7 <code>add<\/code> \u6dfb\u52a0\u8d26\u53f7<\/li>\n<li>Branch Specifier(blank for &#8216;any&#8217;)\uff1a\u9ed8\u8ba4 <code>*\/master<\/code> \u4e0d\u7528\u4fee\u6539<\/li>\n<\/ul>\n<h3>\u8bbe\u7f6e\u89e6\u53d1\u6761\u4ef6<\/h3>\n<ul>\n<li>Github hook trigger for GITScm polling\uff08\u89e6\u53d1 GitHub \u9879\u76ee\u8f6e\u8be2\uff09\uff0c\u52fe\u9009<\/li>\n<li>Poll SCM\uff0c\u52fe\u9009<\/li>\n<\/ul>\n<p>\u8bbe\u7f6e\u6bcf\u4e24\u5206\u949f\u68c0\u6d4b\u4e00\u6b21\u9879\u76ee\u66f4\u65b0<\/p>\n<pre><code>H\/2 * * * *<\/code><\/pre>\n<h3>\u6dfb\u52a0\u6784\u5efa\u547d\u4ee4<\/h3>\n<p>\u9009\u62e9 <strong>Execute Windows batch command<\/strong>\uff0c\u6dfb\u52a0\u8fd0\u884c\u9879\u76ee\u6d4b\u8bd5\u7528\u4f8b\u7684\u547d\u4ee4\u3002<\/p>\n<p>\u9879\u76ee\u521b\u5efa\u5b8c\u6210\uff0c\u70b9\u51fb <strong>\u4fdd\u5b58<\/strong>\u3002<\/p>\n<h2>\u6784\u5efa GitHub \u9879\u76ee<\/h2>\n<h3>\u63d0\u4ea4\u9879\u76ee\u7248\u672c<\/h3>\n<p>\u4fee\u6539\u5f00\u6e90\u9879\u76ee\uff0c\u5e76\u63d0\u4ea4\u4ee3\u7801\u5230 GitHub\u3002<\/p>\n<h3>\u6784\u5efa\u5e76\u67e5\u770b\u65e5\u5fd7<\/h3>\n<p>\u901a\u8fc7 Jenkins \u91cd\u65b0\u6784\u5efa\u5e76\u67e5\u770b\u9879\u76ee\u6784\u5efa\u5386\u53f2\u53ca\u65e5\u5fd7\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u521b\u5efa GitHub \u9879\u76ee\u7684\u6784\u5efa \u65b0\u5efa\u9879\u76ee \u5728 Jenkins \u9996\u9875\uff0c\u70b9\u51fb \u65b0\u5efa\u3002\u8bbe\u7f6e\u9879\u76ee\u540d\u79f0\uff1aGitHub P [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91],"tags":[92],"class_list":["post-820","post","type-post","status-publish","format-standard","hentry","category-ci-cd","tag-jenkins"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=820"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/820\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}