Real World Strategies for Continuous Delivery with Maven and Jenkins

Comienza Ya. Es Gratis
ó regístrate con tu dirección de correo electrónico
Rocket clouds
Real World Strategies for Continuous Delivery with Maven and Jenkins por Mind Map: Real World Strategies for Continuous Delivery with Maven and Jenkins

1. Continuous Delivery

1.1. Define

1.1.1. Get interesting stuff in front of your customer as fast as you possibly can So that you can get a really fast feedback loop and value

1.2. Value can come from getting iterations in front of the customer

1.2.1. This gets feedback from your customer quickly even if its not a full feature to implement in production

1.3. Value can come from getting iterations in front of users

1.3.1. User feedback is important and it can be good to get that feedback on top of customer feedback. Need to help your customer understand the great value user feedback can be

1.4. Want to give the power back to the customer on when a product goes to production.

1.4.1. A release that passes all checks and quality controls has the means to go to production We want the latest release to be able to go to production but it doesn't have to, it's up to the customer If we always hold the keys and there is work to be done to get it to production the customer has no control and each build is less valuable

2. Speaker

2.1. Video

2.2. John Fergusen Smart

2.2.1. [email protected]

2.2.2. twitter: wakaleo

2.2.3. git: wakaleo

2.3. Books

2.3.1. Java Power Tools

2.3.2. Jenkins - The Definitive Guide

3. Continuous Deployment

3.1. Define

3.1.1. Every legitimate release does go to production

4. Principles

4.1. Every build is a potential release

4.1.1. not a predetermined release, every build is a potential release

4.2. Eliminate manual bottlenecks

4.2.1. Can't have continuous delivery if QA takes weeks to test it

4.2.2. Development pieces included Database scripts Implementation steps

4.3. Automate wherever possible

4.4. Have automated tests you can trust

4.4.1. Need HIGH degree of confidence - not just test coverage

5. Build Pipelines

5.1. Every build is a potential release

5.2. Use the same binaries throughout the pipeline

5.3. Examples

5.3.1. Compile & Unit Tests Package and Deploy Acceptance Tests (Automated Confidence Tests)

5.3.2. Live Example Initial Build Use Parameterized Builds Clean Install -U Conditional Build Step Plugin to commit and push back on success Deploy to Nexus Archive artifacts to reuse in pipeline Block build when downstream project is building Code Quality

6. Using Maven

6.1. The Maven Problem

6.1.1. Core maven concepts predate continuous delivery but we can still utilize it. Still better than ant. Gradle may make things easier over maven though.

6.1.2. All maven steps runs the lifecycle front to back Good on the surface but overall not effective for continuous delivery

6.1.3. Work on snapshot until you make a manual decision that it's good to go then you use mvn release plugin to increment the version

6.1.4. Beware Duplication Don't add items to the pipeline that don't add true value every time. (eg Java Docs etc)

6.2. Implementation

6.2.1. Split Unit and Integration Tests Surefire Plugin

6.2.2. Maybe don't use mvn deploy Multi Module projects it will deploy each at a time and may only deploy some of the artifacts Jenkins artifactory plugin deploys after install all artifacts Jenkins mvn deploy:deploy to nexus

6.2.3. Code Coverage - Jococo Cobertura and Clover rebuild manipulated jars and adds duplicated Jococo uses prebuilt jars and does code coverage on the fly Add to post-integration phase Adds minimal overhead to mvn install Actually do checks on it, if you don't use checks on it, take it out of the pipeline Same for code quality - PMD, Find Bugs, Checkstyles, etc

6.2.4. Reuse binaries Every build is a version - NOT a snapshot Don't use maven release plguin Maven Versions plugin digit1.digit2.buildCounter On build - create a new branch If build is successful you commit and push that back If failed drop the branch and don't commit, notify everyone and still increase counter

6.2.5. Build Pipeline Plugin