﻿{"id":923,"date":"2022-12-12T15:39:07","date_gmt":"2022-12-12T07:39:07","guid":{"rendered":"http:\/\/blog.sway.com.cn\/?p=923"},"modified":"2022-12-12T15:50:30","modified_gmt":"2022-12-12T07:50:30","slug":"sonarqube7-8%e4%b8%8egitlab%e9%9b%86%e6%88%90-sso-%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%8d%95%e7%82%b9%e7%99%bb%e5%bd%95","status":"publish","type":"post","link":"http:\/\/blog.sway.com.cn\/?p=923","title":{"rendered":"SonarQube7.8\u4e0eGitLab\u96c6\u6210 SSO \u63d2\u4ef6\u5b9e\u73b0\u5355\u70b9\u767b\u5f55"},"content":{"rendered":"\n<p>\u901a\u8fc7\u6b64\u96c6\u6210\uff0c\u60a8\u5c06\u80fd\u591f\uff1a<\/p>\n\n\n\n<p>\u4f7f\u7528 GitLab \u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1- \u4f7f\u7528\u60a8\u7684 GitLab \u51ed\u636e\u767b\u5f55 SonarQube\u3002<br>\u5bfc\u5165\u60a8\u7684 GitLab \u9879\u76ee- \u5c06\u60a8\u7684 GitLab \u9879\u76ee\u5bfc\u5165 SonarQube \u4ee5\u8f7b\u677e\u8bbe\u7f6e SonarQube \u9879\u76ee\u3002<br>\u4f7f\u7528 GitLab CI\/CD \u5206\u6790\u9879\u76ee- \u5c06\u5206\u6790\u96c6\u6210\u5230\u60a8\u7684\u6784\u5efa\u7ba1\u9053\u4e2d\u3002\u4eceDeveloper Edition\u5f00\u59cb\uff0c\u5728 GitLab CI\/CD \u4f5c\u4e1a\u4e2d\u8fd0\u884c\u7684 SonarScanners \u53ef\u4ee5\u81ea\u52a8\u68c0\u6d4b\u6b63\u5728\u6784\u5efa\u7684\u5206\u652f\u6216\u5408\u5e76\u8bf7\u6c42\uff0c\u56e0\u6b64\u60a8\u65e0\u9700\u4e13\u95e8\u5c06\u5b83\u4eec\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9\u626b\u63cf\u4eea\u3002<br>\u5c06\u60a8\u7684 Quality Gate \u72b6\u6001\u62a5\u544a\u7ed9\u60a8\u7684\u5408\u5e76\u8bf7\u6c42-\uff08\u793e\u533a\u7248\u6ca1\u6709\u8be5\u529f\u80fd\uff09\u76f4\u63a5\u5728 GitLab \u4e2d\u67e5\u770b\u60a8\u7684 Quality Gate \u548c\u4ee3\u7801\u6307\u6807\u7ed3\u679c\uff0c\u4ee5\u4fbf\u60a8\u77e5\u9053\u5408\u5e76\u66f4\u6539\u662f\u5426\u5b89\u5168\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>sonarqube \u652f\u6301\u591a\u79cd\u8ba4\u8bc1\u767b\u5f55\u65b9\u5f0f\uff0c\u5982\u679c\u4f7f\u7528\u81ea\u5e26\u7684\u8d26\u53f7\u4f53\u7cfb\uff0c\u9700\u8981\u7ba1\u7406\u5458\u4e00\u4e2a\u4e2a\u6dfb\u52a0\u8d26\u53f7\uff0c\u4f7f\u7528\u8d77\u6765\u591a\u6709\u4e0d\u4fbf\u3002\u4e0d\u8fc7\u4e00\u822c\u516c\u53f8\u90fd\u90e8\u7f72\u4e86\u79c1\u6709\u5316\u7684 Gitlab\uff0c\u6211\u4eec\u53ef\u4ee5\u5229\u7528\u79c1\u6709\u7684 gitlab \u8d26\u53f7\u6765\u767b\u5f55 Sonarqube\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5728gitlab\u521b\u5efa\u4e00\u4e2asonar\u5e94\u7528<\/h2>\n\n\n\n<p>\u6ce8\u610f\u52fe\u9009\u9879\uff01\u53e6\u5916\u6d82\u62b9\u6389\u7684\u662f\u60a8sonar\u7684\u5730\u5740\uff0c\/oauth2\/callback\/gitlab \u662f\u56fa\u5b9a\u7684\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-14.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"572\" src=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-14-1024x572.png\" alt=\"\" class=\"wp-image-930\" srcset=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-14-1024x572.png 1024w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-14-300x168.png 300w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-14-768x429.png 768w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-14-1536x858.png 1536w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-14.png 1644w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8bbe\u7f6e\u5e94\u7528\u7684\u6743\u9650\uff1a\u6ce8\u610fread_user\u662f\u5fc5\u987b\u7684\u3002<\/figcaption><\/figure>\n\n\n\n<p>\u4fdd\u5b58\u540e\u53ef\u4ee5\u62ff\u5230\u5e94\u7528id\u3001\u5bc6\u7801\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"565\" src=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-10-1024x565.png\" alt=\"\" class=\"wp-image-925\" srcset=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-10-1024x565.png 1024w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-10-300x165.png 300w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-10-768x424.png 768w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-10.png 1039w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u5bf9sonar\u5b89\u88c5gitlab\u7684\u8ba4\u8bc1\u767b\u5f55\u63d2\u4ef6<\/h2>\n\n\n\n<p><a href=\"https:\/\/www.sonarplugins.com\/authgitlab\">https:\/\/www.sonarplugins.com\/authgitlab<\/a><\/p>\n\n\n\n<p>\u8fdb\u5165\u4ee5\u4e0a\u7f51\u5740\u4e0b\u8f7d\u63d2\u4ef6\u5e76\u653e\u5230sonar\u5b89\u88c5\u76ee\u5f55\u7684\/extensions\/plugins\u4e0b\uff0c\u7136\u540e\u91cd\u542f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u767b\u5f55sonar\u7684web\u754c\u9762\u8bbe\u7f6egitlab<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-13.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"785\" src=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-13-1024x785.png\" alt=\"\" class=\"wp-image-928\" srcset=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-13-1024x785.png 1024w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-13-300x230.png 300w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-13-768x589.png 768w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-13.png 1471w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">\u8bb0\u5f97\u52fe\u9009\u4e0a\u56fe\u4e2d\u6240\u793a\u7684\u4e24\u4e2a\u8bbe\u7f6e\uff0c\u5426\u5219\u4e0d\u751f\u6548\u3002<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u8bbe\u7f6esonar\u7684\u5730\u5740\u7528\u4e8e\u6388\u6743\u540e\u7684\u8fd4\u56de\u8df3\u8f6c<\/h2>\n\n\n\n<p>\u5728\u201c\u901a\u7528\u201d\u91cc\u9762\u627e\u5230\u5982\u4e0b\u56fe\u6240\u793a\u7684\u8bbe\u7f6e\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" width=\"848\" height=\"160\" src=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-12.png\" alt=\"\" class=\"wp-image-927\" srcset=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-12.png 848w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-12-300x57.png 300w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-12-768x145.png 768w\" sizes=\"auto, (max-width: 848px) 100vw, 848px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u9a8c\u8bc1\u6548\u679c<\/h2>\n\n\n\n<p>\u6ce8\u9500\u8d26\u53f7\u540e\uff0c\u518d\u6b21\u8fdb\u5165\u767b\u5f55\u754c\u9762\u4fbf\u53ef\u4ee5\u770b\u5230\u6548\u679c\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-15.png\"><img loading=\"lazy\" decoding=\"async\" width=\"323\" height=\"229\" src=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-15.png\" alt=\"\" class=\"wp-image-936\" srcset=\"http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-15.png 323w, http:\/\/blog.sway.com.cn\/wp-content\/uploads\/2022\/12\/image-15-300x213.png 300w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u5176\u4ed6<\/h2>\n\n\n\n<p>\u4f7f\u7528gitlab\u8d26\u53f7\u767b\u5f55\u540e\uff0c\u5bf9\u5e94gitlab\u8d26\u53f7\u5728sonar\u4e2d\u4fbf\u4f1a\u6709\u8be5\u7528\u6237\u6570\u636e\uff0c\u6b64\u65f6\u7528admin\u8bbe\u7f6e\u65b0\u7684\u7ba1\u7406\u5458\u540e\uff0c\u5c31\u53ef\u4ee5\u7528\u8d4b\u4e88\u4e86sonar\u7ba1\u7406\u5458\u6743\u9650\u7684gitlab\u8d26\u53f7\u767b\u5f55\u5e76\u628a\u9ed8\u8ba4\u7684admin\u8d26\u53f7\u6ce8\u9500\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7\u6b64\u96c6\u6210\uff0c\u60a8\u5c06\u80fd\u591f\uff1a \u4f7f\u7528 GitLab \u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1- \u4f7f\u7528\u60a8\u7684 GitLab \u51ed\u636e\u767b\u5f55 SonarQub [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-923","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=923"}],"version-history":[{"count":6,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/923\/revisions"}],"predecessor-version":[{"id":938,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/923\/revisions\/938"}],"wp:attachment":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=923"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}