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

readProperties does not interpolate some vars

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • Master and Slave run each on a centOS VM
      Jenkins 2.121.3
      Pipeline-Utility-Steps : 2.2.0

      I have created a property files with vars either initialized to a constant value or to another var coming from the Jenkins instance global properties.
      Then, I create a Jenkinsfile starting with a node block which reads the property file :

      def myEnv
      node {
       myEnv=
      readProperties( file:fileName, interpolate:true )
      
      }
      pipeline {
       ...
      }
      

      Most of vars are correctly set as far as I can check that their value. But few of them are not interpolated. Those I am concerned with are initialized with a global jenkins variable which is either initialized itself as a constant value or using another global variable.
      But some others initialized the same are correctly interpolated.
      So... I am a bit lost.
      Additionally, I tried with interpolate:false ... and surpringly the results was not worst ! It means that variables are interpolated... unless the few that are not.

       

       

            rsandell rsandell
            jlpinardon jlpinardon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: