{"id":86347,"date":"2020-05-14T14:51:14","date_gmt":"2020-05-14T06:51:14","guid":{"rendered":"http:\/\/4563.org\/?p=86347"},"modified":"2020-05-14T14:51:14","modified_gmt":"2020-05-14T06:51:14","slug":"golang-%e7%94%9f%e4%ba%a7%e4%b8%8a%e5%a6%82%e4%bd%95%e9%83%a8%e7%bd%b2%e5%8f%91%e5%b8%83%e7%9a%84%ef%bc%9f%e9%85%8d%e5%90%88-jenkins-%e7%9a%84%e4%b8%80%e4%b8%aa%e6%b5%81%e7%a8%8b%e6%98%af%e6%80%8e","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=86347","title":{"rendered":"golang \u751f\u4ea7\u4e0a\u5982\u4f55\u90e8\u7f72\u53d1\u5e03\u7684\uff1f\u914d\u5408 jenkins \u7684\u4e00\u4e2a\u6d41\u7a0b\u662f\u600e\u6837\u7684"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  golang \u751f\u4ea7\u4e0a\u5982\u4f55\u90e8\u7f72\u53d1\u5e03\u7684\uff1f\u914d\u5408 jenkins \u7684\u4e00\u4e2a\u6d41\u7a0b\u662f\u600e\u6837\u7684               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wq67200976 <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u719f\u6089 PHP \u548c jenkins \u7684\u4e00\u5957\u6d41\u7a0b\uff0c\u60f3\u8981\u4e86\u89e3\u4e0b Golang \u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u7684\u90e8\u7f72\u53d1\u5e03\u6d41\u7a0b\uff1f\u53ea\u662f\u5355\u5e94\u7528\uff0c\u6ca1\u6709\u7528\u5230 docker<\/p>\n<p>go \u7684\u9879\u76ee\u4e2d\u5305\u7ba1\u7406\u662f\u4f7f\u7528 Go_Module \u7684\uff0c\u4ee3\u7801\u5e93\u4e2d\u9700\u8981\u4e0a\u4f20 vendor \u6587\u4ef6\u5939\u5417\uff1f\u8fd8\u662f\u8bf4\u5728\u6253\u5305\u7684\u670d\u52a1\u5668\u914d\u7f6e\u597d\u73af\u5883\u540e\uff0cjenkins \u62c9\u5b8c\u4ee3\u7801\u540e\u6267\u884c go mod download\uff0cgo mod vendor \u6700\u540e\u5728 build \u540e\u628a\u4e8c\u8fdb\u5236\u53d1\u5230\u5176\u4ed6\u670d\u52a1\u5668\u3002 \u63cf\u8ff0\u7684\u53ef\u80fd\u4e0d\u51c6\u786e\uff0c\u8bf7\u6559\u4e00\u4e0b\u5927\u5bb6\u5927\u81f4\u7684\u4e00\u4e2a\u6d41\u7a0b<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>4<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1488065\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : blackboom <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             go build main.go \u4f1a\u81ea\u52a8\u4e0b\u8f7d\u4f9d\u8d56\u5e76\u7f16\u8bd1\u51fa\u76ee\u6807\u5e73\u53f0\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u540e\u9762\u5c06\u53ef\u6267\u884c\u6587\u4ef6\u5206\u53d1\u5230\u5404\u670d\u52a1\u5668\u8fdb\u884c\u7248\u672c\u66f4\u65b0\uff0c\u4ee5\u4e0a\u65b9\u5f0f\u8f83\u4e3a\u539f\u59cb\u3002<\/p>\n<p>\u5373\u7528 Docker \u7684\u591a\u6b65\u6784\u5efa\u6bd4\u8f83\u4f18\u96c5\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1488066\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cnbattle <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e2a\u4eba\u7528 gitea drone \u505a\u7684 , \u81ea\u52a8 scp \u5230\u670d\u52a1\u5668\uff0c\u91cd\u542f\u5bf9\u5e94\u670d\u52a1,\u6ca1\u7528 docker                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1488067\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : qloog <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1 \u3001\u4e13\u95e8\u627e\u4e00\u53f0\u673a\u5668 git pull \u4e0b\u6765\u4ee3\u7801\u540e<br \/>2 \u3001\u7f16\u8bd1<br \/>3 \u3001\u5c06\u7f16\u8bd1\u540e\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u548c\u914d\u7f6e\u6587\u4ef6\u901a\u8fc7 rsync \u7684\u65b9\u5f0f\u540c\u6b65\u5230\u76ee\u6807\u673a\u5668(\u4e00\u822c\u662f\u591a\u53f0)<br \/>4 \u3001\u5728\u76ee\u6807\u673a\u5668\u4e0a \u4f7f\u7528 Supervisord \u91cd\u542f go \u670d\u52a1<br \/>5 \u3001\u4e0a\u7ebf\u5b8c\u6210                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1488068\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kaifang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e2a\u4eba\u4f7f\u7528\u7684\u662f\u81ea\u5efa gitlab\uff0c\u7528 gitlab ci \u90e8\u7f72\uff0c\u5728\u76ee\u6807\u673a\u88c5 gitlab-ci\uff0cdocker\uff0cgit push \u81ea\u52a8\u89e6\u53d1\u7f16\u8bd1\u3001\u6d4b\u8bd5\u3001\u90e8\u7f72\u3002\u73af\u5883\u914d\u7f6e\u597d\u4e4b\u540e\u5f88\u65b9\u4fbf\uff0c\u7f51\u9875\u4e0a\u4e5f\u5f88\u65b9\u4fbf\u56de\u6eda\u7248\u672c\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>golang \u751f\u4ea7\u4e0a\u5982\u4f55\u90e8\u7f72\u53d1\u5e03\u7684&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/86347"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=86347"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/86347\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=86347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=86347"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=86347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}