readFileFromWorkspace quoting in generated xml

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Should readFileFromWorkspace quote symbols?

      Initial job config.xml:

             <org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder plugin="groovy-postbuild@2.2.1">
            <script plugin="script-security@1.14">
              <script>def ver = manager.envVars[&apos;PROJECT_VERSION&apos;]
      if (manager.build.result.isBetterOrEqualTo(hudson.model.Result.UNSTABLE)) {
       manager.build.setDescription(&quot;${ver}&quot;)
      } else {
      manager.build.setDescription(&quot;?${ver}&quot;)
      }
      </script>
              <sandbox>false</sandbox>
            </script>
            <behavior>0</behavior>
            <runForMatrixParent>false</runForMatrixParent>
          </org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder>
      

      Generated from dsl script

              groovyPostBuild {
                  script(readFileFromWorkspace('resources/dev/dev-post-build.groovy'))
              }
      
              <org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder>
                  <script>
                      <script>def ver = manager.envVars['PROJECT_VERSION']
      if (manager.build.result.isBetterOrEqualTo(hudson.model.Result.UNSTABLE)) {
          manager.build.setDescription("${ver}")
      } else {
          manager.build.setDescription("?${ver}")
      }</script>
                      <sandbox>false</sandbox>
                  </script>
                  <behavior>0</behavior>
              </org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder>
      

            Assignee:
            Daniel Spilker
            Reporter:
            Kanstantsin Shautsou
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: