使用Travis-CI,是否有可能在不推送新提交到GitHub的情况下触发重建?
用例:由于外部性而导致构建失败。这个来源实际上是正确的。如果简单地重新运行,它将构建OK并通过。
例如,由于包服务器宕机,apt-get失败,但服务器再次备份。然而,构建状态“卡”在“失败”,直到推送新的提交。
有什么方法来推动Travis-CI做另一个构建,而不是推动一个“虚拟”提交?
使用Travis-CI,是否有可能在不推送新提交到GitHub的情况下触发重建?
用例:由于外部性而导致构建失败。这个来源实际上是正确的。如果简单地重新运行,它将构建OK并通过。
例如,由于包服务器宕机,apt-get失败,但服务器再次备份。然而,构建状态“卡”在“失败”,直到推送新的提交。
有什么方法来推动Travis-CI做另一个构建,而不是推动一个“虚拟”提交?
当前回答
如果构建从未发生(也许你没有及时将Pull-Request构建开关设置为打开),你可以在Github上将Pull Request标记为关闭,然后将其标记为打开,然后将触发一个新的构建。
其他回答
如果您安装了Travis CI客户端,您可以使用Travis restart <job#>从控制台中手动重新运行构建。你可以使用travis show <branch>找到分支的最后一个job#
travis show master
travis restart 48 #use Job number without .1
travis logs master
UPDATE:不幸的是,它看起来并没有使用最新的提交启动一个新的构建,而是使用之前的repo状态重新启动一个以前的构建。
如果你在GitHub上有新项目。travis。Yml,但从未测试过,你可以运行测试而不提交:
在Travis CI设置中启用测试 在GitHub上打开项目页面 打开设置-> webhooks和服务 找到Travis CI在服务和按下编辑按钮 按“测试服务”
如果构建从未发生(也许你没有及时将Pull-Request构建开关设置为打开),你可以在Github上将Pull Request标记为关闭,然后将其标记为打开,然后将触发一个新的构建。
我应该在这里提到,我们现在有了一种在web上触发新构建的方法。详情见https://blog.travis-ci.com/2017-08-24-trigger-custom-build。
博士TL; 点击“更多选项”,然后选择“触发构建”。
If you have write access to the repo: On the build's detail screen, there is a button ↻ Restart Build. Also under "More Options" there is a trigger build menu item. Note: Browser extensions like Ghostery may prevent the restart button from being displayed. Try disabling the extension or white-listing Travis CI. Note2: If .travis.yml configuration has changed in the upstream, clicking rebuild button will run travis with old configuration. To apply upstream changes for travis configuration one has to add commit to PR or to close / reopen it. If you've sent a pull request: You can close the PR then open it again. This will trigger a new build.
重新构建:
触发构建: