如何将 gitlab CI 作业设置为 true?

How to set gitlab CI job to true?

我想将作业 - 即使失败! - 设置为 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

问题: 如何使用上面的脚本将我的作业设置为始终为真?

Gitlab Shell 执行器正在使用数字 returns 来确定作业是失败还是成功。

所以要成功完成作业必须手动退出 0。

script:
    - sleep 200
    - exit 0