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

EnvInject not working after a jenkins update

    Details

    • Similar Issues:

      Description

      Hello,

      We encounter a regression each time we upgrade our jenkins (monthly).

      After each upgrade,  some builds using env-inject stop working, with the following error:

      [EnvInject] - [ERROR] - Problems occurs on injecting env vars defined in the build wrapper: org.jenkinsci.lib.envinject.EnvInjectException: Failed to evaluate the script. org.jenkinsci.plugins.scriptsecurity.scripts.UnapprovedUsageException: script not yet approved for use.
      

       

      The error is solved once we save the job configuration (without any changes), yet since we have most than 150 jobs it slows us down

       

      Is this behaviour known? While it only affect some jobs and not all of them?
      Is it related to our installation (something wrong?)

       

      Thank you for your help

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Yes, it is an expected behavior. See https://jenkins.io/security/advisory/2017-04-10/#environment-injector-envinject-plugin (released in 2.0). Starting from this version all Groovy scripts used in EnvInject will require script approval. If your jobs do not use Groovy scripting, everything should work as before

           

          Show
          oleg_nenashev Oleg Nenashev added a comment - Yes, it is an expected behavior. See https://jenkins.io/security/advisory/2017-04-10/#environment-injector-envinject-plugin (released in 2.0). Starting from this version all Groovy scripts used in EnvInject will require script approval. If your jobs do not use Groovy scripting, everything should work as before  
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Please feel free to reopen if you consider it as a defect after the clarification. It will require justification

          Show
          oleg_nenashev Oleg Nenashev added a comment - Please feel free to reopen if you consider it as a defect after the clarification. It will require justification
          Hide
          ymougenel ymougenel added a comment -

          Thank you for the explanation

          Show
          ymougenel ymougenel added a comment - Thank you for the explanation

            People

            • Assignee:
              Unassigned
              Reporter:
              ymougenel ymougenel
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: