зеркало из https://github.com/mozilla/subhub.git
Initial CD
This commit is contained in:
Родитель
4da52e327d
Коммит
4fd5a9a124
43
.travis.yml
43
.travis.yml
|
@ -2,33 +2,38 @@ language: python
|
|||
dist: xenial
|
||||
sudo: required
|
||||
python:
|
||||
- "3.7"
|
||||
- "3.7"
|
||||
services:
|
||||
- docker
|
||||
- docker
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['bash', 'coreutils', 'awscli']
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- bash
|
||||
- coreutils
|
||||
- awscli
|
||||
cache:
|
||||
directories:
|
||||
- /home/travis/.nvm
|
||||
- /home/travis/.cache/pip
|
||||
- "/home/travis/.nvm"
|
||||
- "/home/travis/.cache/pip"
|
||||
env:
|
||||
global:
|
||||
- BOTO_CONFIG: "/dev/null"
|
||||
- LOG_LEVEL: ERROR
|
||||
- AWS_XRAY_SDK_ENABLED: false
|
||||
- DEPLOYED_ENV: travis
|
||||
|
||||
- secure: SFiDMqcO61t8pzxWp55WMEhC0keqpxfKcLjN5MZiFTtTB1tZCwnZDBUx8rbnIJfU8MAnUPB0pK/tNQghkJwpdMg05pefD4ZJuprXuRYeH0E6z98eAyOFktZExXQqtxW7ESrvb91Eso/T7tsQb0b4jbsGyhVBHAhhc/kBqyqVfVQmN6tT38NfyLN8kSibybsxp5xoA2NyuPP/c89VC+e5lnrJHECQHf62HdA9vTcySrnX81gkWVTriyJc+vkiVFV0FWwSyl3DfbLkN5qiw85mBs3rop1bViJkJHK3UlXiW5MuDgI1iGTlA8uQMJrjlF3dZ6HKTOYWPgcoKK48losvOTtv7rorhKg8rCHZdmTsaqOzYae8XcrLgBeWphUzVUP32NW4SrdY9JB59L9ht2PoJMoFxMipXkeOqk+GEnCdyiKicewYcT1UsJfpvz4Yw3OReDzKQ//UHNPjFOQ46x0QQKb017H41cM15QerEAiI9PJ/AfZkbxrbrmLvxAUnoahSHQCW6RB7WR04hL4hZ95sY5QhV8cqSkU9iP+SExNbRC8cPcNLU7KYEE4q6hzXwY4ZPjetJSzF1Gp8HfL9C1zh/rpWX0Nxzl54J5aJpdzTXASQdonT9RDIR3gf/bQIou6EKtQLTybgj+9CTr/MxfjjK99pA4MHc0y389+pyEM0Y5M=
|
||||
- secure: jfGlcaBs3vdQ+nycb/JX7JP2nf9vBa7LtA0+Pp6lDm/6V6LrVmF955ldHyaZjMchxQJCinVBOzU5++XWAg0wG/jponQ5ZBpuGpqsefA5y7PDoYk7XZib7VE+PTm5PlPI14JcB5FRgCeDfJQR+XBCgnvCnWM8k2cF5HJEODQovw/r3xkGC6j3IQU1JJkQCT6rTuvZ6GGbxU/bFCrjK1PjQqw3d1qmYfvbLU3dCwYGpL/a3eqwheINIPQq7mtorCHZ7BkN/1B907sIvEH72LUwZgJTckBcbCbxgjKMtGYbYWEoH6DteUTzZo4zok5nTArsMOqYHYRoC9rezMJz8C1f5tB/ktclCgAoiM1QGMr5/6PHrOU61iQms+8SCOZZ6iRql7TGL/6P+zFXMFql6MOQ5JmxwKYXTo36l+QaGeqU4yxzCKoDbpMuUTymP215XaYWC1njQHcOgWdNgzbXOvjWvpgEPa2ivp2/64zOnCsZhHpkwdiNPye4VrefOoOqrSUTNi7fsFmEPFNbrOp/v5QGrpapfPb+w7hIeabrVa5bQyCH/hOQThcpDqaZa9MnD2ZcI53A8tznAScG5k8Ei1CKRjo3ZtSW25dgPr5eDRlWbHEhCWwOvymnw4mFqJVE58m17UOBqgm3MJzWOhJg5PFg/0zqJzgjBEDB0WeLTHpVq/Q=
|
||||
before_install:
|
||||
- sudo rm -f /etc/boto.cfg
|
||||
- pip install -r automation_requirements.txt
|
||||
- sudo apt-get install -y awscli
|
||||
- ./bin/aws-credentials.sh
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: Unit Tests
|
||||
script:
|
||||
- tox
|
||||
- cd /home/travis/build/mozilla/subhub/reports && bash <(curl -s https://codecov.io/bash) -cF python
|
||||
- sudo rm -f /etc/boto.cfg
|
||||
- pip install -r automation_requirements.txt
|
||||
script:
|
||||
- tox
|
||||
- bash bin/aws-credentials.sh
|
||||
- bash bin/deploy.sh
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $TRAVIS_EVENT_TYPE == cron ]]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
case "$TRAVIS_BRANCH" in
|
||||
'feature/staging')
|
||||
DEPLOY_ENV=staging
|
||||
;;
|
||||
'release/prod-test')
|
||||
DEPLOY_ENV=prod-test
|
||||
doit deploy
|
||||
;;
|
||||
'release/prod')
|
||||
DEPLOY_ENV=prod
|
||||
;;
|
||||
*)
|
||||
echo "No DEPLOY_ENV to set."
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$DEPLOY_ENV" ]; then
|
||||
echo "Not deployinng"
|
||||
else
|
||||
echo "Deploying to $DEPLOY_ENV"
|
||||
doit deploy
|
||||
fi
|
|
@ -19,6 +19,7 @@ from shared.log import get_logger
|
|||
|
||||
logger = get_logger()
|
||||
|
||||
|
||||
def test_create_app():
|
||||
app = create_app()
|
||||
assert app
|
||||
|
|
Загрузка…
Ссылка в новой задаче