Skip to content

Commit

Permalink
Add download option to jenkins module
Browse files Browse the repository at this point in the history
This allows forcing HTTP 1.1 per official suggestion[1], since HTTP 2
regularly fails when downloading.

[1]: jenkins-infra/helpdesk#3078 (comment)
  • Loading branch information
CyberLine authored and evgeni committed Apr 23, 2024
1 parent 423d3d2 commit 4ac3c88
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions manifests/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
# Pin the plugin to a specific version. This prevents the updater from
# updating it.
#
# @param download_options
# Add options to Archive's curl
#
define jenkins::plugin (
Optional[String] $version = undef,
Optional[String] $config_filename = undef,
Expand All @@ -56,6 +59,7 @@
Boolean $enabled = true,
String $digest_type = 'sha1',
Boolean $pin = false,
Array $download_options = ['--http1.1'],
) {
include jenkins

Expand Down Expand Up @@ -186,16 +190,17 @@
command => "/bin/rm -rf ${jenkins::plugin_dir}/${plugin}",
}
-> archive { $plugin:
source => $download_url,
path => "${jenkins::plugin_dir}/${plugin}",
checksum_verify => $checksum_verify,
checksum => $checksum,
checksum_type => $checksum_type,
proxy_server => $jenkins::proxy::url,
cleanup => false,
extract => false,
require => $plugindir,
notify => $notify,
source => $download_url,
path => "${jenkins::plugin_dir}/${plugin}",
checksum_verify => $checksum_verify,
checksum => $checksum,
checksum_type => $checksum_type,
proxy_server => $jenkins::proxy::url,
cleanup => false,
extract => false,
require => $plugindir,
notify => $notify,
download_options => $download_options,
}
$archive_require = Archive[$plugin]
} else {
Expand Down

0 comments on commit 4ac3c88

Please sign in to comment.