
With so many terms, techniques, and tools available, navigating how about building and delivering software can be overwhelming. This course picks a path through that maze, specifically focused on Java, and walks through a set of those options for delivery. Specifically using a combination of Docker, Jenkins, Git, and Gradle. Every aspect of this course also comes with a Git repository that contains both details and the examples being discussed.
Learners can follow along by running their own development environments for executing the examples, or just use this as a deep-dive explanation into the inner workings of Java-Jenkins-Gradle delivery. Either way, let working code be your guide. The course structure starts with setting up a basic development environment, and ends with using a Jenkins declarative pipeline to execute a Gradle build using the Java, Maven, Jacoco, and PMD plugins, that on the pass of all the quality gates publishes the resulting Java Library to a Maven Repository.
A little about me and my background.
This course is a means to end, but what is that end and what is the path?
Introduction to basic source control concepts in combination with how they related to Git.
Step-by-step instructions on how to both setup Git, and to handle settings up SSH-based authentication
Instructions on how to follow along by forking the example projects, so that you can change them as needed.
An introduction to Docker and containerization.
A walkthrough of the world of Docker, and specifically how Docker Compose can be used to run a sample container locally.
An introduction to Jenkins and its core functions.
An explanation, demonstration, and example of how to run Jenkins locally through Docker Compose.
The purpose of this example is to show how to build a java application, without the use of any of the command available build tooling. Specifically, no Ant, no Gradle, and no Maven. Why? Because armed with this information you now know how all of the internals for building Java on any technology stack. Specifically:
Turning .java files into .class files
Putting .class files into a .jar file (that is also executable)
Running that .jar file
How to include unit testing
An introduction to Gradle, its architecture, and its purpose.
Instructions with an example of how to use the Java plugin to build and test a Jar in Gradle.
Using the previous example, walks through how to use the Jacoco plugin to generate code coverage metric, and then implement a quality gate based on those metrics.
Using the includes example, walks through how to use the PMD plugin to do static code analysis, and then implement a quality gate for it.
A walkthrough of how to publish the Java library through Gradle, and also includes metrics relating to static code analysis, testing, and code coverage.
Demonstration, example, and walkthrough of how to build and publish the Java library using Gradle, orchestrated via a scripted pipeline.
With so many terms, techniques, and tools available, navigating how about building and delivering software can be overwhelming. This course picks a path through that maze, specifically focused on Java, and walks through a set of those options for delivery. Specifically using a combination of Docker, Jenkins, Git, and Gradle. Every aspect of this course also comes with a Git repository that contains both details and the examples being discussed.
Learners can follow along by running their own development environments for executing the examples, or just use this as a deep-dive explanation into the inner workings of Java-Jenkins-Gradle delivery. Either way, let working code be your guide. The course structure starts with setting up a basic development environment, and ends with using a Jenkins declarative pipeline to execute a Gradle build using the Java, Maven, Jacoco, and PMD plugins, that on the pass of all the quality gates publishes the resulting Java Library to a Maven Repository.
It additionally covers the concepts of containerization, configuration as code, static code analysis, unit testing, code coverage, and pipelines as code. The course is otherwise divided into three sections:
(1) Infrastructure
Git via Github - Setting up Git so that you can use SSH to get the examples.
Docker and Docker Compose - Installing Docker and Docker Compose to be able to run containers locally.
Jenkins via Docker Compose - Running Jenkins locally in a container.
(2) Building Java
Building Java 101 - The basics of how Java code is turned into a Jar.
Gradle and the Java Plugin - Using the Java Plugin to test and build a Jar.
Gradle and Java Code Coverage - How to generate code coverage for unit testing, and set a quality gate.
Gradle and Java Static Code Analysis - How to run PMD, and set a quality gate.
Gradle and Java Library Publishing - How to publish a Jar to a Maven Repository.
(3) Jenkins Automation
Freestyle Job - Building, Testing, and Delivering the Jar using a Freestyle Job.
Scripted Pipeline - Building, Testing, and Delivering the Jar using a Scripted Pipeline.
Declarative Pipeline - Building, Testing, and Delivering the Jar using a Declarative Pipeline.