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

Jenkins Powershell plugin reports success even if script is not found

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • powershell-plugin
    • None

      How to repro:

      1. Create a jenkins job with a Windows Powershell step in the Build.
      2. In the Windows Powershell Command edit box, type the name of an invalid file
      3. Execute the job

      Expected result:

      • Job failed with error "script file not found" or something

      Actual

      • Job succeeds

      Upon checking the console output / logs, yes, we can see that Powershell gave an error, but this is behavior is very dangerous in a production environment. If someone renames or moves the script file without knowing that the Jenkins job needs an update, the CI / CD flow will continue and people will think everything's OK when in fact a Powershell script that maybe was essential to the process did not execute - but reported that it has executed.

            Unassigned Unassigned
            ion_diaconu Ion Diaconu
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: