Skip to content

Commit

Permalink
make https default for plugin downloads (#265)
Browse files Browse the repository at this point in the history
Co-authored-by: Oleg Nenashev <[email protected]>
  • Loading branch information
Sladyn and oleg-nenashev authored Oct 9, 2020
1 parent 0fb96c3 commit 576d12f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ private void installPlugin(String shortname, String version) throws IOException
File plugin = new File(cache, String.format("plugins/%s/%s-%s.hpi", shortname, shortname, version));
if (!plugin.exists() || ("latest".equals(version) && plugin.lastModified() < CACHE_EXPIRE) ) {
plugin.getParentFile().mkdirs();
final URL url = new URL(getMirrorURL(String.format("http://updates.jenkins.io/download/plugins/%s/%s/%s.hpi", shortname, version, shortname)));
final URL url = new URL(getMirrorURL(String.format("https://updates.jenkins.io/download/plugins/%s/%s/%s.hpi", shortname, version, shortname)));
System.out.printf("Downloading jenkins plugin %s (%s)...%n", shortname, version);
FileUtils.copyURLToFile(url, plugin);
}
Expand All @@ -299,7 +299,7 @@ private String getMirrorURL(String url) {
return url;
}

return url.replace("http://updates.jenkins.io/download", this.mirror);
return url.replace("https://updates.jenkins.io/download", this.mirror);
}

public int run() throws Throwable {
Expand Down

0 comments on commit 576d12f

Please sign in to comment.