Perl script sets up Jenkins jobs to automate builds and tests

Automatic Testing

Article from Issue 168/2014
Author(s):

Instead of configuring the Jenkins continuous integration server in the browser with mouse clicks and text input for builds, programmers can store the necessary data in the source control system and let a Perl script do the work.

Continuous integration (CI) and the associated productivity gains are now firm favorites in the development universe. Input the code into the source control system, issue a pull request, have a co-worker check it  – already the cogwheels of the CI pipeline grab the change, run it through the ever-growing test suite, and, presto, everything gets released all at once. CI servers like Jenkins [1] or TeamCity [2], which grab the latest source versions of a project and fire up a build with all tests and possible deployment steps, are enjoying growing popularity.

But spending two minutes creating a new build project in Jenkins' recalcitrant interface can wear down the enthusiasm of even the most motivated developers. As Figure 1 shows, the quest here is to find the required boxes, check them, and fill out some text fields.

Figure 1: Jenkins is currently performing a build and test of the CPAN log4perl project, which resides on GitHub.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • vcpkg

    If you use a state-of-the-art language such as C/C++, you need a package manager in your toolbox for managing libraries and their dependencies. Microsoft's vcpkg package manager offers an easy-to-use, platform-independent solution.

  • Perl: Travis CI

    A new service on travis-ci.org picks up GitHub projects, runs new code through test suites, and notifies the owners if the build fails. Its API enables Perl scripts to gather historical build data, including who-broke-the-build tabulations.

  • Perl – Programming Tips

    If you have been programming for decades, you've likely gathered a personal bag of tricks and best practices over the years – much like this treasure trove from the Perlmeister.

  • Perl – Using Ansible

    The superluminal speed of the provisioning tool Ansible is suitable for configuration and release management of medium-sized server farms, as well as for use at home for restoring adjustments on your Linux desktop.

  • Koha Library System

    Information technology plays a key role in modern library environments. We check out Koha, an open source integrated system that can help manage a library’s daily operations.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News