fix: new relic code works with urls containing multiple dashes
Description
Fixes the new issue where a user cannot deploy more than once.
The error occurred when the domain contained multiple dashes, breaking the split.
In addition, I've added some error handling code to print the response when there is an error on the new relic api.
Supporting information
Testing instructions
Check the below pipelines
Pipeline with error: https://gitlab.com/opencraft/ops/grove-stage-digitalocean/-/jobs/2692345463 Pipeline with fix: https://gitlab.com/opencraft/ops/grove-stage-digitalocean/-/jobs/2692476293
Checklist
If any of the items below is not applicable, do not remove them, but put a check in it.
-
All providers include the new feature/change -
All affected providers can provision new clusters -
Unit tests are added/updated -
Documentation is added/updated -
The TOOLS_CONTAINER_IMAGE_VERSION
in ci_vars.yml is updated -
The grove-template repository is updated
Edited by Keith Grootboom