This plugin provides the following functions.
- Detects an application and its versions installed in slaves, by using a groovy script.
- Enables you to execute builds by specifying the detected application and its version.
First, You need to register the detection setting on the Jenkins global setting page, as follows.
And restart Jenkins, or reconnect slaves to reflect the detection setting.
NOTE: Detection setting is not reflected until disconnecting the node and connecting it again.
Then, you can specfiy some applications and versions at job setting.
Or, Select it runtime by using "Choice Application Version" build parameter.
- Script MUST return a JSON string of the form:
[
{
"version": "Application Version",
"home": "Home Directory of This Version"
},
]
- You can use the 'runExternalCommand()' method to execute external commands and get output.
- And you can use the 'platform' variable to determine the platform in the script. ("windows", "linux", or "osx" will be stored)
Here is some sample scripts.