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

            btk3000 Ilya Evseenkov created issue -
            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?
            oleg_nenashev Oleg Nenashev made changes -
            Field Original Value New Value
            Assignee Oleg Nenashev [ oleg_nenashev ]
            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 made changes -
            Link This issue is related to JENKINS-31866 [ JENKINS-31866 ]
            sag47 Sam Gleske made changes -
            Summary Unclear documentation Unclear documentation class restriction validation claims classes that exist are not found
            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
            sag47 Sam Gleske made changes -
            Assignee Oleg Nenashev [ oleg_nenashev ] Sam Gleske [ sag47 ]
            sag47 Sam Gleske made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            oleg_nenashev Oleg Nenashev made changes -
            Released As Job Restrictions 0.8
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: