Run cover scan for each Travis pull request

I want to automate the student classification system as much as possible. Ideally, these steps will be taken when submitting the job.

  • A student deploys my Github repository and modifies files
  • A student pushes local code to his repository and creates a pull request
  • Travis CI detects a tensile request and starts building a Pull request.
  • If the code completes successfully, Coverity starts a static code analysis for the transfer request.
  • The student receives the assembly status on the Github request page.

I have successfully installed Travis assemblies for each tensile request in my repo. I successfully run a Coverity scan through Travis for every commit on my repo. But I can’t run a Coverity scan to request traction, only Travis assemblies start. Can I fix this problem and save a transparency report for each tensile request?

This is my .travis.yml

 language: c compiler: gcc env: global: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created # via the "travis encrypt" command using the project repo public key - secure: "WHkT1bLbpz8VA8tl+qyZvWHLg7YvnMPhCNXCEAQQaklcDq8HQ7glIrrs35VnTDfs09tVgkPbgsAfwBuwxqkmmxWaquW0AHdb6cefNpQVj2ovUriQVNBFmjfte9Bbq0NWKoLp+4IY/3IDfLoUOekOIDXuQtkJhNvX1zkkt21lSeo=" addons: coverity_scan: project: name: "Freeuni-CN101-2014/midterm" description: "Build submitted via Travis CI" notification_email: example@mail.com build_command_prepend: "" build_command: "make" branch_pattern: "*" script: make 4IY / 3IDfLoUOekOIDXuQtkJhNvX1zkkt21lSeo =" language: c compiler: gcc env: global: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created # via the "travis encrypt" command using the project repo public key - secure: "WHkT1bLbpz8VA8tl+qyZvWHLg7YvnMPhCNXCEAQQaklcDq8HQ7glIrrs35VnTDfs09tVgkPbgsAfwBuwxqkmmxWaquW0AHdb6cefNpQVj2ovUriQVNBFmjfte9Bbq0NWKoLp+4IY/3IDfLoUOekOIDXuQtkJhNvX1zkkt21lSeo=" addons: coverity_scan: project: name: "Freeuni-CN101-2014/midterm" description: "Build submitted via Travis CI" notification_email: example@mail.com build_command_prepend: "" build_command: "make" branch_pattern: "*" script: make 

Traction request travix output here

Travis exit after I combined the pull request with the main branch here

+5
source share
2 answers

I asked for coverity support and they answered

The trigger for checking transparency occurs for a specific branch, and not for a pull request, and especially the branch specified in .travis.yml

UPDATE

Using user @Admaster, I started playing with the Jenkins and cppcheck plugin. Jenkins successfully scans capture requests without setting build status in Github Commits (Travis does).

Example enter image description here

So, I continued to experiment with Travis and went over this repo. I changed my .travis.yml file that looks like

 language: c compiler: gcc before_install: - sudo apt-get install -qq cppcheck script: - cppcheck --error-exitcode=1 --quiet . - make 

cppcheck may be less effective than Coverity, but it’s enough to appoint students.

+2
source

I suggest not using Coverity, because a free account has many limitations. Better use Jenkins. I will try to make espacially configuration for you. Jenkins supports github download requests

-2
source

Source: https://habr.com/ru/post/1206250/


All Articles