Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files
Merge pull request #75 from tfennelly/JENKINS-27145
[JENKINS-27145] Linking to env-vars.html from UI
  • Loading branch information
tfennelly committed Mar 6, 2015
2 parents 0e956a5 + 14c029f commit 20212cec2d17976dedf3d42f518c9210f9af7a4f
Showing with 36 additions and 0 deletions.
  1. +36 −0 cps/src/main/resources/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition/help-script.html
@@ -23,3 +23,39 @@
but if you specify multiple parameters they must all be named:
<pre>stage name: 'Build', concurrency: 1</pre>

<h3>Environment Variables</h3>

A set of environment variables are made available to all Jenkins Job types, including Workflow Jobs.
The following is a general list of variables (by name) that are available to all Job types. See the notes
below the list for Workflow specific details.

<iframe src="${rootURL}/env-vars.html" width="100%"></iframe>

The following variables are currently unavailable inside a workflow script:

<h4>Using Environment Variables</h4>

Environment variables are injected into scripts through a variable named "<strong>env</strong>". This variable,
like any other variable, can be used in the general flow of the script, or in variable substitutions e.g. when
constructing email content when using the <code>mail</code> step:

mail (to: '',
subject: "Job '${env.JOB_NAME}' (${env.BUILD_NUMBER}) is waiting for input",
body: "Please go to ${env.BUILD_URL} and verify the build");

For more on environment variables,
<a href="" target="_blank">see

0 comments on commit 20212ce

Please sign in to comment.