Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 697 Bytes

jenkins_command.md

File metadata and controls

29 lines (18 loc) · 697 Bytes

jenkins_command

This resource executes arbitrary commands against the Jenkins CLI

Actions

  • :execute

Examples

To perform a restart

jenkins_command 'safe-restart'

To reload the configuration from disk:

jenkins_command 'reload-configuration'

To prevent Jenkins from starting any new builds (in preparation for a shutdown):

jenkins_command 'quiet-down'

NOTE You must add your own not_if/only_if guards to the jenkins_command to prevent duplicate commands from executing. Just like Chef's core execute resource, the jenkins_command resource has no way of being idempotent.