Jenkins 2.x Continuous Integration Cookbook, Third Edition by Mitesh Soni

Jenkins 2.x Continuous Integration Cookbook, Third Edition by Mitesh Soni

Author:Mitesh Soni
Language: eng
Format: epub
Tags: COM051440 - COMPUTERS / Software Development and Engineering / Tools, COM048000 - COMPUTERS / Systems Architecture / Distributed Systems and Computing, COM051330 - COMPUTERS / Software Development and Engineering / Quality Assurance and Testing
Publisher: Packt publishing
Published: 2017-10-27T09:35:49+00:00


Configuring a Maven project for execution

Let's configure a Maven project in Jenkins with static code analysis, compilation of files, creation of the package file, and archiving it so you can use it later in another build job or project.

Getting ready

You have already created a Maven project in Jenkins in Chapter 1, Getting Started with Jenkins, in the recipe, Creating a Maven Job for a Maven project.

How to do it...

Go to Jenkins dashboard | Maven Project | General Section.

Select Discard old builds | Configure Max # of builds to keep (to avoid too many builds and save disk space).

As the Maven template was selected at the time the build job or project was created, we only need to verify the path of pom.xml and then we can give package as a goal to create a package or WAR file in case of Java.

Go to Post-build Actions | Add post-build action | Archive the artifacts.

Provide the path of the war file that needs to be archived so another project can utilize the package file if required.

Click on Build now.

Go to Console Output and verify the build execution log for all the operations or actions that we have configured.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.