ScriptTrigger Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID scripttrigger Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
0.31 (archives)
Aug 27, 2013
Source Code
Issue Tracking
Open Issues
Gregory Boissinot (id: gbois)
Usage Installations 2014-Mar 1221
2014-Apr 1249
2014-May 1246
2014-Jun 1269
2014-Jul 1374
2014-Aug 1352
2014-Sep 1433
2014-Oct 1440
2014-Nov 1433
2014-Dec 1416
2015-Jan 1488
2015-Feb 1522

ScriptTrigger makes it possible to monitor an environment with a script.


The ScriptTrigger plug-in enables you to configure the polling predicate by the evaluation of a script.

Two types of script are supported
* Groovy script
If the expression evaluation returns true, a build is scheduled.
* Shell or Windows Batch script
A script is executed and a build is scheduled if the exit code matches your expected exit code.

For both types, if the script execution output contains the content <cause>YOUR_SCHEDULED_CAUSE</cause>, 'YOUR_SCHEDULED_CAUSE' is used as the build cause.
Additionally, if the script execution output contains the content <description>MY DESCRIPTION</description>, the 'MY DESCRIPTION' value is attached to the run.

Note: The plug-in uses only persistence in memory. There is no impact on the Jenkins infrastructure (no new files created).
This plugin provides a polling typology among the XTrigger Plugin.

Known limitations

Impossible to combine it with EnvInject plugin

Script Trigger plugin enables you to run an external script for knowing if job has to be scheduled, whereas EnvInject enables you to control environment variables when the job runs. Therefore, scripttrigger and EnvInject have 2 disctinct objectives. In conclusion, it is not possible to exploit envinject configuration. Your Script has to be standalone and independent from the job. Export your environment variables directly from your script.



Release 0.31

* Fix issue #19379 - The scripttrigger plugins fails to load the parameter files when the System script is in use.

Release 0.30

* Fix issue #18667 - NullPointerException when saving job config

Release 0.29

* Adding envvar replacement for groovyFilePath

Release 0.28

* Fix issue #17641 \ Unknown field 'logEnabled' in org.jenkinsci.lib.xtrigger.XTriggerCause

Release 0.27

* Fix reopened issue #17566 - Severe polling error when using script trigger

Release 0.26

* Fix issue #17566 - Severe polling error when using script trigger

Release 0.25

* Test if the node is active when the polling do the work

Release 0.24

* Updat to xtrigger-lib 0.20
** Refactor error management

Release 0.23

* Fix polling issue by updating to org.jenkins-ci.lib:xtrigger-lib:jar:0.19:compile
- org.jenkins-ci.lib:envinject-lib:jar:1.16:compile

Release 0.22

* Re-adding newLine to line read in script content

Release 0.21

* Fix issue #14535 - Fails to poll when no executors on master

Release 0.20

* Fix issue #14104 - Use same node which has been specified in the "Restrict where this project can be run" field

Release 0.19

* Try to delete generated temporary file
* Upgrade to xtrigger-lib 0.12

Release 0.18

* Add an option to have concurrent builds
* Update to xtrigger-lib 0.11

Release 0.17

* Fix issue #13542 - Backslashes in Environment / Script-Variables are not quoted correctly for Groovy
* Update to xtrigger-lib 0.10

Release 0.16

* Fix issue #13208 - Use EnvVarsResolver for Groovy scripts
* Fix issue #13209 -Support System Groovy scripts
* Merge pull request

  • Add system script checkbox in configuration UI
  • Add log/out/job variables to groovy shell
  • Setup the SYSTEM user during script execution
  • Log envvars used for script re-writing
  • Log messages and stack traces if the groovy script fails

Release 0.15

* Update to xtrigger-lib 0.8

Release 0.14

* Update to xtrigger-lib 0.7

Release 0.13

* Fixed issue #11907 - scripttrigger doesn't close file

Release 0.12

* Environment variables are taken into account

Release 0.11.1

* Removed duplicate script resolution

Release 0.11

* Added cause and description attachment if they are present in the script execution output

Release 0.10

* Added the ability to inject environment variables with the EnvInject Plugin.

Release 0.9

* Added environment and job variables resolution to the script content

Release 0.8

* Fixed issue #11042 - IOException when running ScriptTrigger with slaves
* Built for 1.409 (LTS series compatibility)
* Fixed log polling file

Release 0.7

* Fixed script execution node
* Refactoring

Release 0.6

* Added Jenkins environment variables resolution in script execution

Release 0.5

* Added the ability to provide scripts with a file path

Release 0.4.1

* Fixed a hep plugin message

Release 0.4

* Added a polling an the exit code of a shell script or a Windows batch script.

Release 0.3

* Improved help files
* Added a check: executing the script only if the Jenkins instance is not isQuietingDown() and the job is buildable

Release 0.2

* Added the feature: 'Can specify job properties as a properties file'

Release 0.1

* Initial release


plugin-trigger plugin-trigger Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment