Adding environment variables
You can add environment variables in Jenkins in a number of different ways.
Global environment variable configuration
From the Jenkins dashboard, click the Manage Jenkins
button:

Once you click the Manage Jenkins
button, you will need to click the Configure System
button:

You will then be navigated to the Configure System
section and will then be able to add environment variables using the Global properties
section:

Notice here that I added a Name
, SAMPLE_VALUE
, with the Value
as Hello Book Readers
. Now, this global property is available as an environment variable in the shell environment variable. You can add as many environment variables as you need in this section. Note that this global property will be available for every single job now.
EnvInject Plugin
You can also choose a more granular level of setting environment variables for each particular build item.
Install the EnvInject Plugin (https://wiki.jenkins.io/display/JENKINS/EnvInject+Plugin) by performing the...