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

JobDsl should respect Job post-construction initialization

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core, job-dsl-plugin
    • None
    • Jenkins 2.168/2.193
      JobDsl plugin 1.72/1.77-SNAPSHOT

      Hello!
       
      we currently faced the following issue.
       
      If we run the creation of job via jobDsl pipeline step (https://jenkins.io/doc/pipeline/steps/job-dsl/) with any parameters, we are getting a folder on our filesystem without "legacyIds" file in builds directory.
      examples are in the bottom of this post.
      The problem is that if there is no legacyIds file in builds directory, after restarting of jenkins server, we are facing long migrations for all jobs created after the previous reboot
       

      Pull request with fix: https://github.com/jenkinsci/job-dsl-plugin/pull/1204

       
      Examples:
      job created via jobDsl:

      [root@server]# ls -lah builds/jobDsl_job
      total 2.5K
      drwxr-xr-x 1 centos centos 808K Sep 12 07:23 .
      drwxr-xr-x 1 centos centos 3.1G Sep 12 07:21 ..
      drwxr-xr-x 1 centos centos 808K Sep 12 07:23 1
      lrwxrwxrwx 1 centos centos    2 Sep 12 07:19 lastFailedBuild -> -1
      lrwxrwxrwx 1 centos centos    1 Sep 12 07:23 lastStableBuild -> 1
      lrwxrwxrwx 1 centos centos    1 Sep 12 07:23 lastSuccessfulBuild -> 1
      lrwxrwxrwx 1 centos centos    2 Sep 12 07:19 lastUnstableBuild -> -1
      lrwxrwxrwx 1 centos centos    2 Sep 12 07:19 lastUnsuccessfulBuild -> -1
      

      job created via manual creation:

      [root@server]# ls -lah builds/manual_job
      total 0
      drwxr-xr-x 1 centos centos    0 Sep 12 07:21 .
      drwxr-xr-x 1 centos centos 3.1G Sep 12 07:21 ..
      -rw-r--r-- 1 centos centos    0 Sep 12 07:21 legacyIds
      

            bulanovk Konstantin Bulanov
            bulanovk Konstantin Bulanov
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: