Revert "Edited methods for artifactory.groovy: restCall, publishArtifactoryHelmChart, deleteArtifactoryHelmChart Related-prod: https://mirantis.jira.com/browse/PROD-31522"
This reverts commit 01305f884dcea212e46a2bc19061bf27f6a8b4d7.
Change-Id: I464c4fd5a0196246cf69125a3c98a0a1c9836903
diff --git a/src/com/mirantis/mk/Artifactory.groovy b/src/com/mirantis/mk/Artifactory.groovy
index 39bafc2..73ed80f 100644
--- a/src/com/mirantis/mk/Artifactory.groovy
+++ b/src/com/mirantis/mk/Artifactory.groovy
@@ -16,7 +16,7 @@
* @param headers Map of additional request headers
*/
def restCall(art, uri, method = 'GET', data = null, headers = [:]) {
- def connection = new URL("${art.url}${uri}").openConnection()
+ def connection = new URL("${art.url}/api${uri}").openConnection()
if (method != 'GET') {
connection.setRequestMethod(method)
}
@@ -444,7 +444,7 @@
* @param chartName Chart name
*/
def publishArtifactoryHelmChart(art, repoName, chartName){
- return restPut(art, "/${repoName}", "${chartName}")
+ return restPut(art, "/repositories/${repoName}", "${chartName}")
}
/**
@@ -455,5 +455,5 @@
* @param chartName Chart name
*/
def deleteArtifactoryHelmChart(art, repoName, chartName){
- return restDelete(art, "/${repoName}", "${chartName}")
+ return restDelete(art, "/repositories/${repoName}", "${chartName}")
}