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

Doesn't check to see if the template or environment file has been modified

XMLWordPrintable

      If you define the template and environment file entry in a project, the plugin will read the files to display the parameters; which is fine. However, if you update the actual files changing only the content and not the name, there is no check made by the plugin to see if it's different when the project is brought up or built.  The stack will be issued with the settings stored in the Jenkins' XML and not the modified file.

      The plugin either needs an option to always force re-reading the files (i.e. basically use only the file data and ignore using the Jenkins input fields), or it has to track a time stamp to know when the template or environment file has been touched (in which case the parameters stored in the Jenkins' XML structure might be out of date)

      It's easy to reproduce - simply set the template and env file in a project, save it, then go into the workspace and edit the file (change a parameter name, like do a global replace on 'mgmt-ipv4' to 'mgmt-ipv6').  You'll notice that when you bring up the job, it'll still report 'mgmt-ipv4' as a parameter; building the project will result in 'mgmt-ipv4' being used

      You can toggle the template or enviroment field away from the file and back, and it sometimes clears the problem, but there are cases where even that won't reload the XML.  We've had to remove the plugin from the project and re-add it to pick up the changed fields from the file

      (I know you'd assume the filename would be updated as part of the edit; unfortunately these files are coming from a vendor which maintains the same name for minor releases)

       

            methodes_arkea Methodes Appliquees Arkea
            jimw jim woodlock
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: