in src/com/epam/edp/Nexus.groovy [40:59]
def init() {
this.autouser = job.getParameterValue("NEXUS_AUTOUSER", "jenkins")
this.credentialsId = job.getParameterValue("NEXUS_CREDENTIALS", "nexus-ci.user")
if (platform.checkObjectExists("nexus","nexus"))
{
script.println("[JENKINS][DEBUG] Nexus CR exists")
this.host = job.getParameterValue("NEXUS_HOST", "nexus")
this.port = job.getParameterValue("NEXUS_HTTP_PORT", "8081")
basePath = platform.getJsonPathValue("nexus", "nexus", ".spec.basePath")
this.basePath = basePath == "/" ? "" : "${basePath}"
this.baseUrl = "http://${this.host}:${this.port}${this.basePath}"
}
else
{
script.println("[JENKINS][DEBUG] Nexus CR does not exist")
this.baseUrl = platform.getJsonPathValue("edpcomponent", "nexus", ".spec.url")
}
this.repositoriesUrl = "${this.baseUrl}/repository"
this.restUrl = "${this.baseUrl}/service/rest"
}