-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move Exec['reload-jenkins'] from jenkins::cli -> jenkins::cli::reload
Due to resource containment, it was not possible for a consumer of `jenkins::cli` to both have a dependency on `Class['jenkins::cli']` and to notify `Exec['reload-jenkins']`. It is recommended that notifications be instead be sent to `Class['jenkins::cli::reload']` to ease any future refactoring.
- Loading branch information
Showing
3 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Class: jenkins::cli::reload | ||
# | ||
# Command Jenkins to reload config.xml via the CLI. | ||
# | ||
class jenkins::cli::reload { | ||
|
||
if $caller_module_name != $module_name { | ||
fail("Use of private class ${name} by ${caller_module_name}") | ||
} | ||
|
||
# Reload all Jenkins config from disk (only when notified) | ||
exec { 'reload-jenkins': | ||
command => "${::jenkins::cli::cmd} reload-configuration", | ||
path => ['/bin', '/usr/bin'], | ||
tries => 10, | ||
try_sleep => 2, | ||
refreshonly => true, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters