Jenkins

Simple script to increment artifact version from within Jenkins pipeline

Simple script to increment artifact version from within Jenkins pipeline

Requirement One important requirement when creating a new build in a continuous integration setup is to generate a unique automated artifact version in an increasing order for better tracking. While working from a Jenkins project, the easiest way to create a version is to use the build number. However, this...

Scripted Pipeline

Structure of a Scripted Pipeline in Jenkins with sample code

There are two ways of writing pipeline code in jenkins, scripted and declarative. Here we will discuss how to start with writing a scripted pipeline in Jenkins. We will write pipeline code for a java web app project using maven, however high level structure will hold true for any project type. First...

Trigger a Jenkins job on code push event in Github via webhooks

Trigger a Jenkins job on code push event in Github via webhooks

Overview In this post, we will discuss a fairly common use case where the source code is stored in version control like Github. We will create a job in Jenkins and integrate it with GitHub. Whenever code is updated in the GitHub repository, an event gets triggered via webhook which...