| // |
| // Licensed to the Apache Software Foundation (ASF) under one or more |
| // contributor license agreements. See the NOTICE file distributed with |
| // this work for additional information regarding copyright ownership. |
| // The ASF licenses this file to You under the Apache License, Version 2.0 |
| // (the "License"); you may not use this file except in compliance with |
| // the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| // |
| :imagesdir: ../images/ |
| |
| == Continuous Integration |
| |
| We are currently using two different CI systems. |
| |
| - Apache's Jenkins at: https://builds.apache.org/view/M-R/job/PLC4X/ |
| - Travis at: https://travis-ci.org/apache/plc4x/ |
| |
| Hereby Apache Jenkins clearly is responsible for running the full testsuite with all integration-tests. |
| Also only jobs on Apache Jenkins are allowed to publish SNAPSHOT versions of the Maven artifacts to Apaches Nexus. |
| |
| Travis integrates perfectly into GitHub. We are using this to auto-check any pull-requests coming in. |
| |
| === Structure of the Jenkins Pipeline build |
| |
| We are using the Jenkins `multi-branch pipeline plugin` to automatically setup build for branches based upon the build definition in the `Jenkinsfile` in the root of the project. |
| |
| In general it decides between building of the `master` branch and all others. |
| |
| When building `master` the build not only builds the project itself and runs all tests, it also runs the `sonarqube` analysis, deploys the artifacts built as well as generates and deploys the website. |
| |
| The general structure of the build is as follows: |
| |
| [blockdiag,developers-ci-pipeline,svg] |
| .... |
| { |
| Start [shape = beginpoint]; |
| BuildMaster [label = "Build Master"]; |
| CodeQuality [label = "Code Quality"]; |
| Deploy [color = "#068D9D", textcolor="#FFFFFF"]; |
| BuildSite [label = "Build Site"]; |
| StageSite [label = "Stage Site"]; |
| DeploySite [label = "Deploy Site", color = "#80DED9", textcolor="#FFFFFF"]; |
| Finish [shape = endpoint]; |
| |
| Start -> Initialization -> Cleanup -> Checkout; |
| Checkout -> Build [label = "any other branch"]; |
| Build -> Finish; |
| Checkout -> BuildMaster [label = "master branch"]; |
| BuildMaster -> CodeQuality -> Deploy -> BuildSite -> StageSite -> DeploySite -> Finish; |
| } |
| .... |