Jenkins by Example

Jenkins by Example

Coming from other continuous integration (CI) solutions, Travis CI, GitLab, and Azure DevOps Service, I was surprised when I found it difficult to learn Jenkins. The good news, however, is that in the end, I found Jenkins relatively easy to use and a pleasure to work with.

Coming from other continuous integration (CI) solutions, Travis CI, GitLab, and Azure DevOps Service, I was surprised when I found it difficult to learn Jenkins. The good news, however, is that in the end, I found Jenkins relatively easy to use and a pleasure to work with.

Looking back, I attribute my difficulty in learning Jenkins to the multitude of ways of accomplishing the same thing in it. This seems to be due to Jenkins’ layered approach, likely for backward compatibility, to adding features.

The Code

The code (written in Go) is purposefully simple:

  • A package, sum, that exports a function, _Sum_and a test for that function
  • main package consisting of a main function that calls the Sum function and outputs the result
  • A module, github.com/hello-jenkins-larkintuckerllc/hello-jenkins, containing the main and sum packages
  • A multi-stage build Dockerfile that builds a Docker image that executes the Go module, i.e., calls the main function

The supporting infrastructure consists of:

For the purposes of this article, there are four operations we can perform with the code:

  • Build Go module; i.e., go build
  • Test each Go package; i.e., go test ./…
  • Build tagged Docker image; e.g., docker build -t sckmkny/hello-jenkins:0.1.1 .
  • Push (to repository) tagged Docker image, e.g.,., docker push sckmkny/hello-jenkins:0.1.1

continuous-integration jenkins azure devops travis ci gitlab

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Jenkins Is Getting Old — It’s Time to Move On

After using Jenkins on several projects, we say it's time to move on. Jenkins is left behind with his old approach — found out more!

Travis CI vs Jenkins: Which CI/CD Tool Is Right For You?

The ultimate showdown between Travis CI vs Jenkins. Check out this guide to know who wins the race! Travis CI and Jenkins are both popular CI/CD tools and were launched in the same year i.e. 2011. As of July 2020, Jenkins has been the more obvious choice as CI/CD tool with 15.9k stars & 6.3k forks, in comparison to TravisCI which has 8k stars & 756 forks. However, these numbers alone don’t imply which CI/CD tool is more suitable for your upcoming or existing project. Jenkins is an open-source & Travis CI is free for open-source projects.

13 Jenkins Alternatives for Continuous Integration

In our [previous article](https://microtica.com/jenkins-is-old-we-need-an-alternative/) , we discussed **the most common problems with Jenkins**  that made us search for an alternative. That’s why in this article, we’re offering a list of the most common Jenkins alternatives for continuous integration. 

Continuous Integration With Azure DevOps

We are going to build a continuous integration pipeline with Azure Pipelines to automate the build and verification process for a TodoService.

Integrating SonarQube with Jenkins

SonarQube is an open-source platform for continuous inspection of code quality. Here, We will discuss integrating SonarQube with Jenkins to achieve CI with fully automated code analysis.