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

Validating string parameter doesn't show any message

    Details

    • Similar Issues:

      Description

      I've setup the plugin and I got no output on the validation. Looking at my browser's console I can see the following:

      XMLHttpRequest cannot load http://server//descriptor/hudson.plugins.validating_string_paramete…0in%20the%20N.N.N%20format%20(e.g.%20%221.0.0%22%2C%20%221.2.10%22)&value=. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://server:8080' is therefore not allowed access.
      

      Here is my job configuration:

      Name: NewVersion
      Regular expression: \d+\.\d+\.\d+
      Failed Validation Message: The new version must in the N.N.N format (e.g. \"1.0.0\", \"1.2.10\")

      Name: ReleaseVersion
      Regular expression: \d+\.\d+\.\d+-SNAPSHOT
      Failed Validation Message: The release version must in the N.N.N-SNAPSHOT format (e.g. \"1.0.1-SNAPSHOT\")

        Attachments

          Activity

          sergioagostinho Sergio Agostinho created issue -
          Hide
          greendrazi Stuart Sharpe added a comment -

          I have also run in to this issue.

          I think what is happening is that the plugin always uses the URL specified in the Jenkins configuration (under "Jenkins Location / Jenkins URL") instead of the actual URL that was used to load the page.

          In my case, this is because our Jenkins instance can be accessed both with or without the full domain name, e.g. http://myserver/ and http://myserver.mydomain/. Other plugins seem to work fine regardless of which URL is used, but validating-string-parameter-plugin only works if the site was accessed using the exact same URL given in the configuration.

          I have no control over which URL our users choose to access the site, and Jenkins provides no way that I can see to redirect to the canonical URL, so this plugin is unusable for me until this is fixed.

          Show
          greendrazi Stuart Sharpe added a comment - I have also run in to this issue. I think what is happening is that the plugin always uses the URL specified in the Jenkins configuration (under "Jenkins Location / Jenkins URL") instead of the actual URL that was used to load the page. In my case, this is because our Jenkins instance can be accessed both with or without the full domain name, e.g. http://myserver/ and http://myserver.mydomain/ . Other plugins seem to work fine regardless of which URL is used, but validating-string-parameter-plugin only works if the site was accessed using the exact same URL given in the configuration. I have no control over which URL our users choose to access the site, and Jenkins provides no way that I can see to redirect to the canonical URL, so this plugin is unusable for me until this is fixed.
          rtyler R. Tyler Croy made changes -
          Field Original Value New Value
          Workflow JNJira [ 165954 ] JNJira + In-Review [ 182223 ]

            People

            • Assignee:
              petehayes Peter Hayes
              Reporter:
              sergioagostinho Sergio Agostinho
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: