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

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

    XMLWordPrintable

Details

    • 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

            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?

            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?
            sag47 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.

            sag47 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.
            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
            sag47 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 added a comment - btk3000 I opened a PR which fixes the error you experienced https://github.com/jenkinsci/job-restrictions-plugin/pull/23

            People

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

              Dates

                Created:
                Updated:
                Resolved: