我想找一份作業 -即使失敗了!- 設定為TRUE(作業成功)。使用以下行時:
script:
- sleep 200
- true && false
我從 CI 得到以下輸出:
true : The term 'true' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\WINDOWS\TEMP\build_script360729423\script.ps1:231 char:1
true
~~~~
CategoryInfo : ObjectNotFound: (true:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
問題: 如何使用上面的腳本將我的作業始終設定為 TRUE?
uj5u.com熱心網友回復:
Gitlab Shell 執行器正在使用數字回傳來確定作業是失敗還是成功。
所以要成功完成一項作業必須手動退出 0。
script:
- sleep 200
- exit 0
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/322634.html
上一篇:GitHub桌面上傳限制
下一篇:如何同步另一臺電腦未提交的代碼?
