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

Unclear documentation class restriction validation claims classes that exist are not found

    • Job Restrictions 0.8

      Hi,

       

      I didn`t find documentation, how to use class restriction.

      I want to allow running Pipeline jobs. So I choosed "Job class" restriction and typed:

      1. org.jenkinsci.plugins.workflow.job.WorkflowJob;

      2. WorkflowJob.

      In both cases I got error:

      Class org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be resolved: java.lang.ClassNotFoundException: org.jenkinsci.plugins.workflow.job.WorkflowJob

          [JENKINS-51359] Unclear documentation class restriction validation claims classes that exist are not found

          Oleg Nenashev added a comment -

          Which version do you use?
          Starting from 2.111 (JENKINS-46652) this tweak for Pipeline should not be required if you use Authorize project. To be landed in the next LTS

          Regarding the error, it works for me. Are you sure that the Pipeline: Job plugin is actually installed on the instance?

          Oleg Nenashev added a comment - Which version do you use? Starting from 2.111 ( JENKINS-46652 ) this tweak for Pipeline should not be required if you use Authorize project. To be landed in the next LTS Regarding the error, it works for me. Are you sure that the Pipeline: Job plugin is actually installed on the instance?

          Sam Gleske added a comment -

          btk3000 the root cause of the issue is likely job-restrictions is not validating against the uber classloader provided by the plugin manager.

          The short version is you can safely ignore the "validation error" and it will just work. This bug report should track fixing the validation, though.

          Sam Gleske added a comment - btk3000 the root cause of the issue is likely job-restrictions is not validating against the uber classloader provided by the plugin manager. The short version is you can safely ignore the "validation error" and it will just work. This bug report should track fixing the validation, though.

          Sam Gleske added a comment -

          Sam Gleske added a comment - Here's how I configure the plugin today which works fine for pipelines. https://github.com/samrocketman/jenkins-bootstrap-shared/blob/21f76bb94f89dbbd56e8697482c861266c2b456a/scripts/configure-job-restrictions-master.groovy

          Sam Gleske added a comment -

          btk3000 I opened a PR which fixes the error you experienced https://github.com/jenkinsci/job-restrictions-plugin/pull/23

          Sam Gleske added a comment - btk3000 I opened a PR which fixes the error you experienced https://github.com/jenkinsci/job-restrictions-plugin/pull/23

            sag47 Sam Gleske
            btk3000 Ilya Evseenkov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: