Skip to content

Commit

Permalink
Prefer per plugin url over JENKINS_UC_DOWNLOAD_URL (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Oct 10, 2024
1 parent 8cf797f commit 9695387
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1240,12 +1240,13 @@ public String getPluginDownloadUrl(Plugin plugin) {
pluginVersion = Plugin.LATEST;
}

String jenkinsUcDownload = System.getenv("JENKINS_UC_DOWNLOAD");
String jenkinsUcDownload = System.getenv("JENKINS_UC_DOWNLOAD");
String jenkinsUcDownloadUrl = System.getenv("JENKINS_UC_DOWNLOAD_URL");
if (StringUtils.isNotEmpty(jenkinsUcDownloadUrl)) {
urlString = appendPathOntoUrl(jenkinsUcDownloadUrl, pluginName, pluginVersion, pluginName + ".hpi");
} else if (StringUtils.isNotEmpty(pluginUrl)) {

if (StringUtils.isNotEmpty(pluginUrl)) {
urlString = pluginUrl;
} else if (StringUtils.isNotEmpty(jenkinsUcDownloadUrl)) {
urlString = appendPathOntoUrl(jenkinsUcDownloadUrl, pluginName, pluginVersion, pluginName + ".hpi");
} else if (pluginVersion.equals(Plugin.LATEST) && !StringUtils.isEmpty(jenkinsUcLatest)) {
urlString = appendPathOntoUrl(dirName(jenkinsUcLatest), "/latest", pluginName + ".hpi");
} else if (pluginVersion.equals(Plugin.EXPERIMENTAL)) {
Expand Down

0 comments on commit 9695387

Please sign in to comment.