2017-06-25 49 views
0

我確實在Bitbucket上建立了一個私人回購站來託管一個PHP項目。對於這個項目,我也使用管道集成。codecov.io給出與Bitbucket流水線結合的錯誤

這是我的管道YAML文件的內容:

image: php:7.1.4 

pipelines: 
    default: 
    - step: 
     script: 
      - ./install_xdebug.sh 
      - ./install_mailhog.sh 
      - ./install_composer.sh 
      - composer install 
      - vendor/bin/phpunit --coverage-clover=coverage.xml 
      - if [ $? -eq 0 ]; then bash <(curl -s https://codecov.io/bash); fi 

我能夠生成Xdebug的代碼覆蓋率文件:

Generating code coverage report in Clover XML format ... done 

接下來的部分是上傳這​​個文件codecov .io但這部分失敗,出現錯誤

x> No CI provider detected. 
    Testing inside Docker? http://docs.codecov.io/docs/testing-with-docker 
    Testing with Tox? https://docs.codecov.io/docs/python#section-testing-with-tox 
    project root: . 
/dev/fd/63: line 739: git: command not found 
/dev/fd/63: line 739: hg: command not found 
--> token set from env 
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml 
==> Running gcov in . (disable via -X gcov) 
==> Searching for coverage reports in: 
    + . 
    -> Found 1 reports 
==> Detecting git/mercurial file structure 
==> Reading reports 
    + ./coverage.xml bytes=81581 
==> Appending adjustments 
    http://docs.codecov.io/docs/fixing-reports 
    + Found adjustments 
==> Uploading reports 
    url: https://codecov.io 
    query: branch=&commit=&build=&build_url=&name=&tag=&slug=&yaml=&service=&flags=&pr=&job= 
    -> Pinging Codecov 
HTTP 400 
missing required properties: [&#39;commit&#39;] 

回答

1

錯誤消息有點模糊。真正的問題是在PHP 7.1.4 docker鏡像中安裝了git。我通過在管道配置文件中添加一個apt-get命令來解決這個問題。

的apt-get安裝-y混帳