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

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

    Details

    • Similar Issues:
    • Released As:
      Job Restrictions 0.8

      Description

      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

        Attachments

          Issue Links

            Activity

            Hide
            oleg_nenashev 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?

            Show
            oleg_nenashev 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?
            Hide
            sag47 Sam Gleske added a comment -

            Ilya Evseenkov 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.

            Show
            sag47 Sam Gleske added a comment - Ilya Evseenkov 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.
            Show
            sag47 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
            Hide
            sag47 Sam Gleske added a comment -

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

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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: