<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jenkins Archives - Philipp Salvisberg&#039;s Blog</title>
	<atom:link href="https://www.salvis.com/blog/tag/jenkins/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.salvis.com/blog/tag/jenkins/</link>
	<description>Database-centric development</description>
	<lastBuildDate>Wed, 08 Nov 2023 11:11:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.salvis.com/blog/wp-content/uploads/2014/04/favicon.png</url>
	<title>Jenkins Archives - Philipp Salvisberg&#039;s Blog</title>
	<link>https://www.salvis.com/blog/tag/jenkins/</link>
	<width>32</width>
	<height>32</height>
</image> 
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/>
<atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/>
<atom:link rel="hub" href="https://websubhub.com/hub"/>
<atom:link rel="self" href="https://www.salvis.com/blog/tag/jenkins/feed/"/>
	<item>
		<title>Names Matter</title>
		<link>https://www.salvis.com/blog/2020/06/21/names-matter/</link>
					<comments>https://www.salvis.com/blog/2020/06/21/names-matter/#comments</comments>
		
		<dc:creator><![CDATA[Philipp Salvisberg]]></dc:creator>
		<pubDate>Sun, 21 Jun 2020 15:00:30 +0000</pubDate>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[accessible_by_clause]]></category>
		<category><![CDATA[Decision Time]]></category>
		<category><![CDATA[Flashback]]></category>
		<category><![CDATA[Flashback Data Archive]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[PL/SQL Cop]]></category>
		<category><![CDATA[SonarQube]]></category>
		<category><![CDATA[Transaction Time]]></category>
		<category><![CDATA[Valid Time]]></category>
		<guid isPermaLink="false">https://www.salvis.com/blog/?p=9890</guid>

					<description><![CDATA[<p>This is one of my favourite quotes: There are only two hard things in Computer Science: cache invalidation and naming things.&#8212; Phil Karlton IT is my daily life. And this quote is so true. Lately, I&#8217;ve been thinking much more than usual about naming, and that names really matter. This led to<span class="excerpt-hellip"> […]</span></p>
<p>The post <a href="https://www.salvis.com/blog/2020/06/21/names-matter/">Names Matter</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This is one of my favourite quotes:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>There are only two hard things in Computer Science: cache invalidation and naming things.<br />&#8212; Phil Karlton</p>
</blockquote>



<p>IT is my daily life. And this quote is so true. Lately, I&#8217;ve been thinking much more than usual about naming, and that names really matter. This led to some refactoring activities.</p>



<h2 class="wp-block-heading">Why Is Naming Important?</h2>



<p>When a person with German mother tongue hears the word &#8220;eagle&#8221;, she or he automatically associates it with a &#8220;hedgehog&#8221;. Simply because the German word for it (&#8220;Igel&#8221;) is pronounced exactly the same. Of course, language skills and the concrete context play a role. The point is, a wrong association is likely. When we give a name to a thing, we basically want to avoid such false associations. In the best case, they are not helpful. In the worst case, this leads to rejection, as the next example shows.</p>



<p>In 1982 Mitsubishi Motors launched a SUV with the name &#8220;Pajero&#8221;. This name had to be changed in some regions, because &#8220;pajero&#8221; means &#8220;wanker&#8221; in Spanish. This example also shows that it is more important what others think about a name than we do.</p>



<p>In IT we have to name many things. Databases, schemas, tables, columns, views, packages, triggers, variables, fields, methods, classes, modules, components, products, etc. etc. Using an established name with a known and accepted definition help others to understand it better.</p>



<p>When we use a name, it is actually associated with a definition and properties, whether we like it or not. When names have a common and widely accepted meaning, it simplifies the communication. For example &#8220;banana&#8221;. Everybody knows what it means. <a href="https://www.merriam-webster.com/dictionary/banana">Merriam-Webster&#8217;s definition</a> is:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>An elongated usually tapering tropical fruit with soft pulpy flesh enclosed in a soft usually yellow rind.</p>
</blockquote>



<p>And I am sure that each of us could add a few characteristics to this definition.</p>



<h2 class="wp-block-heading">Why Is Naming Difficult?</h2>



<p>A name must fulfil many characteristics. For example</p>



<ul class="wp-block-list">
<li>Short</li>



<li>Fitting (naturally relates to the intended meaning, and characteristics)</li>



<li>Easy to spell,&nbsp;pronounce, remember</li>



<li>Not associated with unwanted characteristics</li>



<li>Common and widely accepted meaning and definition, that fits the intention (for names without commercial value)</li>



<li>New, not used already (for marketable names)</li>
</ul>



<p>Depending on context there are some goal conflicts. However, even without a major conflict, it is difficult to name something adequately in the early stages. Because we do not know enough about the thing we want to name. Hence, we use an iterative approach. We name something (e.g. an entity, package or class) and while working on it we find out that the name does not fit (anymore) and we change it. Maybe we split the thing and have to name now two things, etc. etc.</p>



<p>Finding a fitting name means doing some research. How have others named that thing? What is the definition of it? Does it fit 100 percent? This is an interesting and instructive work. In any case, it takes time. And at the time we need a new name, we want it now (e.g. when a wizard asks for a name). We can always rename it later, right? &#8211; Technically yes. And often we do. But the longer we wait, the less likely we are renaming.</p>



<h2 class="wp-block-heading">Are Some Names More Important Than Others?</h2>



<p>Yes. The more visible a name is the more important it is.</p>



<p>For example, the names behind an API are very easy to change. We do not have to ask anyone before changing it. It&#8217;s no problem as long as the API provides the same results. That&#8217;s one of the reasons we strive for tight APIs, right? To get some leeway.</p>



<p>As soon as others are involved, we are not fully in control of the change anymore. For example, when I change a name in one of my blog posts, this change is visible immediately to everyone visiting my blog. But I cannot control the caches of others, like search engines, blog mirrors and other services that copy web content to third-party storages. Remember, cache invalidation is the other hard thing in IT.</p>



<p>As a consequence, before we release an artefact that becomes visible to others, we should take some time to verify the used names. We cannot take back what we&#8217;ve said (at least not completely). However, we are in control of what we say in the future.</p>



<h2 class="wp-block-heading">Banned Names on This Blog</h2>



<p>Some terms (names) were discussed recently (again) due to a series of sad events. I used these terms as well. I never really thought about them as &#8220;bad&#8221;. However, I&#8217;ve changed my mind. I&#8217;m part of the problem. And I do not like it. One thing I can do is to stop using terms, that a large group of people associate with slavery and racism. No big deal, right?</p>



<p>This is another quote I like very much:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>One cannot not communicate<br />&#8212; Paul Watzlawick</p>
</blockquote>



<p>It is difficult to draw a line for certain terms. However, I believe that &#8220;you cannot not decide&#8221;. You decide either explicitly or implicitly. Of course, very seldom something is purely black or white. It&#8217;s much more often a shade of grey. Some decision take some time. And that&#8217;s okay. But it is impossible to postpone a decision forever. At a certain point, it becomes a decision.</p>



<p>So, I decided to decommission some terms on this blog and introduce new ones. Here&#8217;s the list:</p>



<table id="tablepress-16" class="tablepress tablepress-id-16">
<thead>
<tr class="row-1">
	<th class="column-1">Current Term</th><th class="column-2">Decommissioned Term</th><th class="column-3">Context</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">accessible</td><td class="column-2"><del>white listed</del></td><td class="column-3">PL/SQL accessible_by clause</td>
</tr>
<tr class="row-3">
	<td class="column-1">agent</td><td class="column-2"><del>slave</del></td><td class="column-3">Jenkins</td>
</tr>
<tr class="row-4">
	<td class="column-1">exclusion list</td><td class="column-2"><del>blacklist</del></td><td class="column-3">PL/SQL Cop, PL/SQL accessible_by clause</td>
</tr>
<tr class="row-5">
	<td class="column-1">inclusion list</td><td class="column-2"><del>whitelist</del></td><td class="column-3">PL/SQL Cop, PL/SQL accessible_by clause</td>
</tr>
<tr class="row-6">
	<td class="column-1">main</td><td class="column-2"><del>master</del></td><td class="column-3">Git branch</td>
</tr>
<tr class="row-7">
	<td class="column-1">transaction structure data + enterprise structure data</td><td class="column-2"><del>master data</del></td><td class="column-3">Data modeling</td>
</tr>
<tr class="row-8">
	<td class="column-1">worker</td><td class="column-2"><del>slave</del></td><td class="column-3">Oracle DB background process </td>
</tr>
</tbody>
</table>
<!-- #tablepress-16 from cache -->


<p>Finding alternative names was surprisingly easy because others had already done the work and defined alternative names. They existed for years&#8230;</p>



<h3 class="wp-block-heading">Master Data</h3>



<p>However, finding an alternative for <a href="https://en.wikipedia.org/wiki/Master_data">master data</a> was harder. I reached out to my friends on Twitter. And got some helpful feedback. Finally, Robert Marti suggested having a look at <a href="https://www.linkedin.com/in/malcolmchisholm/">Malcolm Chisholm</a>&#8216;s book <a href="https://books.google.ch/books?id=WxtW5SUUAYAC&amp;printsec=frontcover#v=onepage&amp;q&amp;f=false">Managing Reference Data in Enterprise Databases</a>. On page <a href="https://books.google.ch/books?id=WxtW5SUUAYAC&amp;lpg=PP1&amp;pg=PA258#v=onepage&amp;q&amp;f=false">258ff</a> the different data classes are defined and explained. The book is from 2000. In the meantime Malcolm Chisholm has published revised definitions <a href="https://www.topquadrant.com/docs/whitepapers/TopBraid_ReferenceDataManagementWhitepaper-3-18-15.pdf">here</a> and <a href="https://www.topquadrant.com/resources/blogs/semantic-ecosystem-journal/docs/RefDataPrepMCRC-Final060215.pdf">here</a>.</p>



<p>In the next subchapter, I repeat the definition of the data groups defined by Malcolm Chisholm on slide 5 in <a href="https://www.topquadrant.com/resources/blogs/semantic-ecosystem-journal/docs/RefDataPrepMCRC-Final060215.pdf">this deck</a>. I like these definitions and plan to use them in the future.</p>



<h4 class="wp-block-heading">Metadata</h4>



<p>The data that describes all aspects of an enterprise’s information assets, and enables the enterprise to effectively use and manage these assets.</p>



<p><em>Here it is confined to the structure of databases. Found in a database’s system catalog. Sometimes included in database tables.</em></p>



<h4 class="wp-block-heading">Reference Data</h4>



<p>Any kind of data that is used solely to categorize other data found in a database, or solely for relating data in a database to information beyond the boundaries of the enterprise.</p>



<p><em>Codes and descriptions. Tables containing this data usually have just a few rows and columns.</em></p>



<h4 class="wp-block-heading">Transaction Structure Data</h4>



<p>Data that represents the direct participants in a transaction, and which must be present before a transaction fires.</p>



<p><em>The parties to the transactions of the enterprise. E.g. Customer, Product.</em></p>



<h4 class="wp-block-heading">Enterprise Structure Data</h4>



<p>Data that permits business activity to be reported and/or analyzed by business responsibility.</p>



<p><em>Typically, data that describes the structure of the enterprise. E.g. organizational or financial structure.</em></p>



<h4 class="wp-block-heading">Transaction Activity Data</h4>



<p>Data that represents the operations an enterprise carries out.</p>



<p><em>Traditional focus of IT – in many enterprises the only focus.</em></p>



<h4 class="wp-block-heading">Transaction Audit Data</h4>



<p>Data that tracks the life cycle of individual transactions.</p>



<p><em>Includes application logs, database logs, web server logs<span class="s1">.</span></em></p>



<h2 class="wp-block-heading">Summary</h2>



<p>You use a name to simplify communication. A name is a proxy for a longer definition and meaning. If the meaning is badly received by others and especially by the target community, this does not simplify communication. Using a different name sounds like a simple solution. Why not, if changing a name is simple enough?</p>



<p>In this case, I only had to edit a few blog posts. I handled them like typos. This means that I did not add any update information. I also had to register new URL redirects. That was straightforward. However, changing the branch name in 26 GitHub repositories was a bit more work than anticipated, because I also had to change URLs in several related files. For certain GitHub pages, I had to keep a non-default master branch. I suppose that sooner or later GitHub will allow me to get rid of them as well. If I had to change more repositories, I would probably automate this task.</p>



<p>Most of the time I spent finding an alternative name for &#8220;master data&#8221;. In the end, I learned something new and found good names and definitions. That will help me in the future.</p>
<p>The post <a href="https://www.salvis.com/blog/2020/06/21/names-matter/">Names Matter</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.salvis.com/blog/2020/06/21/names-matter/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Continuous Code Quality for PL/SQL with Docker</title>
		<link>https://www.salvis.com/blog/2017/09/24/continuous-code-quality-for-plsql-with-docker/</link>
		
		<dc:creator><![CDATA[Philipp Salvisberg]]></dc:creator>
		<pubDate>Sun, 24 Sep 2017 11:16:49 +0000</pubDate>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Code Analysis]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[PL/SQL Cop]]></category>
		<category><![CDATA[SonarQube]]></category>
		<guid isPermaLink="false">https://www.salvis.com/blog/?p=7733</guid>

					<description><![CDATA[<p>In this blog post, I show step-by-step how to set up a continuous code quality inspection environment for a PL/SQL project hosted on GitHub. I&#8217;m going to use a Docker container for SonarQube and another container for Jenkins. Here is the table of contents of the major steps. In the summary of<span class="excerpt-hellip"> […]</span></p>
<p>The post <a href="https://www.salvis.com/blog/2017/09/24/continuous-code-quality-for-plsql-with-docker/">Continuous Code Quality for PL/SQL with Docker</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this blog post, I show step-by-step how to set up a continuous code quality inspection environment for a PL/SQL project hosted on GitHub. I&#8217;m going to use a Docker container for SonarQube and another container for Jenkins.</p>



<p>Here is the table of contents of the major steps.</p>



<ol class="wp-block-list">
<li><a href="#install_docker">Install Docker</a></li>



<li><a href="#create_sonarqube_and_jenkins_container">Create SonarQube and Jenkins Container</a></li>



<li><a href="#install_plsql_cop_for_sonarqube">Install PL/SQL Cop for SonarQube</a></li>



<li><a href="#install_plsql_cop">Install PL/SQL Cop (Command Line Utility)</a></li>



<li><a href="#configure_sonarqube">Configure SonarQube</a></li>



<li><a href="#configure_jenkins">Configure Jenkins</a></li>



<li><a href="#create_code_analysis_job">Create Code Analysis Job</a></li>



<li><a href="#view_result_in_sonarqube">View the Result in SonarQube</a></li>



<li><a href="#summary">Summary</a></li>
</ol>



<p>In the summary of this post, you find an audio-less video completing the process within 3.5 minutes.</p>



<h2 class="wp-block-heading"><a name="install_docker"></a>1. Install Docker</h2>



<p>I&#8217;m assuming that you already have installed Docker on your machine. If not, download and install the free <a href="https://www.docker.com/community-edition">Docker Community Edition</a>&nbsp;including <a href="https://docs.docker.com/compose/install/#install-compose">Docker Compose</a>. I&#8217;m going to use <a href="https://docs.docker.com/docker-for-mac/install/">Docker for Mac</a>. But you may use <a href="https://docs.docker.com/docker-for-windows/install/">Docker for Windows</a> or a <a href="https://docs.docker.com/engine/installation/#server">Docker server</a> for one of the various supported Linux distributions. It is also possible to use a cloud provider, but the installation procedure will differ slightly.</p>



<p>You are ready for the next steps when the command</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="docker run --rm hello-world" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">run</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--rm</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">hello-world</span></span></code></pre></div>



<p>produces this output</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the &quot;hello-world&quot; image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
   executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
   to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://cloud.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">Hello from Docker!</span></span>
<span class="line"><span style="color: #D4D4D4">This message shows that your installation appears to be working correctly.</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">To generate this message, Docker took the following steps:</span></span>
<span class="line"><span style="color: #D4D4D4">1. The Docker client contacted the Docker daemon.</span></span>
<span class="line"><span style="color: #D4D4D4">2. The Docker daemon pulled the &quot;hello-world&quot; image from the Docker Hub.</span></span>
<span class="line"><span style="color: #D4D4D4">3. The Docker daemon created a new container from that image which runs the</span></span>
<span class="line"><span style="color: #D4D4D4">   executable that produces the output you are currently reading.</span></span>
<span class="line"><span style="color: #D4D4D4">4. The Docker daemon streamed that output to the Docker client, which sent it</span></span>
<span class="line"><span style="color: #D4D4D4">   to your terminal.</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">To try something more ambitious, you can run an Ubuntu container with:</span></span>
<span class="line"><span style="color: #D4D4D4"> $ docker run -it ubuntu bash</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">Share images, automate workflows, and more with a free Docker ID:</span></span>
<span class="line"><span style="color: #D4D4D4"> https://cloud.docker.com/</span></span>
<span class="line"><span style="color: #D4D4D4"></span></span>
<span class="line"><span style="color: #D4D4D4">For more examples and ideas, visit:</span></span>
<span class="line"><span style="color: #D4D4D4"> https://docs.docker.com/engine/userguide/</span></span></code></pre></div>



<p>in your terminal window.</p>



<h2 class="wp-block-heading"><a name="create_sonarqube_and_jenkins_container"></a>2. Create SonarQube and Jenkins Container</h2>



<p>In this step, we create a container for SonarQube and another one for Jenkins. Jenkins will need to communicate with SonarQube. Docker Compose allows us to use hostnames instead of hard-coded IP addresses and to manage all involved containers together in a single YAML configuration file.</p>



<p>Create a &#8220;docker-compose.yml&#8221; file in a &#8220;plsqlcop&#8221; directory. The directory name is used to derive names for containers and volumes. In this case, the volumes will be named &#8220;plsqlcop_sonardata&#8221; and &#8220;plsqlcop_cidata&#8221;. For the container names, the default naming has been overridden.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7">plsqlcop/docker-compose.yml</span><span role="button" tabindex="0" data-code="version: &quot;3.0&quot;
services:
   sonar:
      image: &quot;sonarqube:5.1.2&quot;
      container_name: &quot;sonar&quot;
      environment:
         - SONARQUBE_JDBC_USERNAME=sonar
         - SONARQUBE_JDBC_PASSWORD=sonar
         - SONARQUBE_JDBC_URL=
      ports:
         - &quot;9010:9000&quot;
      volumes:
         - &quot;sonardata:/opt/sonarqube/data&quot;
   ci:
      image: &quot;jenkins/jenkins:2.79&quot;
      container_name: &quot;ci&quot;
      ports:
         - &quot;9020:8080&quot;
      volumes:
         - &quot;cidata:/var/jenkins_home&quot;
volumes:
   sonardata:
      external: false
   cidata:
      external: false" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #569CD6">version</span><span style="color: #D4D4D4">: </span><span style="color: #CE9178">&quot;3.0&quot;</span></span>
<span class="line"><span style="color: #569CD6">services</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #569CD6">sonar</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">image</span><span style="color: #D4D4D4">: </span><span style="color: #CE9178">&quot;sonarqube:5.1.2&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">container_name</span><span style="color: #D4D4D4">: </span><span style="color: #CE9178">&quot;sonar&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">environment</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">         - </span><span style="color: #CE9178">SONARQUBE_JDBC_USERNAME=sonar</span></span>
<span class="line"><span style="color: #D4D4D4">         - </span><span style="color: #CE9178">SONARQUBE_JDBC_PASSWORD=sonar</span></span>
<span class="line"><span style="color: #D4D4D4">         - </span><span style="color: #CE9178">SONARQUBE_JDBC_URL=</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">ports</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">         - </span><span style="color: #CE9178">&quot;9010:9000&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">volumes</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">         - </span><span style="color: #CE9178">&quot;sonardata:/opt/sonarqube/data&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #569CD6">ci</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">image</span><span style="color: #D4D4D4">: </span><span style="color: #CE9178">&quot;jenkins/jenkins:2.79&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">container_name</span><span style="color: #D4D4D4">: </span><span style="color: #CE9178">&quot;ci&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">ports</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">         - </span><span style="color: #CE9178">&quot;9020:8080&quot;</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">volumes</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">         - </span><span style="color: #CE9178">&quot;cidata:/var/jenkins_home&quot;</span></span>
<span class="line"><span style="color: #569CD6">volumes</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #569CD6">sonardata</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">external</span><span style="color: #D4D4D4">: </span><span style="color: #569CD6">false</span></span>
<span class="line"><span style="color: #D4D4D4">   </span><span style="color: #569CD6">cidata</span><span style="color: #D4D4D4">:</span></span>
<span class="line"><span style="color: #D4D4D4">      </span><span style="color: #569CD6">external</span><span style="color: #D4D4D4">: </span><span style="color: #569CD6">false</span></span></code></pre></div>



<p>Make sure you are located in the directory where the &#8220;docker-compose.yml&#8221; file is stored. Then create the containers in the background by running</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="docker-compose up -d" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker-compose</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">up</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-d</span></span></code></pre></div>



<p>You should get an output similar to the following:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="Creating volume &quot;plsqlcop_sonardata&quot; with default driver
Creating volume &quot;plsqlcop_cidata&quot; with default driver
Creating ci ... 
Creating sonar ... 
Creating sonar
Creating sonar ... done" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">Creating volume &quot;plsqlcop_sonardata&quot; with default driver</span></span>
<span class="line"><span style="color: #D4D4D4">Creating volume &quot;plsqlcop_cidata&quot; with default driver</span></span>
<span class="line"><span style="color: #D4D4D4">Creating ci ... </span></span>
<span class="line"><span style="color: #D4D4D4">Creating sonar ... </span></span>
<span class="line"><span style="color: #D4D4D4">Creating sonar</span></span>
<span class="line"><span style="color: #D4D4D4">Creating sonar ... done</span></span></code></pre></div>



<h2 class="wp-block-heading"><a name="install_plsql_cop_for_sonarqube"></a>3. Install PL/SQL Cop for SonarQube</h2>



<p>To install the current version of PL/SQL Cop for SonarQube within the &#8220;sonar&#8221; container run</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="docker exec sonar wget --no-check-certificate https://www.salvis.com/blog?ddownload=6822 -O \
/opt/sonarqube/extensions/plugins/sonar-plsql-cop-plugin-2.1.1.jar" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">exec</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">sonar</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">wget</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--no-check-certificate</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">https://www.salvis.com/blog?ddownload=</span><span style="color: #B5CEA8">6822</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-O</span><span style="color: #D4D4D4"> </span><span style="color: #D7BA7D">\</span></span>
<span class="line"><span style="color: #D4D4D4">/opt/sonarqube/extensions/plugins/sonar-plsql-cop-plugin-2.1.1.jar</span></span></code></pre></div>



<p>Windows users please note, that the \ (backslash) at the end of the first line is just the Unix line-continuation character (as the ` (grave accent) in PowerShell), you should omit it. The wget command will be executed within the sonar container.</p>



<p>To load the plugin we need to restart the container.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="docker restart sonar" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">restart</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">sonar</span></span></code></pre></div>



<h2 class="wp-block-heading"><a name="install_plsql_cop"></a>4. Install PL/SQL Cop (Command Line Utility)</h2>



<p>To install the current version of PL/SQL Cop within the &#8220;ci&#8221; container run</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="docker exec -u 0 ci wget --no-check-certificate https://www.salvis.com/blog/?ddownload=6680 -O /opt/tvdcc.zip
docker exec -u 0 ci unzip /opt/tvdcc.zip -d /opt 
docker exec -u 0 ci bash -c &quot;mv /opt/tvdcc-* /opt/tvdcc&quot;  
docker exec -u 0 ci rm /opt/tvdcc.zip" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">exec</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-u</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">ci</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">wget</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--no-check-certificate</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">https://www.salvis.com/blog/?ddownload=</span><span style="color: #B5CEA8">6680</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-O</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/opt/tvdcc.zip</span></span>
<span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">exec</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-u</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">ci</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">unzip</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/opt/tvdcc.zip</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-d</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/opt</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">exec</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-u</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">ci</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">bash</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-c</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;mv /opt/tvdcc-* /opt/tvdcc&quot;</span><span style="color: #D4D4D4">  </span></span>
<span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">exec</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-u</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">0</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">ci</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">rm</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/opt/tvdcc.zip</span></span></code></pre></div>



<p>Why do we need to install this component in the &#8220;ci&#8221; container and not in the &#8220;sonar&#8221; container? Well, the SonarQube scanner is executed in the &#8220;ci&#8221; container and gets the code analyzer from the SonarQube server. This increases the scalability of the code analyzers since just the analysis reports need to be sent to the SonarQube server. However, the PL/SQL Cop SonarQube plugin is a wrapper to the command line utility. This means that every Jenkins agent needs to have PL/SQL Cop installed in the location configured on the SonarQube server.</p>



<p>In an environment with multiple servers and multiple Jenkins agents, the PL/SQL Cop installations need to be identical on every agent.</p>



<h2 class="wp-block-heading"><a name="configure_sonarqube"></a>5. Configure SonarQube</h2>



<p>Open &#8220;http://localhost:9010&#8221; in your web browser.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-01.png"><img fetchpriority="high" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-01.png" alt="" class="wp-image-7759" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-01.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-01-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-01-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-01-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-01-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-01-100x75.png 100w" sizes="(max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Press &#8220;Log in&#8221; in the upper right corner and login into SonarQube with the username &#8220;admin&#8221; and password &#8220;admin&#8221;.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-02.png"><img decoding="async" width="276" height="216" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-02.png" alt="" class="wp-image-7760" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-02.png 276w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-02-187x146.png 187w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-02-50x39.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-02-96x75.png 96w" sizes="(max-width:767px) 276px, 276px" /></a></figure>



<p>Click on &#8220;Settings&#8221; and the Category &#8220;Trivadis PL/SQL Cop&#8221; and change the &#8220;Path to PL/SQL Cop command line tvdcc executable&#8221; to &#8220;/opt/tvdcc/tvdcc.sh&#8221;.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-03.png"><img decoding="async" width="1024" height="1365" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-03.png" alt="" class="wp-image-7761" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-03.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-03-225x300.png 225w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-03-768x1024.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-03-110x146.png 110w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-03-38x50.png 38w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-03-56x75.png 56w" sizes="(max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Press &#8220;Save Trivadis PL/SQL Cop Settings&#8221; and your done.</p>



<h2 class="wp-block-heading"><a name="configure_jenkins"></a>6. Configure Jenkins</h2>



<p>Open &#8220;http://localhost:9020&#8221; in your web browser.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-01.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-01.png" alt="" class="wp-image-7766" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-01.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-01-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-01-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-01-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-01-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-01-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Jenkins generated during the container creation a password for the user admin. To get this password execute in a terminal window the following:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="docker exec ci cat /var/jenkins_home/secrets/initialAdminPassword" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">docker</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">exec</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">ci</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">cat</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">/var/jenkins_home/secrets/initialAdminPassword</span></span></code></pre></div>



<p>Copy the output into the clipboard and paste it into the &#8220;Administrator password&#8221; field in the browser window and press &#8220;Continue&#8221;.</p>



<p>Press on &#8220;Install Suggested Plugins&#8221;</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-02.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-02.png" alt="" class="wp-image-7767" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-02.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-02-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-02-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-02-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-02-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-02-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Wait until all plugins are installed.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-03.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-03.png" alt="" class="wp-image-7768" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-03.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-03-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-03-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-03-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-03-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-03-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Enter the requested fields and press &#8220;Save and Finish&#8221;. And on the next page Click on &#8220;Start Using Jenkins&#8221;</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-04.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-04.png" alt="" class="wp-image-7769" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-04.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-04-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-04-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-04-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-04-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-04-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Click on &#8220;Mange Jenkins&#8221;.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-12.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-12.png" alt="" class="wp-image-7777" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-12.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-12-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-12-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-12-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-12-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-12-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Click on &#8220;Manage Plugins&#8221;.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-09.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-09.png" alt="" class="wp-image-7775" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-09.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-09-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-09-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-09-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-09-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-09-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Select &#8220;SonarQube Scanner for Jenkins&#8221; in the &#8220;Available&#8221; tab. Use the filter to find the entry. Press &#8220;Install without restart&#8221;.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-10.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-10.png" alt="" class="wp-image-7774" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-10.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-10-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-10-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-10-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-10-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-10-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Click on &#8220;Go back to top page&#8221; when the plugins have been installed successfully.</p>



<p>Click on &#8220;Manage Jenkins&#8221; (again) and then on &#8220;Global Tool Configuration&#8221;.</p>



<p>Within the Global Tool Configuration click on &#8220;Add SonarQube Scanner&#8221;, add a name for the scanner and press &#8220;Save&#8221;.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-15.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-15.png" alt="" class="wp-image-7780" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-15.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-15-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-15-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-15-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-15-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-15-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Click on &#8220;Configure System&#8221;.</p>



<p>Scroll down to the &#8220;SonarQube servers&#8221; section and click on &#8220;Add SonarQube&#8221;.</p>



<p>Enter &#8220;SonarQube 5.1.2&#8221; for name, enter &#8220;http://sonar:9000&#8221; for &#8220;Server URL&#8221;, select &#8220;5.1 or lower&#8221; in &#8220;Server version&#8221; and enter &#8220;jdbc:h2:tcp://sonar/sonar&#8221; for &#8220;Database URL&#8221;. Click on &#8220;Save&#8221; to complete the Jenkins configuration.</p>



<p>Please note, that we are accessing the host sonar via the internal network Docker Compose has set up for us. Therefore we have to use the default port 9000 and not port 9010 which we are using from outside, e.g. to access SonarQube in the web browser.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-19.png"><img loading="lazy" decoding="async" width="1176" height="1680" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-19.png" alt="" class="wp-image-7790" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-19.png 1176w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-19-210x300.png 210w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-19-768x1097.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-19-717x1024.png 717w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-19-102x146.png 102w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-19-35x50.png 35w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-19-53x75.png 53w" sizes="auto, (max-width:767px) 480px, (max-width:1176px) 100vw, 1176px" /></a></figure>



<h2 class="wp-block-heading"><a name="create_code_analysis_job"></a>7. Create Code Analysis Job</h2>



<p>Click on &#8220;create new jobs&#8221;.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-20.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-20.png" alt="" class="wp-image-7792" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-20.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-20-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-20-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-20-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-20-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-20-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Enter &#8220;plscope-utils&#8221; and click on &#8220;Freestyle project&#8221;</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-21.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-21.png" alt="" class="wp-image-7794" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-21.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-21-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-21-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-21-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-21-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-21-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Click on the &#8220;Source Code Management&#8221; tab, select &#8220;Git&#8221;, enter &#8220;https://github.com/PhilippSalvisberg/plscope-utils&#8221; for &#8220;Repository URL&#8221;, add &#8220;Sparse Checkout paths&#8221; in &#8220;Additional Behaviours&#8221;, enter &#8220;database/utils&#8221; for &#8220;Paths&#8221; and click on &#8220;Apply&#8221;.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-22.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-22.png" alt="" class="wp-image-7793" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-22.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-22-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-22-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-22-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-22-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-22-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Click on &#8220;Build Triggers&#8221; tab, select &#8220;Poll SCM&#8221;. Enter &#8220;H/15 * * * *&#8221; for &#8220;Schedule&#8221; and press &#8220;Apply&#8221;. This will look for changes in the Git repository every 15 minutes and starts a build if a change is detected.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-23.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-23.png" alt="" class="wp-image-7795" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-23.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-23-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-23-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-23-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-23-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-23-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Click on &#8220;Build&#8221; tab and Scroll down to the Build section and add a &#8220;Execute SonarQube Scanner&#8221; build step.</p>



<p>Copy the following lines into the &#8220;Analysis properties&#8221;.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" data-code="sonar.projectKey=plscope-utils:main
sonar.projectName=plscope-utils
sonar.projectVersion=0.5.0
sonar.sources=database
sonar.language=plsqlcop" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">sonar.projectKey</span><span style="color: #D4D4D4">=plscope-utils:main</span></span>
<span class="line"><span style="color: #DCDCAA">sonar.projectName</span><span style="color: #D4D4D4">=plscope-utils</span></span>
<span class="line"><span style="color: #DCDCAA">sonar.projectVersion</span><span style="color: #D4D4D4">=0.5.0</span></span>
<span class="line"><span style="color: #DCDCAA">sonar.sources</span><span style="color: #D4D4D4">=database</span></span>
<span class="line"><span style="color: #DCDCAA">sonar.language</span><span style="color: #D4D4D4">=plsqlcop</span></span></code></pre></div>



<p>and click on &#8220;Save&#8221;.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-25.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-25.png" alt="" class="wp-image-7797" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-25.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-25-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-25-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-25-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-25-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-25-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Wait until the initial build is started or click on &#8220;Build Now&#8221; and then on &#8220;#1&#8221; (the first build job in the Build History).</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-26.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-26.png" alt="" class="wp-image-7798" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-26.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-26-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-26-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-26-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-26-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-26-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Click on &#8220;Console Output&#8221;.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-27.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-27.png" alt="" class="wp-image-7799" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-27.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-27-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-27-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-27-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-27-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-27-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>The analysis result has been stored successfully in SonarQube and can now be queried via http://localhost:9010 .</p>



<p>Please note, that the link to SonarQube provided in the console output is not working, since it is referring a port of the internal Docker Compose network which is not accessible to your browser. However, it is possible to configure the external IP address and port for SonarQube in Jenkins and than this link will work.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-28.png"><img loading="lazy" decoding="async" width="1143" height="3465" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-28.png" alt="" class="wp-image-7800" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-28.png 1143w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-28-99x300.png 99w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-28-768x2328.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-28-338x1024.png 338w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-28-48x146.png 48w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-28-16x50.png 16w, https://www.salvis.com/blog/wp-content/uploads/2017/09/ci-28-25x75.png 25w" sizes="auto, (max-width:767px) 480px, (max-width:1143px) 100vw, 1143px" /></a></figure>



<h2 class="wp-block-heading"><a name="view_result_in_sonarqube"></a>8. View the Result in SonarQube</h2>



<p>Open &#8220;http://localhost:9010&#8221; in your web browser.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-04.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-04.png" alt="" class="wp-image-7815" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-04.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-04-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-04-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-04-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-04-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-04-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Click on &#8220;plscope-utils&#8221;, &nbsp;select the &#8220;Issues&#8221; tab for this project and select all rules.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-05.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-05.png" alt="" class="wp-image-7820" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-05.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-05-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-05-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-05-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-05-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-05-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>Click on &#8220;&gt;&#8221; at the right side of an issue to see the source code line causing this issue.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-06.png"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-06.png" alt="" class="wp-image-7818" srcset="https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-06.png 1024w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-06-300x225.png 300w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-06-768x576.png 768w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-06-195x146.png 195w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-06-50x38.png 50w, https://www.salvis.com/blog/wp-content/uploads/2017/09/sonar-06-100x75.png 100w" sizes="auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px" /></a></figure>



<p>See&nbsp;<a href="https://www.sonarqube.org/features/clean-code/">https://www.sonarqube.org/features/clean-code/</a> for more information.</p>



<h2 class="wp-block-heading"><a name="summary"></a>9. Summary</h2>



<p>Setting up a continuous code quality inspection environment for a PL/SQL project with Docker is quite simple. The audio-less video documents the complete process.</p>



<p>Granted, for production use, you need to use a different database as SonarQube backbone, define some roles, manage users and probably integrate an Active Directory. That should not be too difficult, at least not technically.</p>



<p>But the most challenging part will be to agree on some rules, adapt your development process and improve your code quality over time. So, let&#8217;s get started.</p>



<figure class="wp-block-video"><video controls src="https://www.salvis.com/blog/wp-content/uploads/2017/09/Continuous_Code_Quality_for_PLSQL_with_Docker.mp4"></video></figure>
<p>The post <a href="https://www.salvis.com/blog/2017/09/24/continuous-code-quality-for-plsql-with-docker/">Continuous Code Quality for PL/SQL with Docker</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></content:encoded>
					
		
		<enclosure url="https://www.salvis.com/blog/wp-content/uploads/2017/09/Continuous_Code_Quality_for_PLSQL_with_Docker.mp4" length="52523180" type="video/mp4" />

			</item>
	</channel>
</rss>
