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

Exclude Jobs managed by JobDSL from config history?

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We are gradually shifting from manually created Jobs to Jobs created by the JobDSL plugin. I wonder if it would be possible to exclude Jobs created by the JobDSL plugin from the history (since this history is not interesting since it gets overwritten by every JobDSL seed-job run).

        Attachments

          Activity

          Hide
          jochengietzen Jochen Gietzen added a comment -

          So, since the created jobs aren't of a specific dslJob type, you cannot simply exclude those jobs, created by the dslJob Plugin.

          Workaround: You can exclude changes by Users. I looked up (on my local machine) which user the dslJob Plugin uses. Seems to be the SYSTEM user.
          So by putting the userId of SYSTEM in the Exclude users field in the Jenkins Configuration (<jenkinsurl>/configure ) one should be able to avoid detecting the dslJob generated Jobs. But: As soon as a user changes something, he will get everything the dslJob Plugin did written to his change. And you might exclude other Plugins, using the SYSTEM user as well.

           

          There might be a possibility. If you are interested in it, please give a seperate Issue or as a Pull Request:
          It might be possible to integrate a pattern exclusion for the names of the job. If your dsl generated Jobs are called "my-wonderful-dsl-job-nr-1.dslJOB" and "my-perfect-dsl-job-nr-30.dslJOB" you could then exclude it by giving a pattern like ".+.dslJOB.*" (just e.g.).
          This could help, iff your dsl generated jobs were named consistently. But please consider, that this would exclude every change of the job, regardless of whom did those.

          Show
          jochengietzen Jochen Gietzen added a comment - So, since the created jobs aren't of a specific dslJob type, you cannot simply exclude those jobs, created by the dslJob Plugin. Workaround: You can exclude changes by Users. I looked up (on my local machine) which user the dslJob Plugin uses. Seems to be the SYSTEM user. So by putting the userId of SYSTEM in the Exclude users field in the Jenkins Configuration (<jenkinsurl>/configure ) one should be able to avoid detecting the dslJob generated Jobs. But : As soon as a user changes something, he will get everything the dslJob Plugin did written to his change. And you might exclude other Plugins, using the SYSTEM user as well.   There might be a possibility. If you are interested in it, please give a seperate Issue or as a Pull Request: It might be possible to integrate a pattern exclusion for the names of the job. If your dsl generated Jobs are called "my-wonderful-dsl-job-nr-1.dslJOB" and "my-perfect-dsl-job-nr-30.dslJOB" you could then exclude it by giving a pattern like ".+.dslJOB.*" (just e.g.). This could help, iff your dsl generated jobs were named consistently. But please consider, that this would exclude every change of the job, regardless of whom did those.

            People

            Assignee:
            stefanbrausch Stefan Brausch
            Reporter:
            tgr Tobias Gruetzmacher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: