Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from jglick/return-value-JENKINS-26133
[JENKINS-26133] Return exit status or stdout from sh/bat steps
- Loading branch information
Showing
12 changed files
with
179 additions
and
10 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
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
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...ources/org/jenkinsci/plugins/workflow/steps/durable_task/BatchScriptStep/help-script.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,5 @@ | ||
<div> | ||
Executes a Batch script. Multiple lines allowed. | ||
When using the <code>returnStdout</code> flag, you probably wish to prefix this with <code>@</code>, | ||
lest the command itself be included in the output. | ||
</div> |
3 changes: 0 additions & 3 deletions
3
...ain/resources/org/jenkinsci/plugins/workflow/steps/durable_task/BatchScriptStep/help.html
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
.../resources/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep/config.jelly
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,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
The MIT License | ||
Copyright 2016 CloudBees, Inc. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
--> | ||
|
||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:st="jelly:stapler"> | ||
<st:include page="config-details" class="${descriptor.clazz}"/> | ||
<f:advanced> | ||
<f:entry field="returnStdout" title="${%Return standard output}"> | ||
<f:checkbox/> | ||
</f:entry> | ||
<f:entry field="encoding" title="${%Encoding of standard output}"> | ||
<f:textbox default="${descriptor.defaultEncoding}"/> | ||
</f:entry> | ||
<f:entry field="returnStatus" title="${%Return exit status}"> | ||
<f:checkbox/> | ||
</f:entry> | ||
</f:advanced> | ||
</j:jelly> |
3 changes: 3 additions & 0 deletions
3
...rces/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep/help-encoding.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,3 @@ | ||
<div> | ||
Encoding of standard output, if it is being captured. | ||
</div> |
5 changes: 5 additions & 0 deletions
5
.../org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep/help-returnStatus.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,5 @@ | ||
<div> | ||
Normally, a script which exits with a nonzero status code will cause the step to fail with an exception. | ||
If this option is checked, the return value of the step will instead be the status code. | ||
You may then compare it to zero, for example. | ||
</div> |
6 changes: 6 additions & 0 deletions
6
.../org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep/help-returnStdout.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,6 @@ | ||
<div> | ||
If checked, standard output from the task is returned as the step value as a <code>String</code>, | ||
rather than being printed to the build log. | ||
(Standard error, if any, will still be printed to the log.) | ||
You will often want to call <code>.trim()</code> on the result to strip off a trailing newline. | ||
</div> |
File renamed without changes.
File renamed without changes.
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