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

Implementation jobs lost parameters, defined in template job after restart Jenkins

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: ez-templates-plugin
    • Labels:
      None
    • Environment:
      Jenkins = 2.7.3
      ez-templates-plugin = 1.2.0
    • Similar Issues:

      Description

      Implementation jobs lost parameters, defined in template job after restart Jenkins.

      In template job defined next String parameters:
      GITLAB_PROJECT = project
      GITLAB_GROUP = group

      In implementation job defined next String parameters:
      GITLAB_PROJECT = someProject
      GITLAB_GROUP = someGroup

      Implementation job has checked setting: "Retain local job parameter values"

      Its work as expected, bu after restart Jenkins, we see that implementation job lost all parameters.

      And than we go to template job and without changes press save it (for sync parameters).
      Then go to implementation jobs and enter again default values for this params =(

        Attachments

          Issue Links

            Activity

            buinskii Alexander Buinskii created issue -
            buinskii Alexander Buinskii made changes -
            Field Original Value New Value
            Environment Jenkins = 2.7.3
            ez-templates-plugin = 1.2.0
            Hide
            drekbour Marc Carter added a comment -

            Already fixed Alex. Please upgrade to latest.

            Show
            drekbour Marc Carter added a comment - Already fixed Alex. Please upgrade to latest.
            drekbour Marc Carter made changes -
            Link This issue duplicates JENKINS-36749 [ JENKINS-36749 ]
            drekbour Marc Carter made changes -
            Assignee Joel Johnson [ joelj ] Marc Carter [ drekbour ]
            drekbour Marc Carter made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            drekbour Marc Carter made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            drekbour Marc Carter made changes -
            Status In Review [ 10005 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]
            Hide
            ellenvr ellen van ravensteyn added a comment -

            Using jenkins 2.89.2

            ez templates version 1.3.2

            This issue still applies

            use case:

            job_A is template job with 3 parameters: TEST1, TEST2, TEST3. all with default empty values
            job_B implements this template, TEST1 has default value 'test'
            in advanced options: 'Retain local job parameter values' is enabled.

            All works well untill jenkins restart: after restart all job_B parameters are gone
            job_B job configuration still shows 'This project is parameterized', but no parameters available
            So it seems on jenkins start-up the parameter load fails.

            I created a workaround with a groovy script on jenkins start-up to make sure these parameters appear again, using TemplateUtils.handleTemplateImplementationSaved
            based on: https://stackoverflow.com/questions/38726296/using-the-ez-template-plugin-for-jenkins-through-the-jenkins-job-dsl-doesnt-app

            After execution of this code: all parameters are again available on job_B, except the default parameter value has disappaered.

            So after each jenkins restart, all default values for jobs using the template, have to be re-applied manually.

             

            Show
            ellenvr ellen van ravensteyn added a comment - Using jenkins 2.89.2 ez templates version 1.3.2 This issue still applies use case: job_A is template job with 3 parameters: TEST1, TEST2, TEST3. all with default empty values job_B implements this template, TEST1 has default value 'test' in advanced options: 'Retain local job parameter values' is enabled. All works well untill jenkins restart: after restart all job_B parameters are gone job_B job configuration still shows 'This project is parameterized', but no parameters available So it seems on jenkins start-up the parameter load fails. I created a workaround with a groovy script on jenkins start-up to make sure these parameters appear again, using TemplateUtils.handleTemplateImplementationSaved based on: https://stackoverflow.com/questions/38726296/using-the-ez-template-plugin-for-jenkins-through-the-jenkins-job-dsl-doesnt-app After execution of this code: all parameters are again available on job_B, except the default parameter value has disappaered. So after each jenkins restart, all default values for jobs using the template, have to be re-applied manually.  
            ellenvr ellen van ravensteyn made changes -
            Resolution Fixed [ 1 ]
            Status Closed [ 6 ] Reopened [ 4 ]

              People

              • Assignee:
                drekbour Marc Carter
                Reporter:
                buinskii Alexander Buinskii
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: