DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • The Complete CI/CD Collection [Tutorials]
  • GitLab vs Jenkins: Which Is the Best CI/CD Tool?
  • Scaling Feature Flag Management for Better Progressive Delivery [Webinar]
  • What is DevOps?

Trending

  • Traffic Management and Network Resiliency With Istio Service Mesh
  • Build Quicker With Zipper: Building a Ping Pong Ranking App Using TypeScript Functions
  • Unlocking Opportunities: The Advantages of Certifications for Software Engineers
  • Time Series Analysis: VAR-Model-As-A-Service Using Flask and MinIO
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. DevOps and CI/CD
  4. Jenkins Description Setter Plugin for Improving Continuous Delivery Visibility

Jenkins Description Setter Plugin for Improving Continuous Delivery Visibility

Alex Soto user avatar by
Alex Soto
·
Jan. 25, 13 · Interview
Like (0)
Save
Tweet
Share
9.95K Views

Join the DZone community and get the full member experience.

Join For Free

In Continuous Delivery each build is potentially shippable. This fact implies among a lot of other things, to assign a none snapshot version to your components as fast as possible so you can refer them through all the process. I suggest creating a release branch, assign the version to the project and then start the typical pipeline (compile, tests, code quality ...) steps to release branch.

If you are using Jenkins, your build job screen will look something like:

Note that we have released the project many times, but there is no quick way to know exactly which version has been constructed in build number 40. To avoid this problem and having a quick overview of which version has been executed in each build job instance, we can use Jenkinsdescription setter plugin. This plugin sets the description for each build, based upon a regular expression of the build log file.

So your build job screen will look something like:
Much better, now we know exactly the result of a build job and which product version has been generated.
So first step is installing the plugin by simply going to:
Jenkins -> Manage Jenkins -> Manage Plugins -> Available
After installation you can open Build Job configuration screen and add a post-build action called "Set build description". Then add a regular expression for extracting the version number. In this case the regular expression is:
\[INFO\]         from version 0\.0\.1-SNAPSHOT to (.*)
Take a look at next fragment of build log file:
[INFO] Scanning for projects...
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building hello 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- versions-maven-plugin:2.0:set (default-cli) @ hello ---
[INFO] Searching for local aggregator root...
[INFO] Local aggregation root: /jobs/helloworld-inital-build/workspace
[INFO] Processing com.lordofthejars.helloworld:hello
[INFO]     Updating project com.lordofthejars.helloworld:hello
[INFO]         from version 0.0.1-SNAPSHOT to 1.0.43
Props: {project.version=1.0.43, project.artifactId=hello, project.groupId=com.lordofthejars.helloworld}

At line 12 we are logging the final version of our product for current pipeline execution, so we create a regular expression which parses that line and the part between brackets are used as decorator.
Depending on log traces the regular expression will differ from this one. In this case, we are always using the same SNAPSHOT version in development and only when product is going to be released (this could be 3 times per day or every night) the final version is generated and set.
Hope this plugin helps you to make your builds more clear.

Continuous Integration/Deployment Jenkins (software) Delivery (commerce) Visibility (geometry)

Published at DZone with permission of Alex Soto, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • The Complete CI/CD Collection [Tutorials]
  • GitLab vs Jenkins: Which Is the Best CI/CD Tool?
  • Scaling Feature Flag Management for Better Progressive Delivery [Webinar]
  • What is DevOps?

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: