O'Reilly logo

Jenkins Continuous Integration Cookbook by Alan Berg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Manipulating environmental variables

This recipe shows you how to pass variables from Jenkins to your build Job and how different variables are overwritten. It also describes one way of failing the build if crucial information has not been correctly passed.

Jenkins has a number of plugins for passing information to builds including the Setenv plugin (https://wiki.jenkins-ci.org/display/JENKINS/Setenv+Plugin), Envfile plugin (https://wiki.jenkins-ci.org/display/JENKINS/Envfile+Plugin), and the EnvInject plugin (https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin). The Envinject plugin was chosen for this recipe as it is reported to work with nodes and offers a wide range of property injection options.

Getting ready

Install the Envinject ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required