Jenkins powershell plugin always builds successfully

前端 未结 6 1719
攒了一身酷
攒了一身酷 2021-02-04 00:46

I\'m using Jenkins PowerShell plugin to build a project.

However, I found that Jenkins always considers my build successful no matter what I type inside Windows P

6条回答
  •  萌比男神i
    2021-02-04 01:26

    This is how I implemented RRIROWER's solution. Hope it helps.

    .ps1; exit $lastexitcode
    

    Make sure your powershell scripts does exit with the desired value.
    Run "exit " as the last line.

提交回复
热议问题