在我的竹制远程计算机上制定计划失败时
我尝试检查env中的路径,一切似乎都很好
Failing task since return code of [powershell -NonInteractive -ExecutionPolicy bypass -Command C:\Users\xxx\bamboo-agent-home\temp\AA-GO354-ET-38-ScriptBuildTask-8740122041187922133.ps1] was -1 while expected 0
Finished task 'Set Github test status to completed' with result: Failed
答案 0 :(得分:0)
仅使用任务标题,如果使用Invoke-WebRequest,则可能需要在脚本中添加一行以使用TLS 1.2。
我抓取了我用来报告状态的Github Status PS脚本,它看起来像这样。显然,请填写您自己的__GITHUB_REPO__
和__GITHUB_TOKEN__
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri https://api.github.com/repos/__GITHUB_REPO__/statuses/${bamboo.repository.revision.number} -Headers @{"Authorization"="[__GITHUB_TOKEN__]"} -UseBasicParsing -Method POST -Body @'
{"state":"success","description":"The Bamboo CI build was successful.","target_url":"${bamboo.buildResultsUrl}"}
'@