【问题标题】:Travis CI build failed because of no outputTravis CI 构建失败,因为没有输出
【发布时间】:2021-04-01 11:40:00
【问题描述】:

我是 CI/CD 工具的新手。我使用 travis CI 制作了 CI/CD 管道。但是我的构建失败了,它给了我以下错误:

在过去 10 分钟内未收到任何输出,这可能 表示构建停滞或构建本身有问题。

所以,基本上构建超时是因为没有收到输出。它期待什么样的输出?

.travis.yml 文件:

language: node_js
node_js:
  - 10

script:
- node app.js

Travis 构建的屏幕截图:

package.json

{
  "name": "seatmgmt",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "start": "node app.js"
  },
  "repository": {
    "type": "git",
    "url": "SeatManagement"
  },
  "author": "SJ",
  "license": "MIT",
  "dependencies": {
    "express": "^4.17.1",
    "socket.io": "^3.0.4"
  }
}

【问题讨论】:

    标签: node.js build continuous-integration travis-ci


    【解决方案1】:

    如果在运行console.log 命令时没有在日志中打印输出,Travis 会在 10 分钟后退出正在运行的构建。

    您可以使用travis_wait 使其保持运行并且永不关闭

    https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received

    所以你会在你的脚本中替换:

    - node app.js

    - travis_wait node app.js

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-06-08
      • 2019-11-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多