Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28602

Error: Default domain calculated from "api" domain

XMLWordPrintable

      Hi,

      it's me again

      I have the following CF setup now.
      One domain for the api (say: api.cf.my-company.corp).
      But the default domain for application is different (say: cfapps.my-company.corp).

      When I deploy using your Jenkins plug-in, it tries to deploy to "myapp.cf.my-company.corp". That results in an error because the domain is not available for applications.

      This is what I get when I run "cf domains":

      >cf domains
      Getting domains in org trial as X...
      name                      status
      cfapps.my-company.corp   shared
      

      Of course, I can specify the "domain" in the manifest.yml file and that will be taken.
      However, I would like to avoid this - landscape specifics.

      When I push from the command line, it works without a problem. the "cfapps" domain is taken.

      In the code, I noticed the domain is derived like this:

      URL targetUrl = new URL(target);
      String[] split = target.split("\\.", 2);
      String domain = split[split.length - 1];
      

      Do you think you can fix this?

      And if I wanted to have a go at it, what would be the right way? Do you know how the "cf" command line does it?

      Andreas.

            williamg William Gautier
            buchen Andreas Buchen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: