Google Lighthouse CI - LHCI 服务器为多个自动运行工作

Google Lighthouse CI - LHCI Server to work for multiple autorun(s)

我正在尝试设置 Lighthouse CI but having issues running lhci autorun multiple times. I went over the Getting Started instructions and reviewed Troubleshooting 部分,但没有成功。

我如何修改我的 LHCI 项目和 docker LHCI 服务器 (Docker Server) 的配置,以便 lhci autorun 运行 与最新的 Stash/Bitbucket 并且不给我:

Error: Unexpected status code 422
  {"message":"Build already exists for hash \"18fcc3e730cc720756eba4b9a94a778b60d5e1e0\""}
    at ApiClient._convertFetchResponseToReturnValue (/usr/local/lib/node_modules/@lhci/cli/node_modules/@lhci/utils/src/api-client.js:54:21)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
WARNING: upload command failed.
assert command failed. Exiting with status code 1.

在我第一次 运行:

之后,我只得到默认提交显示的结果

18fcc3e "tests(utils): support travis build context tests"

使用 lhci wizard 我尝试将我的项目配置为指向我的 Stash 存储库,但是在将它添加到我的 lighthouserc.json 之后从项目向导设置生成的令牌在 http://localhost:9001/app。我错过了什么?

lighthouserc.json

{
  "ci": { 
    "server": {
      "port": 9001,
      "storage": {
        "storageMethod": "sql",
        "sqlDialect": "sqlite",
        "sqlDatabasePath": "/data/lhci.db"
      }
    },
    "collect": {
      "numberOfRuns": 2,
      "url": [
        "https://wwww.mydomain.ca/",
        "https://www.mydomain.ca/page2", 
      ]
    }, 
    "upload": {
      "target": "lhci",
      "serverBaseUrl": "http://localhost:9001",
      "token": "38c17168748-c5f8-4744-b05d-3fdc97806adfabf" 
    }
  }
}

即使失败,它也会创建一个新的本地提交,让我可以收集数据:

git commit --allow-empty -m 'rerun CI' && git push

来自:https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/troubleshooting.md