Start work on version from nexus repo
This commit is contained in:
parent
2ded140e82
commit
d2d4e5b6f9
19
vars/addVersionFromNexusRepo.groovy
Normal file
19
vars/addVersionFromNexusRepo.groovy
Normal 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
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user