I installed the helm repo plugin for nexus3
Now I want to create the helm hosted repo via RestAPI command, in the same way as I do for raw repository
# RAW Repository
curl -X POST "${NEXUS_URL}/service/rest/v1/script" \
--user "admin:admin123" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d "{ \"name\": \"create_raw_repo\", \"content\": \"repository.createRawHosted(args, 'default')\", \"type\": \"groovy\"}"
curl -X POST "${NEXUS_URL}/service/rest/v1/script/create_raw_repo/run" \
--user "admin:admin123" \
-H "accept: application/json" \
-H "Content-Type: text/plain" \
-d "raw-release"
# HELM Repo
curl -X POST "${NEXUS_URL}/service/rest/v1/script" \
--user "admin:admin123" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d "{ \"name\": \"create_helm_repo\", \"content\": \"repository.createHelmHosted(args, 'default')\", \"type\": \"groovy\"}"
curl -X POST "${NEXUS_URL}/service/rest/v1/script/create_helm_repo/run" \
--user "admin:admin123" \
-H "accept: application/json" \
-H "Content-Type: text/plain" \
-d "helm-demo-release"
The problem is that the repository.createHelmHosted
method doesn't exists.
What is the correct way to do it?