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

Build Execute shell not passing environmental variables that contain special characters to Java app properly.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 2.277.4

      I have a build that is currently working. I am passing through environmental variables through Build>Execture shell section. In there I export DB_USER='myconf$gUsername'. If this contains a special character it is not properly getting passed to my Java app. This works fine locally when running through InteliJ and passing in an environmental variable, and it connects me fine to my JDBC datasource. However, when running through Jenkins the error on the DB is that the user/password was incorrect.

      The username and password are the same, locally and on the server. The code is identical. The DB is idential. The only thing that is different is that it's being run through Jenkins. When the user id/password does not contain special characters then the Java application connects just fine to the DB.

            Unassigned Unassigned
            letsgetit Jacob
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: