Travis CI Integration¶
Set up steps¶
First create an
`anteater.conf in the root directory of your repository:
[config] anteater_files = anteater_files/ reports_dir = %(anteater_files)s.reports/ anteater_log = %(anteater_files)s/.reports/anteater.log flag_list = %(anteater_files)s/flag_list.yaml ignore_list = %(anteater_files)s/ignore_list.yaml
anteater_files is a location which anteater wil not scan.
The rationale about hiding this folder from anteater, is for the simple fact anteater will report on the strings it uses itself as a guide for what to search for.
You can leave these as is, its a logging location used for when running the tool locally.
flag_list.yaml is where all regular expressions are set, that if matched
will fail the build, thereby marking a failure on the pull request page.
Some examples can be found here.
For information on
flag_list, please consult the User Guide
All that is required now is to make the following entries to your yaml file:
language: python python: - "2.7" install: - pip install anteater before_script: - git diff --name-only HEAD^ > ./patch script: - anteater --project antest --patchset ./patch
Should you be using another language other then python (for example ruby), you
matrix: include: - language: python python: - "2.7" - "3.6" install: - pip install anteater before_script: - git diff --name-only HEAD^ > ./patch script: - anteater --project antest --patchset ./patch - language: ruby # your project travis elements go here.
An example .travis.yml can be found here.
Virus Total API KEY¶
Should you wish to use any of the Virus Total functionailty such as URL
scanning, then please set your Virus Total Key as the environment variable
VT_KEY in the “Environment Variables” section of your Travis CI job, see
for complete details.
- Contributor forks , creates a branch
git checkout -b mypullrequest
- Contributor commits and makes pull request
git commit -m "My Pull Request"
git push origin mypullrequest
- A pull request is then made on the Contributors github page.
- Travis CI runs anteater checks, checks fail.
- Contributor addresses the failure.
git commit -va -m "Correcting for anteater failures"
- Travis CI runs anteater again, and marks build as Passed.
- Main developer see’s test has passed, and merges Contributors pull request.