Changes for page Build Management
Last modified by Richard Kreissig on 2023/09/14 08:50
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,3 +1,5 @@ 1 += An Overview of KIELER Build Automation = 2 + 1 1 In order to keep the KIELER code as stable as possible, we use automatic continuous integration builds. Once you push something into one of the KIELER repositories, you trigger the automatic build process. If the build fails for whatever reason – be it failed unit tests or simply compilation errors – you are notified of the problem. 2 2 3 3 This page describes the software and setup we use to implement all of this. ... ... @@ -8,11 +8,11 @@ 8 8 9 9 {{toc/}} 10 10 11 -= Software We Use = 13 +== Software We Use == 12 12 13 13 To implement our automatic builds, we use the popular [[Maven>>url:http://maven.apache.org/||shape="rect"]] tool in conjunction with [[Tycho>>url:http://eclipse.org/tycho/||shape="rect"]], a set of Maven plug-ins that allow Maven to build Eclipse projects. Our KLay layouters library is built using [[Apache Ant>>url:http://ant.apache.org/||shape="rect"]]. To implement our continuous integration builds, we use [[Atlassian Bamboo>>url:http://www.atlassian.com/software/bamboo/overview||shape="rect"]]. 14 14 15 -== Maven / Tycho == 17 +=== Maven / Tycho === 16 16 17 17 Maven is a build tool for Java projects. It takes care of dependency management, including in-build dependencies (the order in which packages are compiled) as well as dependencies to third-party libraries. The latter are automatically fetched from special Maven repositories. Without getting too technical, a Maven build consists of several phases, such as //compile// and //package//. Within each phase, several Maven plug-ins handle different //tasks// (or //goals//, as Maven calls them). The //maven-compile-plugin// for example compiles {{code language="none"}}.java{{/code}} files into {{code language="none"}}.class{{/code}} files. 18 18 ... ... @@ -20,19 +20,19 @@ 20 20 21 21 Tycho is a set of Maven plugins that handles compiling and dependency management as well as bundling of Eclipse plug-ins. Tycho understands Eclipse metadata files such as {{code language="none"}}plugin.xml{{/code}} or {{code language="none"}}feature.xml{{/code}}, provides dependency information extracted from those files, and provides an Eclipse instance for compiling and packaging Eclipse bundles. 22 22 23 -== Apache Ant == 25 +=== Apache Ant === 24 24 25 25 Ant is a very popular Java build tool. While Maven wants to know metadata about a project and then knows what to do to build it, Ant works by specifying exactly what to do to build a project. These steps are configured in a {{code language="none"}}build.xml{{/code}} file. We try to avoid using Ant, but still have Ant build files around for jobs too specialized to be properly handled by Maven. 26 26 27 -== Bamboo == 29 +=== Bamboo === 28 28 29 29 While Maven and Tycho know how to compile KIELER, Bamboo knows when to compile KIELER and what to do with the compiled project. Bamboo has access to our source code repositories and triggers continuous integration builds every time someone pushes new code into a repository. It also does a full build every night and copies the results onto our nightly build update site to be accessed by people all around the world. And beyond. Tell your friends! 30 30 31 -= The Automatic Build Process = 33 +== The Automatic Build Process == 32 32 33 33 This section describes how our POM files are distributed throughout the repository structure, and how you can trigger an automatic build of KIELER. 34 34 35 -== POM Files == 37 +=== POM Files === 36 36 37 37 The basic structure of the POM files can be seen below: 38 38 ... ... @@ -40,11 +40,11 @@ 40 40 41 41 Each plug-in and feature has a corresponding (usually rather small) POM file. The POM files in the {{code language="none"}}features{{/code}} and {{code language="none"}}plugins{{/code}} directories know about the different features and plug-ins. The parent POM file, which all other POM files copy basic configuration from, knows about the feature and plug-in POM files. In addition, the {{code language="none"}}build{{/code}} directory also contains a bunch of subdirectories. These also contain POM files specialized for building the P2 repositories necessary to publish our Eclipse features. 42 42 43 -== Using the KIELER Maven Build == 45 +=== Using the KIELER Maven Build === 44 44 45 45 Using the KIELER Maven build requires knowledge about two aspects: necessary configuration / required libraries and invoking Maven. 46 46 47 -=== Necessary Configuration === 49 +==== Necessary Configuration ==== 48 48 49 49 KIELER needs to be built against a P2 repository generated from our Eclipse reference installation. The path to this repository is found in the parent POM file and must be changed if the repository location changes. Also, when changing the reference installation, the repository has to be updated using the following magic command (adapted accordingly): 50 50 ... ... @@ -57,24 +57,18 @@ 57 57 -publishArtifacts 58 58 {{/code}} 59 59 60 -=== Invoking Maven === 62 +==== Invoking Maven ==== 61 61 62 62 To actually build KIELER once all preliminaries are done, navigate to the {{code language="none"}}/build/de.cau.cs.kieler.parent{{/code}} directory and run the following command line: 63 63 64 64 {{code language="none"}} 67 +. /home/java/java-env # Only necessary when working on our servers 65 65 mvn clean package -P <profile> # For a list of available profiles, see parent pom.xml 66 66 {{/code}} 67 67 68 -If you are trying to build KIELER on our server, you first have to setup the Java environment, if you haven't already done so. The command line thus becomes: 69 - 70 -{{code language="none"}} 71 -. /home/java/java-env 72 -mvn clean package -P <profile> # For a list of available profiles, see parent pom.xml 73 -{{/code}} 74 - 75 75 Once Maven has finished, the different build artifacts may be found in the {{code language="none"}}/build/de.cau.cs.kieler.*.repository/target{{/code}} directories. 76 76 77 -== What to Be Aware of == 73 +=== What to Be Aware of === 78 78 79 79 There are some things that people need to be aware of to keep the build files in a valid state. 80 80 ... ... @@ -81,7 +81,7 @@ 81 81 1. Eclipse metadata and POM files are not synchronized. Thus, if the version of an Eclipse plug-in changes, its {{code language="none"}}pom.xml{{/code}} needs to be updated accordingly. 82 82 1. The repository POM directories contain product files and product icons. These are copies of the files found in the corresponding branding plug-ing (such as {{code language="none"}}de.cau.cs.kieler.core.product{{/code}}) and have to be manually synchronized. 83 83 84 -== The Curious Case of Building the KLay Library == 80 +=== The Curious Case of Building the KLay Library === 85 85 86 86 We distribute our KLay layout algorithms in two library files: one that contains just our algorithms, and another one that also contains dependencies such as required EMF classes. To build the KLay libraries, navigate to the {{code language="none"}}/build/de.cau.cs.kieler.klay.libraries{{/code}} directory and do the following: 87 87 ... ... @@ -88,7 +88,7 @@ 88 88 1. Set the {{code language="none"}}PRODUCT{{/code}} environment variable to point to a complete installation of KIELER. You can get one by using the automatic Maven build. 89 89 1. Run Ant on the {{code language="none"}}build.xml{{/code}} file. This will produce both versions of the KLay layout library. 90 90 91 -= Continuous and Nightly Builds = 87 +== Continuous and Nightly Builds == 92 92 93 93 There are basically three different build plans for each of the KIELER projects: 94 94 ... ... @@ -95,16 +95,137 @@ 95 95 1. **Continuous Plugins** – Compiles the plug-ins and runs the unit tests on them. None of the compiled artifacts are published anywhere. This plan is triggered by pushing stuff into the repositories, giving early feedback regarding whether committed changes break anything. 96 96 1. **Nightly Product** – Compiles the plug-ins and assembles distributable product files and update sites. Distributable files are published in the nightly build directory {{code language="none"}}/home/kieler/public_html/files/nightly{{/code}}. Update sites are published in {{code language="none"}}/home/kieler/public_html/updatesite/nightly{{/code}}. This plan is run once every night. 97 97 1. **Nightly Rating** – Compiles the plug-ins and runs our code quality rating doclet on them. The result is a website published at {{code language="none"}}/home/kieler/public_html/rating{{/code}}. This plan is run once every night. 94 +1. **Release Builds** – Continuous builds of release branches once a release is imminent. These usually run whenever changes are pushed into the repository. 98 98 99 - ==DifferentNightlyProductBuilds==96 +The //Semantics// project has an additional build plan: 100 100 101 -Since KIELERis divided into the //Pragmatics// and //Semantics// parts,thedifferentNightlyProductbuilds producedifferentartifacts.98 +1. **Ptolemy Update Site** – Builds the Ptolemy library and produces an update site for it. The build is triggered whenever changes are pushed into the Ptolemy repository. This build plan is necessary since both, the //Pragmatics// and the //Semantics// projects use the Ptolemy libraries. 102 102 103 -* KIELER Pragmatics\\ 104 -** KLay layout library redistributables 105 -** KWebS redistributables 106 -** KIELER Pragmatics update site 107 -** Papyrus Layout update site 108 -* KIELER Semantics\\ 109 -** KIELER redistributables 110 -** KIELER Semantics update site 100 +== Update Sites and Redistributables == 101 + 102 +Our automatic builds produce a bunch of so-called //artifacts//: redistributable applications as well as a number of update sites. This table lists all artifacts, the project or repository they belong to, the build file responsible for producing them, the Bamboo build plan that builds them, and the directory they are finally placed in. 103 + 104 +|=((( 105 +Artifact 106 +)))|=((( 107 +Repository 108 +)))|=((( 109 +Build File 110 +)))|=((( 111 +Bamboo Build Plan 112 +)))|=(% colspan="1" %)(% colspan="1" %) 113 +((( 114 +Final Directory 115 +))) 116 +|((( 117 +KLay Layout Libraries 118 +)))|((( 119 +Pragmatics 120 +)))|((( 121 +{{code language="none"}} 122 +...klay.libraries/build.xml 123 +{{/code}} 124 +)))|((( 125 +KIELER Pragmatics -> Nightly Product 126 +)))|(% colspan="1" %)(% colspan="1" %) 127 +((( 128 +{{code language="none"}} 129 +/home/kieler/public_html/files/nightly/ 130 +{{/code}} 131 +))) 132 +|((( 133 +KWebS RCA 134 +)))|((( 135 +Pragmatics 136 +)))|((( 137 +{{code language="none"}} 138 +...kwebs.repository/pom.xml 139 +{{/code}} 140 +)))|((( 141 +KIELER Pragmatics -> Nightly Product 142 +)))|(% colspan="1" %)(% colspan="1" %) 143 +((( 144 +{{code language="none"}} 145 +/home/kieler/public_html/files/nightly/ 146 +{{/code}} 147 +))) 148 +|((( 149 +KIELER Pragmatics Update Site 150 +)))|((( 151 +Pragmatics 152 +)))|((( 153 +{{code language="none"}} 154 +...pragmatics.repository/pom.xml 155 +{{/code}} 156 +)))|((( 157 +KIELER Pragmatics -> Nightly Product 158 +)))|(% colspan="1" %)(% colspan="1" %) 159 +((( 160 +{{code language="none"}} 161 +/home/kieler/public_html/updatesite/nightly/pragmatics/ 162 +{{/code}} 163 +))) 164 +|((( 165 +Papyrus Layout Update Site 166 +)))|((( 167 +Pragmatics 168 +)))|((( 169 +{{code language="none"}} 170 +...papyrus.repository/pom.xml 171 +{{/code}} 172 +)))|((( 173 +KIELER Pragmatics -> Nightly Product 174 +)))|(% colspan="1" %)(% colspan="1" %) 175 +((( 176 +{{code language="none"}} 177 +/home/kieler/public_html/updatesite/nightly-papyrus/ 178 +{{/code}} 179 +))) 180 +|((( 181 +KIELER RCA 182 +)))|((( 183 +Semantics 184 +)))|((( 185 +{{code language="none"}} 186 +...semantics.repository/pom.xml 187 +{{/code}} 188 +)))|((( 189 +KIELER Semantics -> Nightly Product 190 +)))|(% colspan="1" %)(% colspan="1" %) 191 +((( 192 +{{code language="none"}} 193 +/home/kieler/public_html/files/nightly/ 194 +{{/code}} 195 +))) 196 +|((( 197 +KIELER Semantics Update Site 198 +)))|((( 199 +Semantics 200 +)))|((( 201 +{{code language="none"}} 202 +...semantics.repository/pom.xml 203 +{{/code}} 204 +)))|((( 205 +KIELER Semantics -> Nightly Product 206 +)))|(% colspan="1" %)(% colspan="1" %) 207 +((( 208 +{{code language="none"}} 209 +/home/kieler/public_html/updatesite/nightly/semantics/ 210 +{{/code}} 211 +))) 212 +|((( 213 +Ptolemy Libraries Update Site 214 +)))|((( 215 +Ptolemy 216 +)))|((( 217 +{{code language="none"}} 218 +...ptolemy.repository/pom.xml 219 +{{/code}} 220 +)))|((( 221 +KIELER Semantics -> Ptolemy Update Site 222 +)))|(% colspan="1" %)(% colspan="1" %) 223 +((( 224 +{{code language="none"}} 225 +/home/kieler/public_html/updatesite/ptolemy/ 226 +{{/code}} 227 +)))
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -616042 41 +6160425 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/616042 4/Build Management1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/6160425/Build Management