{"id":19531,"date":"2024-11-19T16:48:15","date_gmt":"2024-11-19T08:48:15","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19531\/"},"modified":"2024-11-19T16:48:15","modified_gmt":"2024-11-19T08:48:15","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8gitlab%e4%b8%8a%e6%b8%85%e9%99%a4%e4%b8%8d%e9%9c%80%e8%a6%81%e7%9a%84%e5%88%86%e6%94%af%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19531\/","title":{"rendered":"\u5982\u4f55\u5728GitLab\u4e0a\u6e05\u9664\u4e0d\u9700\u8981\u7684\u5206\u652f\u4ee3\u7801"},"content":{"rendered":"<p>\u968f\u7740\u8f6f\u4ef6\u5f00\u53d1\u7684\u4e0d\u65ad\u8fed\u4ee3\uff0c\u4ee3\u7801\u5e93\u4e2d\u7684\u5206\u652f\u6570\u91cf\u53ef\u80fd\u4f1a\u8fc5\u901f\u589e\u52a0\u3002\u8fd9\u4e9b\u5206\u652f\u53ef\u80fd\u662f\u8fc7\u65f6\u7684\uff0c\u4e5f\u53ef\u80fd\u662f\u4e0d\u5fc5\u8981\u7684\uff0c\u4f46\u5b83\u4eec\u4e00\u76f4\u505c\u7559\u5728\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u4e2d\uff0c\u5360\u7528\u4e86\u5b9d\u8d35\u7684\u5b58\u50a8\u7a7a\u95f4\u3002\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9a\u671f\u6e05\u9664\u4e0d\u9700\u8981\u7684\u5206\u652f\u3002<\/p>\n<p>\u4e0b\u9762\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728GitLab\u4e0a\u6e05\u9664\u4e0d\u9700\u8981\u7684\u5206\u652f\u4ee3\u7801\u3002<\/p>\n<p>\u7b2c\u4e00\u6b65\uff1a\u767b\u5f55GitLab\uff0c\u8fdb\u5165\u9700\u8981\u6e05\u7406\u7684\u9879\u76ee<\/p>\n<p>\u9996\u5148\uff0c\u767b\u5f55GitLab\u8d26\u53f7\u3002\u5982\u679c\u60a8\u8fd8\u6ca1\u6709\u8d26\u53f7\uff0c\u8bf7\u5148\u6ce8\u518c\u4e00\u4e2a\u3002<\/p>\n<p>\u767b\u5f55\u540e\uff0c\u8fdb\u5165\u9700\u8981\u8fdb\u884c\u6e05\u7406\u7684\u9879\u76ee\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65\uff1a\u67e5\u770b\u5206\u652f\u5217\u8868\u5e76\u786e\u5b9a\u9700\u8981\u6e05\u7406\u7684\u5206\u652f<\/p>\n<p>\u5728\u9879\u76ee\u7684\u9875\u9762\u4e0a\uff0c\u70b9\u51fb\u201cRepository\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201cBranches\u201d\u9009\u9879\u5361\u3002<\/p>\n<p>\u8fd9\u91cc\u5c06\u663e\u793a\u6240\u6709\u9879\u76ee\u4e2d\u7684\u5206\u652f\u5217\u8868\u3002\u6839\u636e\u9700\u8981\uff0c\u53ef\u4ee5\u67e5\u770b\u6bcf\u4e2a\u5206\u652f\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u4f8b\u5982\u4e0a\u6b21\u66f4\u65b0\u65f6\u95f4\u548c\u8d21\u732e\u8005\u3002<\/p>\n<p>\u6839\u636e\u5206\u652f\u7684\u4f7f\u7528\u60c5\u51b5\uff0c\u53ef\u4ee5\u51b3\u5b9a\u9700\u8981\u4fdd\u7559\u54ea\u4e9b\u5206\u652f\uff0c\u54ea\u4e9b\u5206\u652f\u53ef\u4ee5\u6e05\u9664\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u5df2\u7ecf\u5408\u5e76\u5230\u4e3b\u5206\u652f\u5e76\u4e14\u4e0d\u518d\u4f7f\u7528\u7684\u5206\u652f\u53ef\u4ee5\u88ab\u5220\u9664\u3002<\/p>\n<p>\u7b2c\u4e09\u6b65\uff1a\u5220\u9664\u5206\u652f<\/p>\n<p>\u5728\u786e\u5b9a\u9700\u8981\u5220\u9664\u7684\u5206\u652f\u540e\uff0c\u53ef\u4ee5\u9009\u62e9\u624b\u52a8\u5220\u9664\u6216\u4f7f\u7528GitLab\u7684\u81ea\u52a8\u6e05\u7406\u529f\u80fd\u3002<\/p>\n<p>\u624b\u52a8\u5220\u9664\u5206\u652f\uff1a<\/p>\n<p>\u9009\u4e2d\u9700\u8981\u5220\u9664\u7684\u5206\u652f\uff0c\u70b9\u51fb\u201cDelete\u201d\u6309\u94ae\u3002<\/p>\n<p>\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\uff0c\u8f93\u5165\u786e\u8ba4\u4fe1\u606f\uff0c\u7136\u540e\u70b9\u51fb\u201cDelete branch\u201d\u6309\u94ae\uff0c\u5373\u53ef\u6210\u529f\u5220\u9664\u5206\u652f\u3002<\/p>\n<p>\u81ea\u52a8\u6e05\u7406\u5206\u652f\uff1a<\/p>\n<p>\u5728GitLab\u4e2d\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u5b9a\u671f\u81ea\u52a8\u6e05\u7406\u8fc7\u65f6\u7684\u5206\u652f\u3002\u5728\u9879\u76ee\u7684\u9875\u9762\u4e0a\uff0c\u70b9\u51fb\u201cSettings\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201cGeneral\u201d\u9009\u9879\u5361\uff0c\u627e\u5230\u201cIntegration\u201d\u90e8\u5206\u3002<\/p>\n<p>\u5728\u201cIntegration\u201d\u90e8\u5206\u4e2d\uff0c\u6709\u4e00\u4e2a\u540d\u4e3a\u201cGitLab CI\/CD\u201d \u7684\u9009\u9879\uff0c\u8fd9\u4e2a\u9009\u9879\u63d0\u4f9b\u4e86\u4e00\u4e9b\u6709\u7528\u7684\u81ea\u52a8\u5316\u4efb\u52a1\uff0c\u4f8b\u5982\u81ea\u52a8\u6e05\u7406\u8fc7\u65f6\u7684\u5206\u652f\u3002<\/p>\n<p>\u542f\u7528\u81ea\u52a8\u6e05\u7406\u529f\u80fd\u540e\uff0c\u5206\u652f\u5c06\u5728\u8bbe\u5b9a\u7684\u65f6\u95f4\u5230\u671f\u540e\u88ab\u81ea\u52a8\u5220\u9664\u3002\u8fd9\u6837\uff0c\u65e0\u8bba\u4f55\u65f6\u8fdb\u884c\u7684\u5206\u652f\u5408\u5e76\uff0c\u90fd\u53ef\u4ee5\u907f\u514d\u5b58\u50a8\u7a7a\u95f4\u7684\u6d6a\u8d39\u3002<\/p>\n<p>\u603b\u7ed3<\/p>\n<p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86\u5982\u4f55\u901a\u8fc7\u624b\u52a8\u5220\u9664\u548c\u81ea\u52a8\u6e05\u7406\u7684\u65b9\u5f0f\u6765\u6e05\u7406GitLab\u5b58\u50a8\u7a7a\u95f4\u4e2d\u7684\u4e0d\u5fc5\u8981\u7684\u5206\u652f\u3002\u4e3a\u4e86\u907f\u514d\u5b58\u50a8\u7a7a\u95f4\u7684\u6d6a\u8d39\uff0c\u6211\u4eec\u5e94\u8be5\u5b9a\u671f\u6e05\u9664\u4e0d\u9700\u8981\u7684\u5206\u652f\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5728GitLab\u4e0a\u6e05\u9664\u4e0d\u9700\u8981\u7684\u5206\u652f\u4ee3\u7801\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u968f\u7740\u8f6f\u4ef6\u5f00\u53d1\u7684\u4e0d\u65ad\u8fed\u4ee3\uff0c\u4ee3\u7801\u5e93\u4e2d\u7684\u5206\u652f\u6570\u91cf\u53ef\u80fd\u4f1a\u8fc5\u901f\u589e\u52a0\u3002\u8fd9\u4e9b\u5206\u652f\u53ef\u80fd\u662f\u8fc7\u65f6\u7684\uff0c\u4e5f\u53ef\u80fd\u662f\u4e0d\u5fc5\u8981\u7684\uff0c\u4f46\u5b83\u4eec\u4e00\u76f4\u505c\u7559\u5728\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u4e2d\uff0c\u5360\u7528\u4e86\u5b9d\u8d35\u7684\u5b58\u50a8\u7a7a\u95f4\u3002\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9a\u671f\u6e05\u9664\u4e0d\u9700\u8981\u7684\u5206\u652f\u3002 \u4e0b\u9762\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728GitLab\u4e0a\u6e05\u9664\u4e0d\u9700\u8981\u7684\u5206\u652f\u4ee3\u7801\u3002 \u7b2c\u4e00\u6b65\uff1a\u767b\u5f55GitLab\uff0c\u8fdb\u5165\u9700\u8981\u6e05\u7406\u7684\u9879\u76ee \u9996\u5148\uff0c\u767b\u5f55GitLab\u8d26\u53f7\u3002\u5982\u679c\u60a8\u8fd8\u6ca1\u6709\u8d26\u53f7\uff0c\u8bf7\u5148\u6ce8\u518c\u4e00\u4e2a\u3002 \u767b\u5f55\u540e\uff0c\u8fdb\u5165\u9700\u8981\u8fdb\u884c\u6e05\u7406\u7684\u9879\u76ee\u3002 \u7b2c\u4e8c\u6b65\uff1a\u67e5\u770b\u5206\u652f\u5217\u8868\u5e76\u786e\u5b9a\u9700\u8981\u6e05\u7406\u7684\u5206\u652f \u5728\u9879\u76ee\u7684\u9875\u9762\u4e0a\uff0c\u70b9\u51fb\u201cRepository\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201cBranches\u201d\u9009\u9879\u5361\u3002 \u8fd9\u91cc\u5c06\u663e\u793a\u6240\u6709\u9879\u76ee\u4e2d\u7684\u5206\u652f\u5217\u8868\u3002\u6839\u636e\u9700\u8981\uff0c\u53ef\u4ee5\u67e5\u770b\u6bcf\u4e2a\u5206\u652f\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u4f8b\u5982\u4e0a\u6b21\u66f4\u65b0\u65f6\u95f4\u548c\u8d21\u732e\u8005\u3002 \u6839\u636e\u5206\u652f\u7684\u4f7f\u7528\u60c5\u51b5\uff0c\u53ef\u4ee5\u51b3\u5b9a\u9700\u8981\u4fdd\u7559\u54ea\u4e9b\u5206\u652f\uff0c\u54ea\u4e9b\u5206\u652f\u53ef\u4ee5\u6e05\u9664\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u5df2\u7ecf\u5408\u5e76\u5230\u4e3b\u5206\u652f\u5e76\u4e14\u4e0d\u518d\u4f7f\u7528\u7684\u5206\u652f\u53ef\u4ee5\u88ab\u5220\u9664\u3002 \u7b2c\u4e09\u6b65\uff1a\u5220\u9664\u5206\u652f \u5728\u786e\u5b9a\u9700\u8981\u5220\u9664\u7684\u5206\u652f\u540e\uff0c\u53ef\u4ee5\u9009\u62e9\u624b\u52a8\u5220\u9664\u6216\u4f7f\u7528GitLab\u7684\u81ea\u52a8\u6e05\u7406\u529f\u80fd\u3002 \u624b\u52a8\u5220\u9664\u5206\u652f\uff1a \u9009\u4e2d\u9700\u8981\u5220\u9664\u7684\u5206\u652f\uff0c\u70b9\u51fb\u201cDelete\u201d\u6309\u94ae\u3002 \u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\uff0c\u8f93\u5165\u786e\u8ba4\u4fe1\u606f\uff0c\u7136\u540e\u70b9\u51fb\u201cDelete branch\u201d\u6309\u94ae\uff0c\u5373\u53ef\u6210\u529f\u5220\u9664\u5206\u652f\u3002 \u81ea\u52a8\u6e05\u7406\u5206\u652f\uff1a \u5728GitLab\u4e2d\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u5b9a\u671f\u81ea\u52a8\u6e05\u7406\u8fc7\u65f6\u7684\u5206\u652f\u3002\u5728\u9879\u76ee\u7684\u9875\u9762\u4e0a\uff0c\u70b9\u51fb\u201cSettings\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201cGeneral\u201d\u9009\u9879\u5361\uff0c\u627e\u5230\u201cIntegration\u201d\u90e8\u5206\u3002 \u5728\u201cIntegration\u201d\u90e8\u5206\u4e2d\uff0c\u6709\u4e00\u4e2a\u540d\u4e3a\u201cGitLab CI\/CD\u201d \u7684\u9009\u9879\uff0c\u8fd9\u4e2a\u9009\u9879\u63d0\u4f9b\u4e86\u4e00\u4e9b\u6709\u7528\u7684\u81ea\u52a8\u5316\u4efb\u52a1\uff0c\u4f8b\u5982\u81ea\u52a8\u6e05\u7406\u8fc7\u65f6\u7684\u5206\u652f\u3002 \u542f\u7528\u81ea\u52a8\u6e05\u7406\u529f\u80fd\u540e\uff0c\u5206\u652f\u5c06\u5728\u8bbe\u5b9a\u7684\u65f6\u95f4\u5230\u671f\u540e\u88ab\u81ea\u52a8\u5220\u9664\u3002\u8fd9\u6837\uff0c\u65e0\u8bba\u4f55\u65f6\u8fdb\u884c\u7684\u5206\u652f\u5408\u5e76\uff0c\u90fd\u53ef\u4ee5\u907f\u514d\u5b58\u50a8\u7a7a\u95f4\u7684\u6d6a\u8d39\u3002 \u603b\u7ed3 \u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86\u5982\u4f55\u901a\u8fc7\u624b\u52a8\u5220\u9664\u548c\u81ea\u52a8\u6e05\u7406\u7684\u65b9\u5f0f\u6765\u6e05\u7406GitLab\u5b58\u50a8\u7a7a\u95f4\u4e2d\u7684\u4e0d\u5fc5\u8981\u7684\u5206\u652f\u3002\u4e3a\u4e86\u907f\u514d\u5b58\u50a8\u7a7a\u95f4\u7684\u6d6a\u8d39\uff0c\u6211\u4eec\u5e94\u8be5\u5b9a\u671f\u6e05\u9664\u4e0d\u9700\u8981\u7684\u5206\u652f\u3002 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5728GitLab\u4e0a\u6e05\u9664\u4e0d\u9700\u8981\u7684\u5206\u652f\u4ee3\u7801\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-19531","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=19531"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19531\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}