forked from jenkinsci/pipeline-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
38 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
basic-steps/src/main/resources/org/jenkinsci/plugins/workflow/steps/EnvStep/help.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<div> | ||
Sets one or more environment variables within a block. | ||
This is a more robust way of setting variables than setting values of <code>env.NAME</code>. | ||
<p>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. | ||
|
||
<p> | ||
<iframe src="${rootURL}/env-vars.html" width="100%"></iframe> | ||
</p> | ||
|
||
The following variables are currently unavailable inside a workflow script: | ||
<ul> | ||
<li>EXECUTOR_NUMBER</li> | ||
<li>NODE_NAME</li> | ||
<li>NODE_LABELS</li> | ||
<li>WORKSPACE</li> | ||
</ul> | ||
|
||
<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: | ||
|
||
<p/> | ||
<pre> | ||
mail (to: '[email protected]', | ||
subject: "Job '${env.JOB_NAME}' (${env.BUILD_NUMBER}) is waiting for input", | ||
body: "Please go to ${env.BUILD_URL} and verify the build"); | ||
</pre> | ||
|
||
<p/> | ||
For more on environment variables, | ||
<a href="https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md#managing-the-environment" target="_blank">see | ||
here</a>. | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,42 +24,6 @@ | |
</p> | ||
<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. | ||
|
||
<p> | ||
<iframe src="${rootURL}/env-vars.html" width="100%"></iframe> | ||
</p> | ||
|
||
The following variables are currently unavailable inside a workflow script: | ||
<ul> | ||
<li>EXECUTOR_NUMBER</li> | ||
<li>NODE_NAME</li> | ||
<li>NODE_LABELS</li> | ||
<li>WORKSPACE</li> | ||
</ul> | ||
|
||
<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: | ||
|
||
<p/> | ||
<pre> | ||
mail (to: '[email protected]', | ||
subject: "Job '${env.JOB_NAME}' (${env.BUILD_NUMBER}) is waiting for input", | ||
body: "Please go to ${env.BUILD_URL} and verify the build"); | ||
</pre> | ||
|
||
<p/> | ||
For more on environment variables, | ||
<a href="https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md#managing-the-environment" target="_blank">see | ||
here</a>. | ||
|
||
<h3>Current build</h3> | ||
<p> | ||
The <code>currentBuild</code> variable may be used to refer to the currently running build. | ||
|