Travis和Coverity扫描 - 一切都在建立,但掩护似乎并没有运行

Travis and Coverity Scan - Everything builds but coverity does not seem to run

本文关键字:掩护 运行 并没有 建立 扫描 Coverity Travis      更新时间:2023-10-16

这是我非常简单的C /cmake .travis.yml


env:
  global:
   # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
   #   via the "travis encrypt" command using the project repo's public key
   - secure: "<very long encrypted token>"
addons:
  coverity_scan:
    project:
      name: "tinverse/tsm"
    build_command_prepend: cmake .
    build_command: make
    branch_pattern: coverity_scan
  script:
    - echo -n | openssl s_client -CApath /etc/ssl/certs -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-5
    - g++-5
    - clang
compiler:
  - gcc
  - clang
install:
# Use g++5.4 and not 4.6 (C++11 missing)
  - if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi

一切都很好。我看不到掩护性运行或上传任何内容。我使用未加密的令牌添加了Travis中的" Coverity_scan_token"环境变量。构建日志在这里:https://travis-ci.org/tinverse/tsm/jobs/509506031。我得到了最后的"命令" ./configure&amp;&amp;&amp;&amp;进行测试"以0退出"。来自Travis-Ci构建日志的消息,仅此而已!不知道我在做什么错。

更新:从构建日志中:

depth=1 C = BE, O = GlobalSign nv-sa, CN = GlobalSign CloudSSL CA - SHA256 - G3
verify error:num=20:unable to get local issuer certificate
verify return:0
DONE

但是,将CAPATH选项添加到.travil.yml中的openssl命令后在脚本的" tre_install"部分中,我看到

echo -n | openssl s_client -CApath /etc/ssl/certs/ -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt
depth=2 C = BE, O = GlobalSign nv-sa, OU = Root CA, CN = GlobalSign Root CA
verify return:1
depth=1 C = BE, O = GlobalSign nv-sa, CN = GlobalSign CloudSSL CA - SHA256 - G3
verify return:1
depth=0 C = US, ST = Delaware, L = Dover, O = Incapsula Inc, CN = incapsula.com
verify return:1
DONE

那么,非零返回在这里是否意味着成功?尽管如此,看着Travis-Ci构建日志,我认为Coverity scan ran ran不。

我的分支称为feature/coverity_scan,我认为branch_pattern:coverity_scan可以使用。它没。将我的分支重命名为coverity_scan后,它起作用了。

另外,添加dist:xenial到.travis.yml文件使证书错误消失了。