Skip to content

Instantly share code, notes, and snippets.

@rickheil
Created November 21, 2017 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickheil/67740a9e85ac95c2f1eda4acb864edce to your computer and use it in GitHub Desktop.
Save rickheil/67740a9e85ac95c2f1eda4acb864edce to your computer and use it in GitHub Desktop.
test:
stage: test
tags:
- linux
- python
before_script:
- apt-get -qq update
- export DEBIAN_FRONTEND=noninteractive && apt-get -qqy install pylint python-pip virtualenv > /dev/null
script:
- source bin/activate
- pip install twilio
- python /usr/bin/pylint main.py
deploy_production:
stage: deploy
tags:
- linux
- python
before_script:
- export DEBIAN_FRONTEND=noninteractive && apt-get -qq update && apt-get -qqy install python-pip zip > /dev/null
- pip install aws awscli --upgrade
script:
- zip -r sms-notifier.zip main.py
- cd lib/python2.7/site-packages/ && zip -r ../../../sms-notifier.zip . && cd ../../../
- aws lambda update-function-code --function-name Your-Function-Name-Here --zip-file fileb://sms-notifier.zip --region us-east-1
environment:
name: Production
only:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment