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
Dependencies
0.31
Aug 27, 2013
1.424
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Gregory Boissinot (id: gbois)
Usage Installations 2013-Apr 885
2013-May 920
2013-Jun 958
2013-Jul 1049
2013-Aug 1022
2013-Sep 1041
2013-Oct 1134
2013-Nov 1099
2013-Dec 1096
2014-Jan 1161
2014-Feb 1160
2014-Mar 1221

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

Features

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.

Configuration

Changelog

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

Labels

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

Add Comment