Add `enhanced-logging` for `trigger-remote`

As for now, JJB lacks the ability to control the `Enable enhanced
logging` option of Parametrized Remote Trigger plugin.
This option allows the console log of the remote job to be printed in
the console log of the calling job.

This patch adds the option `enhanced-logging` to the `trigger-remote`
builder to control this checkbox.
The default value is set to `False` to keep the current behaviour for those
who do not need the logs.

Change-Id: I3d109603b4eb9ce247e5e6c4588053e1c61ba6ce
This commit is contained in:
Andrey Kostrov 2017-12-18 12:09:56 +03:00
parent c4aab5c22d
commit d845352863
4 changed files with 6 additions and 0 deletions

View File

@ -356,6 +356,8 @@ def trigger_remote(registry, xml_parent, data):
block (default 10)
:arg str connection-retry-limit: number of connection attempts to remote
Jenkins server before giving up. (default 5)
:arg bool enhanced-logging: if this option is enabled,
the console output of the remote job is also logged. (default false)
:arg str predefined-parameters: predefined parameters to send to the remote
job when triggering it (optional)
:arg str property-file: file in workspace of current job containing
@ -380,6 +382,7 @@ def trigger_remote(registry, xml_parent, data):
('should-not-fail-build', 'shouldNotFailBuild', False),
('poll-interval', 'pollInterval', 10),
('connection-retry-limit', 'connectionRetryLimit', 5),
('enhanced-logging', 'enhancedLogging', False),
('prevent-remote-build-queue', 'preventRemoteBuildQueue', False),
('block', 'blockBuildUntilComplete', True),
]

View File

@ -8,6 +8,7 @@
<shouldNotFailBuild>false</shouldNotFailBuild>
<pollInterval>5</pollInterval>
<connectionRetryLimit>5</connectionRetryLimit>
<enhancedLogging>true</enhancedLogging>
<preventRemoteBuildQueue>true</preventRemoteBuildQueue>
<blockBuildUntilComplete>true</blockBuildUntilComplete>
<parameters>FOO=&quot;bar&quot;

View File

@ -8,6 +8,7 @@ builders:
poll-interval: 5
connection-retry-limit: 5
block: true
enhanced-logging: True
property-file: '.props'
predefined-parameters: |
FOO="bar"

View File

@ -8,6 +8,7 @@
<shouldNotFailBuild>false</shouldNotFailBuild>
<pollInterval>10</pollInterval>
<connectionRetryLimit>5</connectionRetryLimit>
<enhancedLogging>false</enhancedLogging>
<preventRemoteBuildQueue>false</preventRemoteBuildQueue>
<blockBuildUntilComplete>true</blockBuildUntilComplete>
<loadParamsFromFile>false</loadParamsFromFile>