Skip to content

Commit e52b7fb

Browse files
committed
Merge branch 'master' into pybot_dockerhub
# Conflicts: # .travis.yml # bin/deploy.sh # bin/run.sh # pybot/plugins/api/endpoints.py
2 parents 1ed6e95 + c3fa031 commit e52b7fb

52 files changed

Lines changed: 1505 additions & 1739 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
version: 2.1
2+
3+
orbs:
4+
aws-ecr: circleci/aws-ecr@4.0.1
5+
aws-ecs: circleci/aws-ecs@0.0.8
6+
7+
8+
workflows:
9+
build_test_deploy:
10+
jobs:
11+
- build_test
12+
13+
# push new Docker image to ECS
14+
- aws-ecr/build_and_push_image:
15+
repo: pybot
16+
tag: '${CIRCLE_BRANCH}'
17+
dockerfile: docker/Dockerfile
18+
requires:
19+
- build_test
20+
filters:
21+
branches:
22+
only:
23+
- staging
24+
- master
25+
26+
# Update ECS task and service, then replace the current one
27+
- aws-ecs/deploy-service-update:
28+
family: 'pybot-${CIRCLE_BRANCH}'
29+
service-name: 'pybot-svc-${CIRCLE_BRANCH}'
30+
cluster-name: 'python-oc-services'
31+
container-image-name-updates: 'container=pybot,tag=${CIRCLE_BRANCH}'
32+
verify-revision-is-deployed: true
33+
requires:
34+
- aws-ecr/build_and_push_image
35+
filters:
36+
branches:
37+
only:
38+
- master
39+
- staging
40+
41+
jobs:
42+
build_test:
43+
docker:
44+
- image: circleci/python:3.7.1
45+
environment: # environment variables for primary container
46+
PIPENV_VENV_IN_PROJECT: true
47+
48+
steps:
49+
- checkout
50+
- run: sudo chown -R circleci:circleci /usr/local/bin
51+
52+
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages
53+
54+
- restore_cache: # ensure this step occurs *before* installing dependencies
55+
keys:
56+
- v1-dependencies-{{ checksum "poetry.lock" }}
57+
# fallback to using the latest cache if no exact match is found
58+
- v1-dependencies-
59+
60+
- run:
61+
name: Installing dependencies
62+
command: |
63+
sudo pip install poetry
64+
poetry install
65+
66+
- save_cache:
67+
key: v1-dependencies-{{ checksum "poetry.lock" }}
68+
paths:
69+
- "/home/circleci/.cache/pypoetry/virtualenvs"
70+
- ".venv"
71+
72+
# Run tests
73+
- run:
74+
name: Run Tests
75+
command: |
76+
mkdir test-results
77+
poetry run pytest --junitxml=test-results/pytest/results.xml
78+
79+
- store_test_results:
80+
path: test-results

.flake8

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[flake8]
2+
max-line-length = 88
3+
4+
select = C,E,F,W,B,B950
5+
6+
max-complexity = 10
7+
8+
ignore =
9+
E501
10+
F401
11+
W503
12+
13+
exclude =
14+
__pycache__
15+
testing.py

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
custom: https://secure.lglforms.com/form_engine/s/BRtP7QUKyHOyEYsZROsRew

.isort.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[settings]
2+
line_length = 88
3+
multi_line_output = 3
4+
include_trailing_comma = true
5+
force_grid_wrap = 0
6+
use_parentheses = true

.travis.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

Pipfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)