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

withEnv does not alert when env var name is not valid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins : 2.462.2 LTS (alpine based docker image)
      workflow-basic-steps-plugin : 1058.vcb_fc1e3a_21a_9

      I mistakenly tried to setting an env var which is not valid in a linux environment, e.g. :

      withEnv([
          parallel-build='-j 12'
      ])
      

      It is clearly not possible to create a linux env var with a variable name containing a dash.

      The result is that the env var is not set, If some other env var are set in withEnv, they are not set and the pipeline can goes on without any warning.

      There should have at least a warning written in the console log, and I think that as environment variables can be considered as critical data for a pipeline, the pipeline should be stopped.

            Unassigned Unassigned
            jielpe_fr38 Jean-Luc Pé
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: