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.

If every Perl project requires the same command sequence to start the build process, you don't need to keep typing the same info for each new project. And, the question remains: What happens if a few dozen projects move to a new CI server, does this mean starting the insane task of typing and clicking all over again?

[...]

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

  • 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.

  • 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 – 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.

  • NEWS

    Debian Buster Arrives; IBM Acquires Red Hat; Raspberry Pi 4 Is Here; Ubuntu Takes a U-Turn with 32-Bit Support: OpenSSH Fixes Side Channel Attacks; Firefox Fixes Error that Crashed HTTPS Pages; and Altair Releases HyperWorks 2019

  • YunoHost

    YunoHost offers a wide range of services on a proven Debian platform that you can host yourself.

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