Skip to content
 
 

Latest commit

 

History

147 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Managed Scripts plugin for Jenkins

Build Status Jenkins Plugin GitHub release Jenkins Plugin Installs

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

Description

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.

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:

node {
    configFileProvider([configFile(fileId: 'my-script-id', variable: 'SCRIPT')]) {
        sh '$SCRIPT'
    }
}

Contributing

Contributions are welcome! Please refer to the Jenkins contribution guidelines before submitting a pull request.

License

Licensed under MIT License. See LICENSE for details.

About

Jenkins plugin which allows the central configuration of scripts, these scripts can be reused as build steps in every job.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages