<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://mehmandarov.com/tag/build-and-deploy/feed.xml" rel="self" type="application/atom+xml"/><link href="https://mehmandarov.com/tag/build-and-deploy/" rel="alternate" type="text/html"/><updated>2016-07-23T08:26:00+02:00</updated><id>https://mehmandarov.com/tag/build-and-deploy/feed.xml</id><title type="html">Rustam Mehmandarov - tag: build and deploy</title><subtitle type="text">Posts tagged &quot;build and deploy&quot; on Rustam Mehmandarov.</subtitle><author><name>Rustam Mehmandarov</name></author><entry><title type="html">Five Pillars of a Good Maven Project</title><link href="https://mehmandarov.com/five-pillars-of-a-good-maven-project/" rel="alternate" type="text/html" title="Five Pillars of a Good Maven Project"/><published>2016-07-23T08:26:00+02:00</published><updated>2016-07-23T08:26:00+02:00</updated><id>https://mehmandarov.com/five-pillars-of-a-good-maven-project</id><content type="html" xml:base="https://mehmandarov.com/five-pillars-of-a-good-maven-project/"><![CDATA[<p><em>What makes a Maven project good to work with and easy to maintain? There are five types of Maven plugins that will simplify the development process and increase maintainability of a project.</em></p>

<ul>
  <li><a href="#1-technical-aspects">1. Technical Aspects</a></li>
  <li><a href="#2-legal-aspects">2. Legal Aspects</a></li>
  <li><a href="#3-rapid-development">3. Rapid Development</a></li>
  <li><a href="#4-documentation">4. Documentation</a></li>
  <li><a href="#5-testing-and-qa">5. Testing and QA</a></li>
  <li><a href="#bonus-video">Bonus: Video</a></li>
</ul>

<hr />

<p><a href="https://maven.apache.org/">Apache Maven</a> is a build automation tool used primarily for Java projects. It has been around for a while, and it does not seem to be going anywhere anytime soon (whether some of you like it or not). Recently, it has been confirmed yet again, this time in ZeroTurnaround&#8217;s <a href="http://zeroturnaround.com/rebellabs/java-tools-and-technologies-landscape-2016-trends/">Java Tools and Technologies Landscape Report 2016</a> (see the <em>Build Tools</em> section).</p>

<p>The good thing about Maven is that you can do almost anything with it and its plugins. With such a great ecosystem of plugins, able to do nearly anything, one might wonder where to begin when setting up a new Maven project or improving your old one.</p>

<p>I usually like to think of five main categories &#8211; or pillars &#8211; that we will be looking into in this post. Each category will have a set of example plugins that are meant to serve merely as a starting point.</p>

<p>In this post, I will assume that you have some experience with build tools in general and Maven in particular.</p>

<hr />

<h2 id="1-technical-aspects">1. Technical Aspects</h2>

<p>First of all, you would like to make sure that all the technical stuff is in place. You might want to automate the packaging, the checks if the project is running the latest version of all artifacts, that all the dependencies are met, and that the unused dependencies are removed. You might even want to define your own rules for all the things that cause troubles, or just simply annoy you down the line, making the build fail if they are not met.</p>

<p>With all that automation in place, you will be getting predictable results and nice packaging from the first day of the project.</p>

<p>Some of the plugins that should be mentioned here:</p>

<ul>
  <li><strong><a href="http://www.mojohaus.org/versions-maven-plugin/">Versions</a> plugin</strong> does the versions management of artifacts in a project&#8217;s POM file</li>
  <li><strong><a href="http://maven.apache.org/plugins/maven-dependency-plugin/">Dependency</a> plugin</strong> helps you analyzing dependencies, building dependency trees, showing unused dependencies, etc</li>
  <li><strong><a href="http://maven.apache.org/plugins/maven-assembly-plugin/">Assembly</a> plugin</strong> helps you packaging all the dependencies, modules, site documentation, and other files into a single distributable archive</li>
  <li><strong><a href="http://maven.apache.org/enforcer/maven-enforcer-plugin/">Enforcer</a> plugin</strong> lets you make your own rules! You can set up your build to break if some of your requirements are not met</li>
</ul>

<hr />

<h2 id="2-legal-aspects">2. Legal Aspects</h2>

<p>With all the technical stuff out of the way, we might want to make sure that the legal side is taken care of as well.</p>

<p>Yes, I know, it might be less fun thinking about licenses than writing code, but it is still something that has to be done. You still have to release your code under some kind of license, and you will have to make sure that the third-party licenses do not violate your own licensing. So, why not leave that job to a plugin?</p>

<p>The following plugin will manage the license of a maven project and its dependencies; it will also update file headers, download dependency licenses, check third-party licenses, etc.</p>

<ul>
  <li><strong><a href="http://www.mojohaus.org/license-maven-plugin/">License</a> plugin</strong></li>
</ul>

<hr />

<h2 id="3-rapid-development">3. Rapid Development</h2>

<p>Now, back to coding. Or even better &#8211; to seeing the results of your hard work. The chances are that you will need some kind of web or application server for running your code, and you want to able to deploy to that server in no time. Another kind of plugins that will be helping you from the very first day of the project.</p>

<p>Some of the plugins that can be mentioned here:</p>

<ul>
  <li><strong><a href="http://tomcat.apache.org/maven-plugin.html">Apache Tomcat</a> plugin</strong></li>
  <li><strong><a href="https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-maven-plugin">Jetty</a> plugin</strong></li>
  <li><strong><a href="https://docs.jboss.org/wildfly/plugins/maven/latest/">WildFly</a> plugin</strong></li>
  <li><em>&#8230;or any other deploy plugin, depending on your application</em></li>
</ul>

<hr />

<h2 id="4-documentation">4. Documentation</h2>

<p>Every decent project must also be properly documented. However, this is something that developers might postpone until the end. Well, no more! This kind of plugins will help you to get started early and will help you to produce some beautiful (<em>maybe?</em>) and maintainable docs.</p>

<p>You might even consider coupling these with some rules in the Enforcer plugin, but tread carefully as too many, and too strict rules can, and usually do, backfire.</p>

<ul>
  <li><strong><a href="https://maven.apache.org/plugins/maven-site-plugin/">Site</a> plugin</strong></li>
  <li><strong><a href="http://asciidoctor.org/docs/asciidoctor-maven-plugin/">Asciidoctor</a> plugin</strong></li>
</ul>

<hr />

<h2 id="5-testing-and-qa">5. Testing and QA</h2>

<p>By now, your code should be looking great, with all the right licenses, and up and running in no time. So, how about squashing some [virtual] bugs? The list below might help you setting up a proper QA environment and fixing bugs before the come crawling to your production servers.</p>

<ul>
  <li><strong><a href="http://maven.apache.org/surefire/maven-surefire-plugin/">Surefire</a> plugin</strong></li>
  <li><strong><a href="http://maven.apache.org/surefire/maven-failsafe-plugin/">Failsafe</a> plugin</strong></li>
  <li><strong><a href="http://www.mojohaus.org/sonar-maven-plugin/project-info.html">SonarQube</a> plugin</strong></li>
  <li><strong><a href="http://gleclaire.github.io/findbugs-maven-plugin/">FindBugs</a> plugin</strong></li>
  <li><strong><a href="https://maven.apache.org/plugins/maven-pmd-plugin/">PMD</a> plugin</strong></li>
</ul>

<hr />

<h2 id="bonus-video">Bonus: Video</h2>

<p>A video of a talk I gave about this topic at <a href="http://2015.javazone.no/details.html?talk=86734cc36c24b081d399454534248f3aad7062ce30de5aea27de84f80a476269">JavaZone</a> in Oslo (in Norwegian).</p>

<iframe src="https://player.vimeo.com/video/138955650?byline=0&amp;portrait=0" width="640" height="360" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>

<hr />]]></content><author><name>Rustam Mehmandarov</name></author><summary type="html">The five main types of Maven plugins that will simplify the development process and increase maintainability of a project.</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://mehmandarov.com/assets/images/posts-images/desk-pencils_1200x800.jpg"/><category term="blog"/><category term="field notes"/><category term="maven"/><category term="software development"/><category term="build and deploy"/><category term="automation"/><category term="java"/><category term="english"/></entry><entry><title type="html">What Happens to Your Code After a Commit?</title><link href="https://mehmandarov.com/what-happens-to-your-code-after-a-commit/" rel="alternate" type="text/html" title="What Happens to Your Code After a Commit?"/><published>2016-05-21T09:45:00+02:00</published><updated>2016-05-21T09:45:00+02:00</updated><id>https://mehmandarov.com/what-happens-to-your-code-after-a-commit</id><content type="html" xml:base="https://mehmandarov.com/what-happens-to-your-code-after-a-commit/"><![CDATA[<p><em>I have written an article for the student magazine INDEX at the Department of Informatics (Ifi), University of Oslo. It was published on 30.04.2016, in Norwegian, and I have <a href="/hva-skjer-med-koden-din-etter-at-du-har-skrevet-den-ferdig/">previously shared it</a> with you here. I was also asked to share an English version of the article. This post is not only a simple translation to English but rather a 2.0 version of the previous post.</em></p>

<ul>
  <li><a href="#automation">Automation</a></li>
  <li><a href="#automatic-tests-and-code-quality-checks">Automatic tests and code quality checks</a></li>
  <li><a href="#environments">Environments</a></li>
  <li><a href="#versions">Versions</a></li>
  <li><a href="#what-now">What now?</a></li>
</ul>

<p><img src="/assets/images/posts-images/2016-05-16-hva-skjer-med-koden-din etter-at-du-har-skrevet-den-ferdig_article-2016-04-27_full.png" alt="The Screenshot of the Article" /></p>

<hr />

<p>Imagine the following scenario: You are a student and have been asked to write either a brand new program or make changes to the code that already exists. So, how do you proceed? You start writing code, you compile and run it periodically to test that it runs and does what it should. You write some more code, and you run it again. The process goes on until you are satisfied and the code has to be delivered. After that, you package it nicely with some documentation, upload it to a page where it has to be delivered and wait for feedback. Sounds familiar?</p>

<p>The process is not so far away from what you might experience at a workplace &#8211; just in miniature form. You have someone who orders functionality &#8211; in this case, your teacher, but later a customer or product owner &#8211; and you have one or several deliveries to be shipped. From a functional perspective, you will want to be sure of three things: that the ordered functionality is implemented, that the new code does not mess up anything else, and that the code will behave the same way it does for you when the customer runs it on their machines or servers.</p>

<p>This simple &#8220;code-test-code&#8221; method works fine for small tasks, but what would you do if you were working on a large project with several colleagues, or even teams, working on different parts of the codebase? How can you check that your code still works when you have made your changes? How can you be sure that your changes have not messed up others&#8217; code? And, how can you ensure that code that works on your machine still works when you deliver it to the customer?</p>

<p>Welcome to my workday. I often work with large IT systems consisting of hundreds of thousands lines of code and with dozens of developers working on different parts of the code. In addition to being a technical project manager with overall responsibility for the solution including application architecture, build infrastructure, and environments the solution runs on, I have often had the role of delivery manager. The latter is responsible for making sure that the final package that is being delivered contains all the code and functionality. Each delivery must have all the bits included, they must work correctly, and the recipients of the package will have to be able to install the software on their systems without any surprises.</p>

<hr />

<h2 id="automation">Automation</h2>

<p>A process to build, deploy and deliver a system consists of several steps, and most of them can usually be automated.</p>

<p>There are many reasons why you might want to automate this process. One reason is that it should be easier for you, and everyone else, to build the system. Automation shortens the time it takes to build it, making it easier to test a change you made to the codebase.</p>

<p>The second reason is that it makes it easier for others to take over or help on a project without having to familiarize themselves with the entire build process to get started. It will also make it easier to build with different build configurations. In addition to all this, it will also eliminate the human factor in the whole process &#8211; we humans make mistakes, and by automating the manual labor, we minimize the chance of making those errors.</p>

<p>Depending on the task at hand, the automation can be achieved by using various tools. Everything from simple make and shell scripts, to sophisticated build tools, like <em>Apache Maven</em> and <em>Gradle</em>, can help you reach your goals. Most often it will be not one, but a combination of the tools mentioned above. These can help you with both general automation of builds and deploy process, and automate the steps that will be described below.</p>

<p><img src="/assets/images/posts-images/2016-05-16-hva-skjer-med-koden-din etter-at-du-har-skrevet-den-ferdig_ci-superhero.png" alt="CI to the Rescue" /></p>
<figcaption class="caption"> Illustration made after my drawings, and for this article by Mahasty Assi</figcaption>

<hr />

<h2 id="automatic-tests-and-code-quality-checks">Automatic tests and code quality checks</h2>

<p>Once the code is written, and the build can be achieved with a single press of a button or by running a single script, you can begin to look at another important part of automation &#8211; running tests and managing code quality.</p>

<p>The automatic tests can be run both at low-level &#8211; <em>unit tests</em>, and at the functional level. Unit tests check that your methods are working properly, for example, that, given some specific input parameters, they return an expected answer. The <em>functional tests</em> on the other hand, will test the system as a whole, helping you to determine whether your system can still perform a set of specific tasks it was designed to do. There is also a third kind of tests that can, and should, be automated &#8211; <em>integration tests</em>. These are the tests used to check if the system is communicating with other systems in the way it was intended.</p>

<p>A failing test &#8211; no matter type &#8211; can tell you that something dramatic has happened in your system and that the system has ceased to behave as expected, giving you an opportunity to spot potential errors much earlier in the development process.</p>

<p>Another way to discover hidden problems is to run static code analysis that can detect known errors patterns, security weaknesses, bad coding habits, or unnecessary complexity. <em>PMD</em>, <em>FindBugs</em> and <em>SonarQube</em> can be mentioned as an example of tools for code quality management in Java world (while <em>NDepend</em>, <em>StyleCop</em> and <em>SonarQube</em> can be used for .NET projects).</p>

<hr />

<h2 id="environments">Environments</h2>

<p>When developing a system, one should know which environment and setup the system will run on when it goes live, i.e., when it gets deployed to a production environment. This information will help you to set up similar environments for development, and especially for testing. This is an important step in detecting errors that may occur only with a specific set-up or specific hardware. When these environments are set up, you can also automate the deployment of your code. This can be very convenient and save you a lot of time. Imagine, you push a change to a version control system (because you are using a <a href="https://en.wikipedia.org/wiki/Version_control">VCS</a>, right?), and it&#8217;s rolled out in a suitable environment &#8211; ready to be tested or demonstrated in no time, and with no effort from your side.</p>

<hr />

<h2 id="versions">Versions</h2>

<p>Versioning of the code and the applications will make sure you can simply answer two important questions:</p>

<ul>
  <li>Which version of the code is running here?</li>
  <li>What functionality is part of the particular version of the application?</li>
</ul>

<p>Both of these questions are something you are going to ask yourself and will be asked by others. The answers to these will help you when fixing or reporting bugs, or when working on a new functionality that is being rolled out.</p>

<p>If you are creating a larger system, you will also need this information when writing Release Notes for the latest version.</p>

<p>Versions will also help you keep track of and updating documentation for your system.</p>

<hr />

<h2 id="what-now">What now?</h2>

<p>Automation of build and deploy is a complex topic. The points that I mentioned here can be used as a starting point &#8211; a kind of checklist for a better system. You do not need to do everything at once or go in depth on all points. You should rather start with one of them and work your way towards full automation.</p>

<p>These points &#8211; and a few more &#8211; are a part of a continuous delivery process that is designed to ensure that it will only take a few minutes between pushing a change to version control system till it is live in production. You do not need to go that far in the beginning, but it may be something to strive for.</p>

<p>These points may seem tedious, but they will often have an immediate effect on your development process &#8211; they will simplify the entire process of handling a system, so you can spend more time on what you like best, namely programming!</p>

<hr />]]></content><author><name>Rustam Mehmandarov</name></author><summary type="html">I have written an article for the student magazine INDEX at the Department of Informatics (Ifi), University of Oslo. It was published on 30.04.2016, in Norwegian, and I have previously shared it with you here. I was also asked to share an English version of the article. This post is not only a si...</summary><category term="blog"/><category term="automation"/><category term="continuous delivery"/><category term="build and deploy"/><category term="testing"/><category term="english"/></entry><entry><title type="html">Hva skjer med koden din etter at du har skrevet den ferdig?</title><link href="https://mehmandarov.com/hva-skjer-med-koden-din-etter-at-du-har-skrevet-den-ferdig/" rel="alternate" type="text/html" title="Hva skjer med koden din etter at du har skrevet den ferdig?"/><published>2016-05-16T09:45:00+02:00</published><updated>2016-05-16T09:45:00+02:00</updated><id>https://mehmandarov.com/hva-skjer-med-koden-din-etter-at-du-har-skrevet-den-ferdig</id><content type="html" xml:base="https://mehmandarov.com/hva-skjer-med-koden-din-etter-at-du-har-skrevet-den-ferdig/"><![CDATA[<p><em><strong>Update 21.05.2016:</strong> <a href="/what-happens-to-your-code-after-a-commit/">English version</a> of this article.</em></p>

<p><em>Jeg har skrevet en artikkel for studentmagasinet INDEX som utgis ved Institutt for Informatikk (Ifi), Universitetet i Oslo. Den ble publisert 30.04.2016, og er tilgjengelig for alle studenter p&#229; Ifi. N&#229; vil jeg ogs&#229; &#229; dele den med alle dere andre som ikke kunne sikre dere en utgave av INDEX p&#229; fredag. Enjoy!</em></p>

<ul>
  <li><a href="#automatiser">Automatiser</a></li>
  <li><a href="#automatiske-tester-og-sjekk-av-kodekvalitet">Automatiske tester og sjekk av kodekvalitet</a></li>
  <li><a href="#milj&#248;er">Milj&#248;er</a></li>
  <li><a href="#versjoner">Versjoner</a></li>
  <li><a href="#veien-videre">Veien videre</a></li>
</ul>

<p><img src="/assets/images/posts-images/2016-05-16-hva-skjer-med-koden-din etter-at-du-har-skrevet-den-ferdig_article-2016-04-27_full.png" alt="The Screenshot of the Article" /></p>

<hr />

<p>Tenk deg f&#248;lgende scenario: Du er en student og har f&#229;tt i oppgave om &#229; skrive enten et helt nytt program, eller gj&#248;re noen endringer i noe kode som finnes fra f&#248;r av. S&#229;, hvordan g&#229;r du fram? Du begynner &#229; skrive kode, du kompilerer og kj&#248;rer den med jevne mellomrom for &#229; teste at den fungerer og gj&#248;r det den skal. Du skriver mer, du kj&#248;rer den igjen. Slik fortsetter du til du er forn&#248;yd og koden skal leveres. Etter det pakker du koden din pent i en arkiv med litt dokumentasjon, laster den opp p&#229; en side hvor det skal leveres og venter p&#229; tilbakemelding. H&#248;res det kjent ut?</p>

<p>Prosessen er vel ikke s&#229; langt unna det du vil oppleve i arbeidslivet, bare i miniatyrform. Du har noen som bestiller en type funksjonalitet &#8211; i dette tilfelle din l&#230;rer, men senere en kunde eller produkteier &#8211; og du har en eller flere leveranser som skal leveres til den som har bestilt jobben. Fra et funksjonelt perspektiv vil du v&#230;re sikker p&#229; tre ting &#8211; at den bestilte funksjonaliteten er med, at den ikke &#248;delegger for noe annet og at koden vil oppf&#248;re seg p&#229; samme m&#229;te n&#229;r bestilleren kj&#248;rer det hos seg.</p>

<p>Den enkle &#171;kode-teste-kode&#187;-metoden fungerer fint for sm&#229; oppgaver, men hva ville du gjort hvis du skulle jobbe p&#229; et stort prosjekt hvor flere jobber p&#229; forskjellige deler av koden? Hvordan kan du sjekke at koden din fortsatt fungerer n&#229;r du har gjort dine endringer? Hvordan kan du v&#230;re sikker p&#229; at dine endringer ikke har &#248;delagt andres kode?</p>

<p>Og, hvordan kan du sjekke at koden som fungerer p&#229; din maskin fortsatt fungerer n&#229;r du leverer den fra deg?</p>

<p>Velkommen til min arbeidshverdag. Jeg jobber ofte med store datasystemer som best&#229;r av mange hundre tusener kodelinjer og med flere titalls utviklere som jobber med forskjellige deler av den koden. I tillegg til &#229; v&#230;re teknisk prosjektleder med overordnet ansvar for blant annet applikasjonsarkitektur, bygg, og milj&#248;er den kj&#248;rer p&#229;, har jeg samtidig hatt rollen som leveranseansvarlig. Sistnevnte har ansvaret med &#229; til slutt pakke all koden og levere den til kunden. Ved hver leveranse m&#229; man passe p&#229; at alle biter er med, at de fungerer som de skal og at mottakeren av pakken vil kunne installere det p&#229; sitt system uten noen overraskelser.</p>

<hr />

<h2 id="automatiser">Automatiser</h2>

<p>En prosess med &#229; bygge, deploye og levere et system best&#229;r ofte av flere steg og de kan som regel automatiseres. Det er mange &#229;rsaker til at man &#248;nsker automatisering. Den ene &#229;rsaken er at det skal v&#230;re enklere for deg og alle andre &#229; bygge systemet &#8211; det korter ned tiden det tar &#229; gj&#248;re det, ergo &#229; teste en endring du har gjort i koden. Den andre &#229;rsaken er at det kan gj&#248;re det lettere for andre &#229; ta over eller hjelpe til p&#229; et prosjekt uten &#229; m&#229;tte sette seg inn i hele byggeprosessen. Det vil ogs&#229; gj&#248;re det lettere &#229; bygge med forskjellige konfigurasjoner dersom man &#248;nsker det. I tillegg til alt dette, vil det ogs&#229; eliminere den menneskelige faktoren i hele prosessen. Vi mennesker kan gj&#248;re feil, og ved &#229; automatisere manuelt arbeid fjerner vi en kilde for en del feil.</p>

<p>Automatisering kan oppn&#229;s ved hjelp av forskjellige verkt&#248;y. Alt fra enkle make- og shell-skript til ganske avanserte byggeverkt&#248;y som Apache Maven og Gradle kan hjelpe deg, litt avhengig av oppgaven som skal gj&#248;res. Oftest blir det en kombinasjon av noen ovennevnte verkt&#248;y. Disse kan hjelpe deg b&#229;de med generell automatisering av bygge- og deploy-prosessen, og med automatisering av punktene under.</p>

<p><img src="/assets/images/posts-images/2016-05-16-hva-skjer-med-koden-din etter-at-du-har-skrevet-den-ferdig_ci-superhero.png" alt="CI to the Rescue" /></p>
<figcaption class="caption">Illustrasjon laget etter mine tegninger, og for denne artikkelen av Mahasty Assi</figcaption>

<hr />

<h2 id="automatiske-tester-og-sjekk-av-kodekvalitet">Automatiske tester og sjekk av kodekvalitet</h2>

<p>N&#229;r koden din er skrevet og byggingen av den er et knappetrykk eller en skriptkj&#248;ring unna, kan du begynne &#229; se p&#229; en annen viktig del av automatisering &#8211; kj&#248;ring av tester og sjekk av kodekvalitet. De automatiske testene kan v&#230;re b&#229;de p&#229; lavniv&#229; &#8211; enhetstester &#8211; og p&#229; funksjonell niv&#229;. Enhetstester sjekker at metodene dine fungerer som de skal, for eksempel &#229; returnere riktig svar, gitt noen inputparametre. De funksjonelle testene vil teste systemet som en svart boks. Her vil du f&#229; svar om systemet ditt fortsatt kan utf&#248;re et sett med bestemte oppgaver. Det finnes ogs&#229; integrasjonstester som kan og b&#248;r automatiseres, og disse brukes for &#229; sjekke at systemet snakker med og til andre systemer p&#229; den m&#229;ten det var tiltenkt.</p>

<p>Uansett type tester kan disse, dersom de feiler, fortelle deg om at noe dramatisk har skjedd i ditt system og om at systemet har sluttet &#229; oppf&#248;re seg som forventet. Det vil ogs&#229; gi deg en mulighet til &#229; oppdage potensielle feil mye tidligere i utviklingsprosessen.</p>

<p>En annen m&#229;te &#229; oppdage skjulte problemer er &#229; kj&#248;re statisk kodeanalyse som kan oppdage kjente m&#248;nstre for feil, sikkerhetssvakheter, uvaner eller un&#248;dvendig kompleksitet.</p>

<hr />

<h2 id="milj&#248;er">Milj&#248;er</h2>

<p>N&#229;r du utvikler et system b&#248;r du vite hvilket milj&#248; og oppsett dette vil kj&#248;re p&#229; n&#229;r systemet g&#229;r live, dvs. legges ut i produksjonsmilj&#248;et. Denne informasjonen kan du bruke til &#229; sette opp tilsvarende milj&#248;er for utvikling, og spesielt med tanke p&#229; testing. Dette er n&#248;dvendig for &#229; v&#230;re i stand til &#229; oppdage feil som vil kunne oppst&#229; kun med et bestemt oppsett, eller spesifikk hardware. N&#229;r disse milj&#248;ene er satt opp kan du automatisere utrulling av din kode til disse milj&#248;ene. Dette kan v&#230;re veldig praktisk, og spare deg for mye tid. Tenk at du sjekker inn en endring (for du bruker vel et versjonskontrollsystem, ikke sant?), og vips, er det ute p&#229; et passende milj&#248;, klar til &#229; testes eller demonstreres.</p>

<hr />

<h2 id="versjoner">Versjoner</h2>

<p>Versjonering av koden vil gj&#248;re at du lett kan svare p&#229; to viktige sp&#248;rsm&#229;l:</p>

<ul>
  <li>Hvilken versjon av koden kj&#248;rer her?</li>
  <li>Hvilken funksjonalitet er en del av bestemt versjon?</li>
</ul>

<p>Begge disse sp&#248;rsm&#229;lene er noe du kommer til &#229; sp&#248;rre deg selv og vil bli spurt om fra andre. Svarene p&#229; disse vil hjelpe deg n&#229;r du skal jobbe med feil som blir fikset eller oppdaget, eller ny funksjonalitet som blir rullet ut. Dersom du lager et st&#248;rre produkt, vil du ogs&#229; f&#229; bruk for disse n&#229;r du skal lage Release Notes for den nyeste versjonen. Versjoner vil ogs&#229; hjelpe deg &#229; holde styr p&#229; en oppdatert dokumentasjon for ditt system.</p>

<hr />

<h2 id="veien-videre">Veien videre</h2>

<p>Automatisering av bygg og deploy er et veldig stort tema. Punktene som jeg nevner her kan brukes som et springbrett, en slags sjekkliste for et bedre system. Du trenger ikke gj&#248;re alt p&#229; en gang, eller g&#229; i dybden p&#229; alle punkter, men start et sted og jobb deg videre mot full automatisering.</p>

<p>Disse punktene &#8211; og litt mer &#8211; er en del av en kontinuerlig leveranseprosess som skal bidra til at det kun vil ta noen minutter fra du sjekker inn en endring til det er ute i produksjon. S&#229; langt trenger du ikke &#229; g&#229; i f&#248;rste omgang, men det kan jo v&#230;re noe &#229; strekke seg etter? Men det disse punktene kan gj&#248;re med en gang er &#229; forenkle din hverdag s&#229; vel som hele prosessen rundt h&#229;ndtering av et system, slik at du kan bruke mer tid p&#229; det du liker best, nemlig programmering!</p>

<p><em>Denne artikkelen ble publisert i magasinet INDEX (2. utgave, 2016), Institutt for Informatikk, Universitetet i Oslo.</em></p>

<hr />]]></content><author><name>Rustam Mehmandarov</name></author><summary type="html">Update 21.05.2016: English version of this article.</summary><category term="blog"/><category term="automation"/><category term="continuous delivery"/><category term="build and deploy"/><category term="testing"/><category term="norwegian"/></entry></feed>
