From 3834a12de389e66027d57b31bf7d1c1200ef7398 Mon Sep 17 00:00:00 2001 From: Ashraf <64964800+ShaikMohammedAshrafAli@users.noreply.github.com> Date: Wed, 18 Mar 2026 14:39:02 +0530 Subject: [PATCH] Update README.md --- README.md | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1bb4b73..3d419e7 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,26 @@ Managed Scripts plugin for Jenkins [![GitHub release](https://img.shields.io/github/release/jenkinsci/managed-scripts-plugin.svg?label=changelog)](https://github.com/jenkinsci/managed-scripts-plugin/releases/latest) [![Jenkins Plugin Installs](https://img.shields.io/jenkins/plugin/i/managed-scripts.svg?color=blue)](https://plugins.jenkins.io/managed-scripts) +# Managed Scripts Plugin + Managed scripts are shell scripts which are managed centrally by an administrator and can be referenced as a build step within jobs. +## Requirements + +- Jenkins 2.319.3 or newer +- [Config File Provider Plugin](https://plugins.jenkins.io/config-file-provider/) (required dependency) + ## Description -The scripts are managed by the [Config File Provider Plugin](https://plugins.jenkins.io/config-file-provider/), go to the "Manage Jenkins" screen and click on the "Managed files" item. + +The scripts are managed by the [Config File Provider Plugin](https://plugins.jenkins.io/config-file-provider/). Go to the **Manage Jenkins** screen and click on the **Managed files** item. ![](docs/images/managed_files_settings.jpg) -After installing the "Managed Scripts" plugin, you have a new option to create a managed script in the type list. +After installing the Managed Scripts plugin, you have a new option to create a managed script in the type list. ![](docs/images/managed_script_new.jpg) -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. +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. ![](docs/images/edit_managed_config.jpg) @@ -25,7 +33,25 @@ Within the job, a user is able to select the required script from a drop-down me ![](docs/images/use_managed_script.jpg) +## Windows Support + +The plugin also supports managed `.bat` scripts for Windows environments, allowing administrators to centrally manage batch scripts the same way as shell scripts. + +## Pipeline Integration + +Managed scripts can be used in Jenkins Pipeline jobs through the Config File Provider Plugin integration: +```groovy +node { + configFileProvider([configFile(fileId: 'my-script-id', variable: 'SCRIPT')]) { + sh '$SCRIPT' + } +} +``` + +## Contributing + +Contributions are welcome! Please refer to the [Jenkins contribution guidelines](https://github.com/jenkinsci/.github/blob/master/CONTRIBUTING.md) before submitting a pull request. -#### builds are currently executed on: +## License -* [jenkins ci](https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fmanaged-scripts-plugin/) +Licensed under MIT License. See [LICENSE](LICENSE) for details.