Dr. Michael EichbergSoftware EngineeringDepartment of Computer ScienceTechnische Universität DarmstadtIntroduction to Software EngineeringBuilding Software

Non-trivial Software is generally Build using BuildAutomation Systems.Build Automation 2 The goal of a Build Automation System is to fully automateall steps required to build the product given the sourceartifacts of the project.The result of the build should always be the same - independentof the developer’s local configuration.“We want stable builds.”

The Build Automation Systems is responsible forautomatically carrying out all steps necessary to buildthe product.Build Automation A Build Automation typically executes the following tasks: Formatting the source code Code Generation Source Code Compilation [if necessary] Linking Code/Packaging Code Running the testsHistorically Running static analysis tools Deployment to the test system/production system(s) Creating and publishing documentation, release notes, webpages, 3

Software is Build using Build Automation Systems.Build Automation Given a Build Automation System, the productcan be built: On-DemandHistorically(e.g., by a developer) Scheduled by a build server(e.g., every night) TriggeredState of(e.g., on every commit to a version controltheArtsystem)4

Some Examples of (Open-Source) Tools to AutomateBuildsBuild Automation The family of make tools!usesXMLHistorically Apache Ant Apache Maven gradle (Groovy Based) RAKE (Ruby Make) sbt AutomatedDependencyManagement(To get State ofthe Artrough timeline 5

An Example Build Script import : "BugPicker"version : "1.1.0"scalaVersion : "2.11.4"VersionInformationscalacOptions in (Compile, doc) : Seq("-deprecation", "-feature", "-unchecked")Compiler SettingsscalacOptions in (Compile, doc) Opts.doc.title("OPAL - BugPicker")libraryDependencies "org.scalafx"jfxSettingsJFX.addJfxrtToClasspath : true%% "scalafx"% "1.0.0-R8"Project DependenciesProject SettingsJFX.mainClass : ngsjarName in assembly : "bugpicker-" version.value ".jar"Deployment informationtest in assembly : {}mainClass in assembly : ators in Compile Def.task {Generation of otherval versionFile (baseDirectory in Compile).value / "target" / "scala-2.11" / "classes" / "org" /Artifacts"opalj" / "bugpicker" / write(versionFile, (version in Compile).value)Seq(versionFile)Easily hundreds of lines for larger projects.}6

Continuous Integration Continuous Integration Continuous integration basically just means that thedeveloper’s working copies are synchronized with ashared mainline several times a day.It was first named and proposed by Grady Booch. The goal is to avoid integration issues. In practice a special build server is used.CI is in particular useful in combination withautomated unit tests.(e.g., Hudson/Jenkins)7

Continuous Integration Maintain a code repositoryAutomate the buildMake the build self-testingEveryone commits to the baseline every dayEvery commit (to baseline) should be builtOne commit - one feature; no “Mega-commits”Keep the build fastTest in a clone of the production environmentMake it easy to get the latest deliverablesEveryone can see the results of the latest buildAutomate deployment8standard must havesContinuous Integration - Best Practices

Travis CI Continuous Integration A hosted continuous integration service for opensource and private projects.9

Continuous DeliveryContinuous Delivery 10 Always be able to put a product into production Practices(The evolution of continuous integration.) Unit/Acceptance-testsCode coverage and static analysisDeployment to integration environmentIntegration testsDeployments to Performance test environmentPerformance testsAlerts, reports and Release Notes sent outDeployment to release repository

Continuous Delivery elivery/ 11

ns-of-continuous-delivery/ 12

Cloud Services for Continuous DeliveryContinuous Delivery 13

Continuous DeploymentContinuous Deployment 14 Automatically deploy the product into production wheneverit passes QA.(The logical next step after Continuous Delivery) The release schedule is in the hans of the It(With Continuous Delivery the release schedule is in the hands ofthe business.)Attention: Sometimes the term “Continuous Deployment” isalso used if you are able to continuously deploy to the testsystem.


Goal of the Lecture 16The goal of this lecture is to enable you tosystematically carry out small(er) softwareprojects that produce quality software. Projects are build using build tools A build script takes care of all steps necessary to build the project(In case of an application, building means creating a runnable application.)

Goal of the Lecture 17The goal of this lecture is to enable you to systematically carry out small(er)commercial or open-source projects. ProjectStartSoftware Project ManagementBuild Process ManagementRequirements ManagementDomain ModelingModelingTestingBuild Process ManagementProjectEnd

Build Automation Software is Build using Build Automation Systems. Given a Build Automation System, the product can be built: On-Demand (e.g., by a developer) Scheduled by a build server (e.g., every night) Triggered (e.g., on every commit to