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

Environment Variables do not replace in shell scripts

XMLWordPrintable

      Here is my shell script:

      echo ${BUILD_NUMBER};
      echo ${SERVER};

      sed -e 's/NSString *SERVER = @"[A-Z0-9]*";/NSString *SERVER = @"${SERVER}";/g'

      Here is the output when the build runs. Notice the second ${SERVER} is not replaced.

      + echo 98
      98
      + echo CI1
      CI1
      + sed -e 's/NSString *SERVER = @"[A-Z0-9]*";/NSString *SERVER = @"${SERVER}";/g'

            richscze nobody
            booyah Brian Booyah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: