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

Job restrictions based on folders plugin (job restrictions plugin, folders plugin)

      When using job restrictions plugin, I want to be able to restrict slaves to only run jobs that are in a certain folder. This should be an easy change.

          [JENKINS-23597] Job restrictions based on folders plugin (job restrictions plugin, folders plugin)

          Joakim Ahle created issue -
          Joakim Ahle made changes -
          Description New: When using job restrictions plugin, I want to be able to restrict slaves to only run jobs that are in a certain folder. This should be an easy change.

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - PR: https://github.com/jenkinsci/job-restrictions-plugin/pull/4
          Oleg Nenashev made changes -
          Assignee New: Joakim Ahle [ joakim_ahle ]
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/com/synopsys/arc/jenkinsci/plugins/jobrestrictions/util/QueueHelper.java
          http://jenkins-ci.org/commit/job-restrictions-plugin/574cc4f631e01018ba7d54fe30c83192cfdd7895
          Log:
          Merge pull request #4 from joakimahle/master

          JENKINS-23597 - General full path support

          Compare: https://github.com/jenkinsci/job-restrictions-plugin/compare/abc856c9d289...574cc4f631e0

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/synopsys/arc/jenkinsci/plugins/jobrestrictions/util/QueueHelper.java http://jenkins-ci.org/commit/job-restrictions-plugin/574cc4f631e01018ba7d54fe30c83192cfdd7895 Log: Merge pull request #4 from joakimahle/master JENKINS-23597 - General full path support Compare: https://github.com/jenkinsci/job-restrictions-plugin/compare/abc856c9d289...574cc4f631e0
          Oleg Nenashev made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 156379 ] New: JNJira + In-Review [ 195394 ]
          Torsten Tuchscheerer made changes -
          Comment [ I tested the plugin and for me it looks like that the pattern for a folder is not compared correctly?! May be I'm wrong and I use the settings not in the way I should. Unfortunately I did not found an example which covers my needs.

          What I did is the following:

          I have a Linux slave connected via SSH. In the node configuration I enabled the plugin and selected _Regular expression (Job Name)_. In the _expression_ field I added _*Linux/**_ - this is a folder where all projects are created which should run on the Linux slave. Additionally I added a value for _Labels_ which is identically with the FQDN of the slave.

          In a project which is a child of the the _*Linux*_ folder I added the value of the slave FQDN in the field _Restrict where this project.._.

          When I start a job now manually it does not start - it's waiting for the next available executor.

          Could you give me a hint what's wrong with my setup? The same behavior for a Windows slave.

          Thanks!

          I'm using:
           * Jenkins 2.32.3
           * Project base matrix authorization 1.4
           * Plugin version 0.6 (also 0.5 was tested) ]

            joakim_ahle Joakim Ahle
            joakim_ahle Joakim Ahle
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: