• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • envinject-plugin
    • None

      If you inject a properties file with new line characters it is not parsing these correctly. Also it appears to be treating the properties file and the properties content differently.

      To address this issue I submitted a pull request to force parsing as a standard Java properties object and then also extracted the parsing logic to be the same for both the content box and property files.

          [JENKINS-31573] New line characters are not parsing correctly

          John Jones created issue -
          Manuel Recena Soto made changes -
          Description Original: If you inject a properties file with new line characters it is not parsing these correctly. Also it appears to be treating the properties file and the properties content differently.

          To address this issue I submitted a pull request to force parsing as a standard Java properties object and then also extracted the parsing logic to be the same for both the content box and property files.


          https://github.com/jenkinsci/envinject-plugin/pull/78
          New: If you inject a properties file with new line characters it is not parsing these correctly. Also it appears to be treating the properties file and the properties content differently.

          To address this issue I submitted a pull request to force parsing as a standard Java properties object and then also extracted the parsing logic to be the same for both the content box and property files.
          Manuel Recena Soto made changes -
          Remote Link New: This issue links to "PR (Web Link)" [ 13532 ]

          Josh Davidson added a comment -

          Nice. I've been troubleshooting a problem with a Windows build that injects a multi-line properties file. All of my Linux jobs that inject multi-line properties files work OK.

          As a workaround, I was able to get it to get the property file to inject correctly in Windows by running unix2dos on it as a build step.

          Josh Davidson added a comment - Nice. I've been troubleshooting a problem with a Windows build that injects a multi-line properties file. All of my Linux jobs that inject multi-line properties files work OK. As a workaround, I was able to get it to get the property file to inject correctly in Windows by running unix2dos on it as a build step.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 166998 ] New: JNJira + In-Review [ 182545 ]

          Code changed in jenkins
          User: John Jones
          Path:
          src/main/java/org/jenkinsci/plugins/envinject/service/PropertiesLoader.java
          src/main/java/org/jenkinsci/plugins/envinject/util/SortedProperties.java
          src/test/java/org/jenkinsci/plugins/envinject/sevice/PropertiesGetterTest.java
          src/test/java/org/jenkinsci/plugins/envinject/sevice/PropertiesLoaderTest.java
          http://jenkins-ci.org/commit/envinject-plugin/e64c47d89c0c9865e5ab6578172cf6d203e3b8a0
          Log:
          [FIXED JENKINS-31573] New line characters not parsing correctly (#78)

          • Updated test to use LinkedHashMap since it expects order to be correct
          • Used Java properties to parse content and files instead of custom class.
          • Adding back in SortedProperties as a deprecated class

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: John Jones Path: src/main/java/org/jenkinsci/plugins/envinject/service/PropertiesLoader.java src/main/java/org/jenkinsci/plugins/envinject/util/SortedProperties.java src/test/java/org/jenkinsci/plugins/envinject/sevice/PropertiesGetterTest.java src/test/java/org/jenkinsci/plugins/envinject/sevice/PropertiesLoaderTest.java http://jenkins-ci.org/commit/envinject-plugin/e64c47d89c0c9865e5ab6578172cf6d203e3b8a0 Log: [FIXED JENKINS-31573] New line characters not parsing correctly (#78) Updated test to use LinkedHashMap since it expects order to be correct Used Java properties to parse content and files instead of custom class. Adding back in SortedProperties as a deprecated class
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          http://jenkins-ci.org/commit/envinject-plugin/980150dd4dd931751155995be76416faa4201ce2
          Log:
          [FIXED JENKINS-38607] - Add explicit compatibility notice for the JENKINS-31573 change

          Also updates maven-hpi-version to the version declared in POM

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/envinject-plugin/980150dd4dd931751155995be76416faa4201ce2 Log: [FIXED JENKINS-38607] - Add explicit compatibility notice for the JENKINS-31573 change Also updates maven-hpi-version to the version declared in POM

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          src/main/resources/index.jelly
          src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectBuilder/config.jelly
          src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectNodeProperty/config.jelly
          src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectNodeProperty/global.jelly
          src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectPasswordWrapper/config.jelly
          src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectVarList/index.jelly
          http://jenkins-ci.org/commit/envinject-plugin/df2515692aa050cfda1ece0ffdbc5c7cb5487c8e
          Log:
          Merge pull request #108 from oleg-nenashev/bug/JENKINS-38607

          [FIXED JENKINS-38607] - Add explicit compatibility notice for the JENKINS-31573 change

          Compare: https://github.com/jenkinsci/envinject-plugin/compare/8aec81f23148...df2515692aa0

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml src/main/resources/index.jelly src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectBuilder/config.jelly src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectNodeProperty/config.jelly src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectNodeProperty/global.jelly src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectPasswordWrapper/config.jelly src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectVarList/index.jelly http://jenkins-ci.org/commit/envinject-plugin/df2515692aa050cfda1ece0ffdbc5c7cb5487c8e Log: Merge pull request #108 from oleg-nenashev/bug/ JENKINS-38607 [FIXED JENKINS-38607] - Add explicit compatibility notice for the JENKINS-31573 change Compare: https://github.com/jenkinsci/envinject-plugin/compare/8aec81f23148...df2515692aa0
          Oleg Nenashev made changes -
          Link New: This issue is related to JENKINS-39131 [ JENKINS-39131 ]

            oleg_nenashev Oleg Nenashev
            jones2026 John Jones
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: