{"id":801,"date":"2013-12-27T11:30:54","date_gmt":"2013-12-27T10:30:54","guid":{"rendered":"http:\/\/qualilogy.com\/en\/?p=801"},"modified":"2013-12-29T10:30:49","modified_gmt":"2013-12-29T09:30:49","slug":"plsql-analysis-sonarqube-configuration","status":"publish","type":"post","link":"http:\/\/qualilogy.com\/en\/plsql-analysis-sonarqube-configuration\/","title":{"rendered":"PL\/SQL analysis with SonarQube &#8211; Configuration"},"content":{"rendered":"<p><a href=\"http:\/\/500px.com\/Vicken\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-1439\" alt=\"SonarQubePLSQL2\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/12\/SonarQubePLSQL21.jpg\" width=\"299\" height=\"450\" \/><\/a>In the first post of this new series about analysis of PL\/SQL code with SonarQube, we have seen how <a href=\"http:\/\/qualilogy.com\/en\/plsql-analysis-with-sonarqube-organization\/\" target=\"_blank\">I organize my analysis environment<\/a>, with:<\/p>\n<ul>\n<li>a folder C:\\SRC\\ with all my projects,<\/li>\n<li>a sub-directory dedicated to each project,<\/li>\n<li>different other sub-directories, including one \u2018..\\Source\u2019 containing the source code to be analyzed.<\/li>\n<\/ul>\n<p>In the case of our PL\/SQL analysis, this will therefoe be placed in the folder \u2019C:\\SRC\\Demo\\PLSQL\\Source\u2019.<\/p>\n<p>Let&#8217;s see no how to create and configure a SonarQube analysis of this code, with Jenkins.<!--more--><\/p>\n<h2>Creation of the Jenkins job<\/h2>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/12\/JenkinsNewJob.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-1445\" alt=\"JenkinsNewJob\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/12\/JenkinsNewJob.jpg\" width=\"153\" height=\"120\" \/><\/a>I will present these steps precisely but without very much details or comments because we&#8217;ve done this many times already. I will of course make sure that the (Windows) services Sonar and Jenkins are started. Then we launch Jenkins, and in the main page, we will activate the link \u2018New Job\u2019.<br \/>\n<a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/12\/JenkinsNewJob1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1446\" alt=\"JenkinsNewJob1\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/12\/JenkinsNewJob1.jpg\" width=\"307\" height=\"106\" \/><\/a><\/p>\n<p>In the page of creation of the new project, we will select the option \u2018Build a free-style software project\u2019 (<span class=\"long_text\" id=\"result_box\" lang=\"en\"><span title=\"Dans la page de cr\u00e9ation du nouveau projet, nous allons s\u00e9lectionner 'Build a free-style software project' (ou l'option correspondante en fonction du langage que vous utilisez avec Jenkins).\">or the corresponding option depending on the language you use with Jenkins<\/span><\/span>).<\/p>\n<p><span class=\"long_text\" id=\"result_box\" lang=\"en\"><span title=\"Nous entrons le nom du nouveau projet.\">We enter the new project name . <\/span><span title=\"Notez que vous ne pouvez pas utiliser un nom de job existant.\">Note that you can not use the name of an existing job.<\/span><\/span><\/p>\n<p><span title=\"Une autre mani\u00e8re de proc\u00e9der serait de choisir l'option 'Copy existing Job' afin de r\u00e9cup\u00e9rer la configuration d'un job existant, et n'avoir \u00e0 changer que les param\u00e8tres qui nous int\u00e9ressent.\">Another approach would be to choose the option &#8216;Copy Existing Job&#8217; to retrieve the configuration of an existing job, and then changing the parameters we wish to be different.<\/span><\/p>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/12\/JenkinsAddSonar1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-1458\" alt=\"JenkinsAddSonar\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/12\/JenkinsAddSonar1.jpg\" width=\"298\" height=\"131\" \/><\/a>In the page of configuration of the project (\u2018Jenkins &gt; PLSQL_Demo &gt; configuration\u2019 in my example), we will choose a unique \u2018Build step\u2019 (step in the execution of the job) that will consist of a Sonar analysis.<\/p>\n<p>In this page, I will define all the parameters (properties) necessary to analyze our PL\/SQL code with SonarQube.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/12\/SonarPLSQLConfiguration.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1450\" alt=\"SonarPLSQLConfiguration\" src=\"http:\/\/qualilogy.com\/fr\/wp-content\/uploads\/sites\/2\/2013\/12\/SonarPLSQLConfiguration.jpg\" width=\"584\" height=\"305\" \/><\/a><\/p>\n<p><span class=\"long_text\" id=\"result_box\" lang=\"en\"><span title=\"Je ne vais pas rentrer dans les d\u00e9tails : nous avons d\u00e9j\u00e0 vu par le pass\u00e9 plusieurs exemples de configuration d'analyse.\">I will not go into details, as we have already seen in the past several examples of analysis. <\/span><span title=\"Notons simplement :\">Simply note:<\/span><\/span><\/p>\n<ul>\n<li>The mandatory parameters: key and name of the project, and its version. I can easily change this version number from Jenkins.<\/li>\n<li>The folder with the different sub-directories of our project : \u2019C:\\SRC\\Demo\\PLSQL\u2019, and in this folder, the sub-directory with the source code to analyze.<\/li>\n<li>And sure, the technology of this code, so that SonarQube can know wich &#8216;language&#8217; plugin to use.<\/li>\n<\/ul>\n<p>In the page <a href=\"http:\/\/docs.codehaus.org\/display\/SONAR\/SonarQube+Project+Examples\" target=\"_blank\">http:\/\/docs.codehaus.org\/display\/SONAR\/SonarQube+Project+Examples<\/a> on the SonarSource website, you will will get different samples of &#8216;sonar-project.properties&#8217; files for different technologies, so that you can avoid to forget a parameter.<\/p>\n<p>And that&#8217;s it. We save the configuration of our job, we execute it &#8230; and then we just have to give a look at the results in SonarQube .<\/p>\n<p>This we will do in our next post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the first post of this new series about analysis of PL\/SQL code with SonarQube, we have seen how I organize my analysis environment, with: a folder C:\\SRC\\ with all my projects, a sub-directory dedicated to each project, different other sub-directories, including one \u2018..\\Source\u2019 containing the source code to be analyzed. In the case of [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-801","post","type-post","status-publish","format-standard","hentry","category-sonarqube-plsql"],"_links":{"self":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts\/801"}],"collection":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/comments?post=801"}],"version-history":[{"count":10,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts\/801\/revisions"}],"predecessor-version":[{"id":815,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts\/801\/revisions\/815"}],"wp:attachment":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/media?parent=801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/categories?post=801"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/tags?post=801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}