1 Star 0 Fork 0

PeterTu_2019/w3af

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
circle.yml 6.65 KB
一键复制 编辑 原始数据 按行查看 历史
Andres Riancho 提交于 2017-06-30 16:38 . Better docs
#
# This file is used to configure the continuous integration for w3af
# see http://w3af.org/how-w3af-uses-continuous-integration-to-improve
#
# As a user you don't need to understand this file.
#
machine:
services:
- docker
python:
version: 2.7.3
post:
# This was required to avoid issues with different builds of python being
# used between the gtk libs installed in /usr/lib/python2.7/dist-packages/
# and the python which was put inside my virtualenv
- pyenv global system
checkout:
post:
# Since the auto_update feature needs the git repository history, we run
# this command which will retrieve it (since CircleCI doesn't for perf).
# In our case it is fine, and it will get cached.
- if [[ -e .git/shallow ]]; then git fetch --unshallow; fi
dependencies:
cache_directories:
# These are inside the w3af directory
- "xpresser"
pre:
- docker info
- docker version
- docker images
- sudo apt-get update
# GUI dependencies
#- sudo apt-get install -y python-gtksourceview2 python-gtk2 gir1.2-notify-0.7 python-pyatspi2
# python-dbus python-pygame python-opencv python-scipy python-numpy
- sudo apt-get install -y python-webkit
# Misc dependencies
- sudo apt-get install -y stunnel4 libffi-dev tcpdump joe
# ClamAV installation for grep.clamav testing
- sudo apt-get install clamav-daemon clamav-freshclam clamav-unofficial-sigs
- sudo service clamav-daemon start
# Install the core/console dependencies
- pip install --upgrade pip
- w3af/core/controllers/ci/install_scripts/install_core_dependencies.sh
# Install GUI dependencies
- w3af/core/controllers/ci/install_scripts/install_gui_dependencies.sh
# Link the GUI stuff to the venv
- w3af/core/controllers/ci/install_scripts/install_c_extensions_venv.sh
# Install the test dependencies
- w3af/core/controllers/ci/install_scripts/install_test_dependencies.sh
# Run the test servers/dependencies
- cd w3af/tests/ && docker-compose up -d
- w3af/tests/add-test-routes.sh
# While we wait for the test dependencies, list the test we're going to run.
#
# This line is useful to debug builds that fail because of excessive memory
# usage, such as https://circleci.com/gh/andresriancho/w3af/2819#tests/containers/0
#
# Those builds are hard to debug since the build VM is killed and the only
# collected artifact is memory-usage.txt. In that file you should find the
# test ID which was running when circleci killed the build. Using that ID
# and the output of this tool, you'll be able to pinpoint which test was
# using a lot of memory.
- python w3af/core/controllers/ci/nosetests_wrapper/show-test-ids.py
# Might need more waiting for the docker-compose up command to finish
- w3af/tests/waitfor-test-dependencies.py
post:
- pip --version
- pip freeze
test:
override:
- w3af/core/controllers/ci/nosetests_wrapper/main.py:
timeout: 360
- nosetests w3af/core/data/constants/tests/test_vulns.py:TestVulnsConstants.test_vuln_updated
# Dump the container logs for debugging
- for c in `docker ps -q`; do docker logs $c > $CIRCLE_ARTIFACTS/docker-$c.log; done
# https://bitbucket.org/ned/coveragepy/issue/282/coverage-combine-consumes-a-lot-of-memory
# post:
# - coverage combine
# - coveralls
deployment:
production:
branch: master
owner: andresriancho
commands:
# Save docker hub credentials to file
- sed "s/<EMAIL>/$DOCKER_EMAIL/;s/<AUTH>/$DOCKER_AUTH/" < extras/docker/dockercfg.template > ~/.dockercfg
# Note the master in the URLs
- "curl --header 'Content-Type: application/json' --request POST https://circleci.com/api/v1/project/andresriancho/w3af-module/tree/master?circle-token=$W3AF_MODULE_TOKEN"
- "curl --header 'Content-Type: application/json' --request POST https://circleci.com/api/v1/project/andresriancho/w3af-kali-ci/tree/master?circle-token=$W3AF_KALI_TOKEN"
- "curl --header 'Content-Type: application/json' --request POST https://circleci.com/api/v1/project/andresriancho/w3af-api-client/tree/master?circle-token=$W3AF_API_CLIENT_TOKEN"
# Nasty hack required for docker cache sanity: Because we get a new clone
# of the repo, timestamps don't correspond any more to when the file was
# last changed. To rectify this, first set everything to a timestamp in
# the past and then update the timestamp for all git-tracked files based
# on their last committed change.
#
# This takes ~1min to run, so we're doing it here in order to run it only
# when the build is successful AND we're in master/develop where it's
# really needed
- find . -exec touch -t 201401010000 {} \;
- for x in $(git ls-tree --full-tree --name-only -r HEAD); do touch -t $(date -d "$(git log -1 --format=%ci "${x}")" +%y%m%d%H%M.%S) "${x}"; done
- docker pull andresriancho/w3af:latest; true
- ./docker-build.sh master:
pwd: extras/docker/
- docker push andresriancho/w3af:latest
- w3af/core/controllers/ci/circleci/trigger-w3af-api-build.py
staging:
branch: develop
owner: andresriancho
commands:
# Save docker hub credentials to file
- sed "s/<EMAIL>/$DOCKER_EMAIL/;s/<AUTH>/$DOCKER_AUTH/" < extras/docker/dockercfg.template > ~/.dockercfg
# Note the develop in the URLs
- "curl --header 'Content-Type: application/json' --request POST https://circleci.com/api/v1/project/andresriancho/w3af-module/tree/develop?circle-token=$W3AF_MODULE_TOKEN"
- "curl --header 'Content-Type: application/json' --request POST https://circleci.com/api/v1/project/andresriancho/w3af-api-client/tree/develop?circle-token=$W3AF_API_CLIENT_TOKEN"
# Nasty hack required for docker cache sanity: Because we get a new clone
# of the repo, timestamps don't correspond any more to when the file was
# last changed. To rectify this, first set everything to a timestamp in
# the past and then update the timestamp for all git-tracked files based
# on their last committed change.
#
# This takes ~1min to run, so we're doing it here in order to run it only
# when the build is successful AND we're in master/develop where it's
# really needed
- find . -exec touch -t 201401010000 {} \;
- for x in $(git ls-tree --full-tree --name-only -r HEAD); do touch -t $(date -d "$(git log -1 --format=%ci "${x}")" +%y%m%d%H%M.%S) "${x}"; done
- docker pull andresriancho/w3af:develop; true
- ./docker-build.sh develop:
pwd: extras/docker/
- w3af/core/controllers/ci/circleci/trigger-w3af-api-build.py
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/petertu_2019/w3af.git
git@gitee.com:petertu_2019/w3af.git
petertu_2019
w3af
w3af
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385