-
Notifications
You must be signed in to change notification settings - Fork 110
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
1 parent
efbc513
commit 257acc1
Showing
11 changed files
with
102 additions
and
35 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
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
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
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
27 changes: 27 additions & 0 deletions
27
...ources/org/jenkinsci/plugins/envinject/EnvInjectJobProperty/help-groovyScriptContent.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
<div> | |||
<p> | |||
Evaluate a Groovy script and inject a map result.<br/> | |||
The groovy script must return a map Java object.<br/> | |||
You can access parameters and other environment variables through variables in the Groovy script.<br/> | |||
For example, the Groovy can compute environment variables from user input parameters, such as:<br/> | |||
<i> | |||
if (CASE==null){<br/> | |||
return null; <br/> | |||
} <br/> | |||
|
|||
def stringValue="StRinG"; <br/> | |||
|
|||
if ("upper".equals(CASE)){ <br/> | |||
def map = [COMPUTE_VAR: stringValue.toUpperCase()]<br/> | |||
return map <br/> | |||
} <br/> | |||
<br/> | |||
if ("lower".equals(CASE)){ <br/> | |||
def map = [COMPUTE_VAR: stringValue.toLowerCase()] <br/> | |||
return map <br/> | |||
} <br/> | |||
</i> | |||
<br/> | |||
This script injects the COMPUTE_VAR environment variable according the CASE parameter value. | |||
</p> | |||
</div> |
2 changes: 1 addition & 1 deletion
2
...sources/org/jenkinsci/plugins/envinject/EnvInjectJobProperty/help-keepBuildVariables.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,6 +1,6 @@ | |||
<div> | <div> | ||
<p> | <p> | ||
Inject Jenkins build variables such as EXECUTOR_NUMBER, BUILD_ID, BUILD_TAG, JOB_NAME and so on. | Inject Jenkins build variables such as EXECUTOR_NUMBER, BUILD_ID, BUILD_TAG, JOB_NAME and so on.<br/> | ||
Inject also environment contributors and build variable contributors provided by other plugins. | Inject also environment contributors and build variable contributors provided by other plugins. | ||
</p> | </p> | ||
</div> | </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
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 method need to check for RUN_SCRIPT permission, as this code is ran on jenkins master: a malicious user with Job.CONFIGURE could set groovy script to access Jenkins.instance.XXX and bypass security