-
Notifications
You must be signed in to change notification settings - Fork 34
/
shippable.yml
34 lines (27 loc) · 1.62 KB
/
shippable.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
language: python
python:
- 2.7
env:
global:
- AWS_ACCESS_KEY_ID=AKIAJJL2U6T3F3Y5JIGA
- AWS_DEFAULT_REGION=us-west-2
- secure: i+TtDQJOhWDHHBefmYXTla+yGLmkIcUhiTApZ4FADAVD3gYI9wVsup2QlU8bTcjUglMLgBsZuKIBDls6x98sggLe/H1mbifibZcEDPWGpiml9O2+6hvl32maKvNx8UeWjx/0aoNXt/UtUGS6G0KHerj+Wik4/nvo5eokxFs1FrkZl8IrNZ6GSFWhvwiQZIXGw1GdNIiNMmqX+fS7AOfdZTrUc9WHq4QM4nTzr92FZwR+zn2BwQhCtDOOa5GyRh58V9v9lQubksv/4H0LSfm7flepsUSDNc8ooJ9qLZBOyCsf8XACXWgjzwzwu9vETZsqUn2Iwjr4zW/jvXi/Q7l34g==
- CD_APP_NAME=ShippableCodeDeploy CD_BUCKET=codedeploy-sample CD_KEY=latest
- CD_DEPLOYMENT_GROUP=DemoFleet
before_install:
- pip install awscli
install:
- pip install -r requirements.txt
before_script:
- mkdir -p shippable/testresults
- mkdir -p shippable/codecoverage
script:
- nosetests test.py --with-xunit --xunit-file=shippable/testresults/nosetests.xml
- which python && coverage run --branch test.py
- which python && coverage xml -o shippable/codecoverage/coverage.xml test.py
after_success:
# Use the following for GitHub-based deployments:
# - aws deploy create-deployment --application-name $CD_APP_NAME --github-location repository=$REPO_NAME,commitId=$COMMIT --deployment-group-name $CD_DEPLOYMENT_GROUP | python scripts/wait_for_completion.py
# This method uses S3 bucket to upload the build artifacts
- aws deploy push --application-name $CD_APP_NAME --s3-location s3://$CD_BUCKET/$CD_KEY --ignore-hidden-files
- aws deploy create-deployment --application-name $CD_APP_NAME --s3-location bucket=$CD_BUCKET,key=$CD_KEY,bundleType=zip --deployment-group-name $CD_DEPLOYMENT_GROUP | python scripts/wait_for_completion.py