Start work on version from nexus repo

This commit is contained in:
Jim Nicholson 2024-02-07 20:09:54 -08:00
parent 2ded140e82
commit d2d4e5b6f9

View File

@ -0,0 +1,19 @@
#!/usr/bin/env groovy
import groovyx.net.http.URIBuilder
Map call(Map config = [:]) {
Map defaults = [
nexusBase: 'https://repo.thejimnicholson.com',
searchAPI: 'service/rest/v1/search',
repositoryName: 'tools'
]
Map runConfig = defaults + config
nexusSearch = new URIBuilder(runConfig.nexusBase)
/* groovylint-disable-next-line UnnecessarySetter */
nexusSearch.setPath(runConfig.searchAPI)
nexusSearch.addQueryParam('repository', runConfig.repositoryName)
runConfig.nexusQuery = nexusSearch
return runConfig
}