Skip to content
Browse files
Merge branch 'master' into JENKINS-26122
* master:
  [JENKINS-27145] Noting #75 in changelog.
  Updating list of unavailable variables (again :) ).
  [FIXED JENKINS-26692] Added BuildTriggerStep.quietPeriod.
  @tfennelly requests more descriptive variable names.
  Needed to update a test as well.
  [FIXED JENKINS-26072] Added WorkspaceStep.dir.
  Updating list of unavailable variables.
  Linking to environment variable (${rootURL}/env-vars.html) in the workflow script help page.


Originally-Committed-As: 772063078e09d19adb881f4c5d52188c0ba36620
  • Loading branch information
tfennelly committed Mar 6, 2015
2 parents e1ef5f8 + fdf6ab2 commit 6577037dfc574ec618f3475936081dc3bb223dd8
@@ -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
@@ -90,7 +90,8 @@
@Test public void blockSteps() throws Exception {
assertRoundTrip(new ExecutorStep(null), "node {\n // some block\n}");
assertRoundTrip(new ExecutorStep("linux"), "node('linux') {\n // some block\n}");
assertRoundTrip(new WorkspaceStep(), "ws {\n // some block\n}");
assertRoundTrip(new WorkspaceStep(null), "ws {\n // some block\n}");
assertRoundTrip(new WorkspaceStep("loc"), "ws('loc') {\n // some block\n}");

@Test public void escapes() throws Exception {

0 comments on commit 6577037

Please sign in to comment.