withEnv does not work with kubernetes-plugin

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

XMLWordPrintable

      Inside of a container i want to define withEnv before running a shell script or something else, the environment variables are not passed in.

      This what i have inside of my container step

      container('java') {
         withEnv(['test=test']) {
            sh """
               export
            """
         }
      }
      

      I would expect to see test=test.  but it is not output, only the environment variables defined in the container def are.

            Assignee:
            Carlos Sanchez
            Reporter:
            Jon Whitcraft
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: