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

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

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Activity

          joakim_ahle Joakim Ahle created issue -
          joakim_ahle Joakim Ahle made changes -
          Field Original Value New Value
          Description 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 Oleg Nenashev added a comment - PR: https://github.com/jenkinsci/job-restrictions-plugin/pull/4
          oleg_nenashev Oleg Nenashev made changes -
          Assignee Joakim Ahle [ joakim_ahle ]
          oleg_nenashev Oleg Nenashev made changes -
          Status Open [ 1 ] 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_issue_link 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 Oleg Nenashev made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 156379 ] JNJira + In-Review [ 195394 ]
          nightman68 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) ]
          oleg_nenashev Oleg Nenashev added a comment -

          nightman68 I'd guess you were just using windcards instead of regular expressions (just see a wildcard in your deleted comment)

          oleg_nenashev Oleg Nenashev added a comment - nightman68 I'd guess you were just using windcards instead of regular expressions (just see a wildcard in your deleted comment)
          nightman68 Torsten Tuchscheerer added a comment - - edited

          Hi Oleg, that's right. I found the solution in the old version of the plugins Wiki page inside the comments. Unfortunately they are not visable in the new edition

          nightman68 Torsten Tuchscheerer added a comment - - edited Hi Oleg, that's right. I found the solution in the old version of the plugins Wiki page inside the comments. Unfortunately they are not visable in the new edition

          People

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

            Dates

              Created:
              Updated:
              Resolved: