-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of gitlab.com:faradaysec/cloud/faraday_agent_dispa…
…tcher
- Loading branch information
Showing
14 changed files
with
163 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
flake8: | ||
image: python:3 | ||
stage: .pre | ||
script: | ||
- pip install flake8 | ||
- flake8 . | ||
|
||
black: | ||
image: python:3 | ||
stage: .pre | ||
script: | ||
- pip install black | ||
- black --line-length=119 --check . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
publish_pypi: | ||
image: python:3 | ||
stage: publish | ||
script: | ||
- apt-get update -qy | ||
- apt-get install twine -y | ||
- python setup.py sdist bdist_wheel | ||
- twine upload -u $PYPI_USER -p $PYPI_PASS dist/* --verbose | ||
rules: | ||
- if: '$CI_COMMIT_TAG' | ||
when: on_success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
integration_faraday: | ||
stage: post_testing | ||
variables: | ||
DISPATCHER_REF: $CI_COMMIT_REF_NAME | ||
trigger: | ||
project: faradaysec/devops | ||
strategy: depend | ||
rules: | ||
- if: '$CI_COMMIT_REF_NAME =~ /^(dev|master)$/' | ||
when: on_success | ||
- if: $INTEGRATION | ||
when: on_success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
.venv_ready: | ||
before_script: | ||
- pip install virtualenv | ||
- apt-get update | ||
- apt-get install openssl | ||
- virtualenv faraday_venv | ||
- source faraday_venv/bin/activate | ||
|
||
|
||
.unit_tests_base: | ||
stage: testing | ||
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' | ||
script: | ||
- source faraday_venv/bin/activate | ||
- openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -keyout tests/data/ok.key -out tests/data/ok.crt -subj "/CN=localhost" | ||
- openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -keyout tests/data/other.key -out tests/data/wrong.crt -subj "/CN=localhost" | ||
- mkdir run_from | ||
- cd run_from && mkdir logs && pytest ../tests/unittests --capture=sys -v --cov=../faraday_agent_dispatcher --cov-config=../tests/unittests/.coveragerc --color=yes --disable-warnings --junitxml=report.xml | ||
- cp report.xml ../ | ||
artifacts: | ||
reports: | ||
junit: report.xml | ||
paths: | ||
- dist/* | ||
- run_from/logs/* | ||
expire_in: 7 days | ||
rules: | ||
- if: '$JUST_INTEGRATION' | ||
when: never | ||
- if: '$CI_COMMIT_REF_NAME =~ /^.*ci-test.*$/' | ||
when: never | ||
- when: on_success | ||
|
||
.latest_unit_test_base: | ||
extends: .unit_tests_base | ||
before_script: | ||
- !reference [.venv_ready, before_script] | ||
- pip install .[test] | ||
|
||
.alpha_unit_test_base: | ||
extends: .unit_tests_base | ||
before_script: | ||
- !reference [.venv_ready, before_script] | ||
- pip install --pre .[test] #It does not override alphas | ||
allow_failure: true | ||
rules: | ||
- if: '$CI_COMMIT_REF_NAME =~ /^(dev|master)$/' | ||
when: on_success | ||
- if: '$TEST_ALPHA' | ||
when: on_success | ||
|
||
unit_test 3.7: | ||
extends: .latest_unit_test_base | ||
image: python:3.7 | ||
|
||
unit_test 3.8: | ||
extends: .latest_unit_test_base | ||
image: python:3.8 | ||
|
||
unit_test 3.9: | ||
extends: .latest_unit_test_base | ||
image: python:3.9 | ||
|
||
.unit_test 3.10: # To reactivate in beta (May 3rd 2021) | ||
extends: .latest_unit_test_base | ||
image: python:3.10-rc | ||
allow_failure: true | ||
|
||
alpha_unit_test 3.7: | ||
extends: .alpha_unit_test_base | ||
image: python:3.7 | ||
|
||
alpha_unit_test 3.8: | ||
extends: .alpha_unit_test_base | ||
image: python:3.8 | ||
|
||
alpha_unit_test 3.9: | ||
extends: .alpha_unit_test_base | ||
image: python:3.9 | ||
|
||
.alpha_unit_test 3.10: # To reactivate in beta (May 3rd 2021) | ||
extends: .alpha_unit_test_base | ||
image: python:3.10-rc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
May 6th, 2021 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[Faraday][faraday] versions: 3.14.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.