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

Environment variables with a trailing double quotes are not escaped correctly on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: docker-workflow-plugin
    • Labels:
      None
    • Environment:
      Jenkins Version: 2.274
      Docker Pipeline Plugin: 1.25
      Linux master
      Windows agent
    • Similar Issues:

      Description

      Seeing an no output hang at the first step run by a docker agent when there is an environment variable with a value that ends with a double quote.

      Like when the github PR being built has a double quote at the end of it's title.

      https://github.com/jenkinsci/docker-workflow-plugin/pull/220 did fix the issue for double quotes in other positions.

       

      In my case, where only github PR titles were an issue, the following is a workaround.

      env.CHANGE_TITLE = env.CHANGE_TITLE.replaceAll('"','\'')
      

      That prevented the hang that had occurred when the PR title (env.CHANGE_ENV) was

      Checking if "quotes" are correctly ("escaped") "even with trailing ones"

      Note the hang did not occur when PR title (env.CHANGE_ENV) was:

      Checking if "quotes" are correctly ("escaped")
      

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            allenbenz Allen Benz
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: