Managed scripts are shell scripts which are managed centrally by an administrator and can be referenced as a build step within jobs.
The scripts are managed by the Config File Provider Plugin, go to the "Manage Jenkins" screen and click on the "Managed files" item.
After installing the "Managed Scripts" plugin, you have a new option to create a managed script in the type list.
Now you get to the screen to create your script. You're able to give it a name and a small description. In addition, you have the option to define a list of arguments you want to inform the users about. These arguments will be shown to the user as a hint and within the script you're able to reference these as if you would pass in arguments on the command line ($1, $2,...). Every environment variable from within a build will be visible to the script, too.
Within the job, a user is able to select the required script from a drop-down menu. The defined parameters are shown in respect to the selected script. The link enables the user to have a read-only look at the script.
1.4 (August 15, 2017)
- fix JENKINS-45399 View selected scripts doesn't show correct script
- fix JENKINS-42888 Missing argument labels when adding managed script as build step
1.3 (Dec. 27, 2016)
- update to latest Config File Provider Plugin (1.5) and therefore now supports CloudBees Folders Plugin
the update of the config file provider plugin causes the configuration to be migrated to a new format and therefore a rollback to the former version will not be supported!
1.2.4 (Sep. 10, 2016)
- add support for custom script ids to ease reuse of scripts with pipeline integration of config-file-provider-plugin
1.2.1 (May 18, 2015)
- add support for tokenizing of shell script arguments; allows decomposing the given value of each argument into multiple arguments by splitting via whitespace.
1.2 (May 11, 2015)
- add support for PowerShell PR #5
1.1.2 (July 18, 2014)
- integrate PR #4 set codemirror mode based on shebang line (thanks to domruf)
- integrate PR #3 correct spelling mistake (thanks to stevehollaar)
1.1.1 (Dec. 12, 2013)
- integrate pull #2: show script argument labels (thanks to Ann Campbell)
1.1 (May 19, 2013)
1.0.2 (March 10, 2013)
1.0.1 (Oct 11, 2012)
- fix issue when Jenkins is running with a different root context - details of scripts could not be opened
1.0 (15. April 2012)
- New Feature JENKINS-12365: Add support for managed .bat scripts for Windows
0.2.0 (20. Jan. 2012)
0.1.0 (31. Dec. 2011)
0.0.1 (10. Nov. 2011)
Help and Support
For Help and support please use the Jenkins Users mailing list.
The comment list below is not monitored.