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

Backslash should escape equal character when evaluation environment variables

      For exemple :
      If I set a environment variable containing a jtds connection string.

      JTDS_CONNECTION_STRING=jdbc:jtds:sqlserver://host:33455/DBName;domain\=myDomain

      I expect that the equal chararter will be escaped by the backslash.

      We can see in the Java Class ApplicationDeploy at line 145 that it's not the the case.

      You should split with the following regex :

      String regex = ".[^\\\\]=.";
      String[] parts = environmentVariable.split(regex);

          [JENKINS-29700] Backslash should escape equal character when evaluation environment variables

          I close this issue in the mean time I find an other way to configure environment variable by combining more than one variable in my property file.
          Exemple jtds.url=${DB_URL};

          {DB_DOMAIN}

          .

          Julien Piccaluga added a comment - I close this issue in the mean time I find an other way to configure environment variable by combining more than one variable in my property file. Exemple jtds.url=${DB_URL}; {DB_DOMAIN} .

            siamaksade Siamak Sadeghianfar
            jpiccaluga Julien Piccaluga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: