Closed blbeatty closed 4 years ago
I also have not been able to achieve this. Any help would be greatly appreciated. But it seems that a code change may be required to achieve this result.
One slight hack that I did find was this task being added to the build script
// The plugin we use hard codes the public jenkins repository url.
// This overrides that url.
task replaceJenkinsPublicUrl {
project.repositories.each { repo ->
if ('JenkinsPublic'.equals(repo.name)) {
repo.setUrl('https://myrepo/')
}
}
}
That works for me. Thanks for sharing your solution
This was an early decision to make it easier for new consumers to onboard.
Since repositories is mutable, you should be able to remove the existing JenkinsPublic
repository and add your own to the repositories {}
block.
repositories.removeIf { it.name == "JenkinsPublic" }
Gotcha, thanks!
When using this plugin, I'm trying to download the jenkins core and plugin dependencies through a custom repo rather than the default https://repo.jenkins-ci.org/public/. Is there a way to change the base url from which these artifacts get retrieved? I am new to gradle and haven't been able to find a way to accomplish this.