在不推送提交的情况下触发 Travis-CI 重建? [英] Trigger a Travis-CI rebuild without pushing a commit?

查看:33
本文介绍了在不推送提交的情况下触发 Travis-CI 重建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Travis-CI,是否可以在不向 GitHub 推送新提交的情况下触发重建?

用例:构建由于外部性而失败.来源实际上是正确的.如果简单地重新运行,它会构建正常并通过.

例如,apt-get 由于软件包服务器关闭而失败,但服务器又恢复了.然而,构建状态卡住"为失败",直到推送新的提交.

除了推送虚拟"提交之外,还有什么方法可以推动 Travis-CI 进行另一个构建?

解决方案

  • 如果您对存储库具有写入权限:在构建的详细信息屏幕上,有一个按钮↻ 重新启动构建.在更多选项"下还有一个触发器构建菜单项.

    注意:Ghostery 等浏览器扩展可能会阻止显示重新启动按钮.尝试禁用扩展程序或将 Travis CI 列入白名单.

    注意2:如果.travis.yml 配置在上游发生了变化,点击重建按钮将使用旧配置运行travis.要为 travis 配置应用上游更改,必​​须向 PR 添加提交或关闭/重新打开它.

  • 如果您发送了拉取请求:您可以

    触发器构建:

    Using Travis-CI, is it possible to trigger a rebuild without pushing a new commit to GitHub?

    Use case: A build fails due to an externality. The source is actually correct. It would build OK and pass if simply re-run.

    For instance, an apt-get fails due to a package server being down, but the server is back up again. However the build status is "stuck" at "failed" until a new commit is pushed.

    Is there some way to nudge Travis-CI to do another build, other than pushing a "dummy" commit?

    解决方案

    • 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.

    Restart Build:

    Trigger Build:

    这篇关于在不推送提交的情况下触发 Travis-CI 重建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆