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

Job name Enforcer

    XMLWordPrintable

Details

    • New Feature
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • core
    • None

    Description

      The aim of this feature is to be able to add constraints on job's name.
      For instance a simple use case is to be sure the jobs created follow a naming convention.

      This feature comes from the following thread in the jenkins-developer ML.
      https://groups.google.com/forum/?hl=fr#!topic/jenkinsci-dev/rsxUpaNAe18

      Attachments

        Activity

          I have this pretty much implemented, just need to clean things up a bit more...
          There will be a new extension point which allows you to not only reject job names, but also to transform these in to a new name.
          The thing is, that will also have to add this check to a job update - because a rename of the job must be controlled too.

          I will provide two implementation of this new extension:

          • default: does nothing, same as today
          • regex: does exactly what you have provided in your code

          I'll get back to you as soon as I'm further.

          domi Dominik Bartholdi added a comment - I have this pretty much implemented, just need to clean things up a bit more... There will be a new extension point which allows you to not only reject job names, but also to transform these in to a new name. The thing is, that will also have to add this check to a job update - because a rename of the job must be controlled too. I will provide two implementation of this new extension: default: does nothing, same as today regex: does exactly what you have provided in your code I'll get back to you as soon as I'm further.

          This is now implemented:
          https://github.com/jenkinsci/jenkins/commit/a2d9bac03da99d739ecf7ce0be9ba793b93d2c88

          I added a new ExtensionPoint: 'jenkins.model.ProjectNamingStrategy' and two implementations:

          • Default (no restriction, same as today)
          • Pattern (takes a regular expression to restrict the possible names)

          ...will be in 1.454

          domi Dominik Bartholdi added a comment - This is now implemented: https://github.com/jenkinsci/jenkins/commit/a2d9bac03da99d739ecf7ce0be9ba793b93d2c88 I added a new ExtensionPoint: 'jenkins.model.ProjectNamingStrategy' and two implementations: Default (no restriction, same as today) Pattern (takes a regular expression to restrict the possible names) ...will be in 1.454

          Does this enhancement be backported to a LTS version or not?

          danielpetisme Daniel Petisme added a comment - Does this enhancement be backported to a LTS version or not?

          Appreciate the Naming pattern for Project. But once I set this up, it is enforcing the patten for project as well as Folder; why is this to be applied for Folder?
          Could you please add three additional lines similar to the project? 1. Node naming, 2. Folder Naming and 3. View Naming

          sagayd Sagayaraj David added a comment - Appreciate the Naming pattern for Project. But once I set this up, it is enforcing the patten for project as well as Folder; why is this to be applied for Folder? Could you please add three additional lines similar to the project? 1. Node naming, 2. Folder Naming and 3. View Naming

          sagayd this was introduced way longer then folders even exist - please open a new feature request if you wold like this to be changed

          imod Dominik Bartholdi added a comment - sagayd this was introduced way longer then folders even exist - please open a new feature request if you wold like this to be changed

          People

            domi Dominik Bartholdi
            danielpetisme Daniel Petisme
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: