Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (56 sloc) 4.35 KB
language: node_js
services: docker
node_js: 6.10
env:
global:
- AWS_ACCESS_KEY_ID=AKIAJEF3SOFO6AFQZBTA
- AWS_DEFAULT_REGION=ap-southeast-2
- LAMBDA_NAME=proximityEventsWebhookParser
- LAMBDA_ALIAS=prod
- SNS_QUEUE=arn:aws:sns:ap-southeast-2:873114526714:location-events-queue-dev
# AWS_SECRET_ACCESS_KEY
- secure: bKgft7+sCmss0eH93BBhYtLz15MI0kdhLzU1aEbPztQNfWdmv59hduFdB8wa+uBqLMZoZItIq0C17qcQRlVjtsS8m8ekg4tK0OOHkAVuqBnuEKzDL3qmUAQmg5v+8x5FYVKldhixfc29mjA2k1GakG+rbd0qk1YtXj7UJyM2dyVNi6xyVWmDfndWerVTrkwn1j6eBnPmTspChLziLpD1rBJc2kEdIeXlUkDycm9enicVULqn1nwQTU+TwVtgMLTH99p8JX2+fSF/NoUuW+dULYacfurKUUVWSZLWEd7BP3Njm8kyN4LGwMNAn6AjYLUz2HaxJXSPRcSd0OAJ9c/iyRYVUxAlciNwonkuvjem+7qUhjD7RY+dVnTcGRgIv/DlToK4UUY95pMBTlDx8IL3beO3PGqorNZAq7xN85hpwUWmlK3LVZ0hqZh4nvv3sOXi8rU5EBaIocgZyPBPvx8PxfzZ8odFDv8wlre3leSaqofLL+P3eJapKtJ7L50WVQ9Tgp2uWloD8xuGnF+WFZfZBEnjt5gAdKbs9i6BfzpjF0W2Vz5Gj/QT2EMTLoO5PHlq29FOUqCu6RZZqwY+YcWxabcFh4dz6otq9Lra+LgOtQdjoavEeK5nCNd3bVw9JshCMpu7LrEe/Kwz7ZiuNld3seGNQAe+OIHJUxmmZwNNsFw=
cache:
yarn: true
directories:
- node_modules
install: yarn
script:
- yarn lint
- yarn test
before_deploy: rm -rf node_modules && yarn --prod && rm -rf tests .*rc.js
deploy:
- provider: lambda
publish: true
function_name: $LAMBDA_NAME
region: $AWS_DEFAULT_REGION
role: arn:aws:iam::873114526714:role/genericLambdaRole
description: Parses and queues webhook events sent by the Proximity Events iPhone app.
runtime: nodejs6.10
timeout: 15
handler_name: handler
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key:
secure: vBuzR8bhbKvCALvvUm48A7FFhCUUCA4mjhkypnF3/yyLSFZwtgWd+SFiJRldR0Z4B7jnKnMB/YuyTKdGu+HPYABKLBbbO76zvW2CeSPIpiIn+xa9PUsHAROaey/Vf1frUlDFLs4G/2TIBhTVS6a+Fq4Qhco8N9GI9GIJh61sn5J2ard+yyRRO0ch5xiuFMAAY+Y7o4pRxcba5pDy435PK5mUjoGPZioYrONT0VEs+1vL/yc56GBE3fWG93Kxt/xRAxlRvrManSm9gq3ENrnHg4OYu5S3AqaGooA515AJoGCDxoNKJ2oSUJVgfTAksKQ23PeUTie9wlr2LVON0FOtjLVtqTbQZBq5iZJN7Srjwz/f/IJzWqCe2UY+SxJKk+iAiOki7H+MVL7UWKw99rzrGDhhwSxmO8niNz3dV7nsTMUiqfwzJcHyRQZnnvxpeZicJ1QztxDyRZiy8Zia+0I3JrnXHqpRzvaTGfotuBOOQZZdBqYjETbbZXpehsfishbhvnwUFeUTGMNQcEUK8wXTVrPo+/OkuuqsYxAa43jScmrqXr17YSRe6QB8dgbv/XMD3dQEJSeOfqMaAHU6X63sluxXe0WbAqARFpw9qtG0WGtfZYSfeRvRDRryKAqn9jX0GyhqmUgmARq94FVv07d43zsXwba3ssT+PpdZSF43bOU=
skip_cleanup: true
on:
branch: master
- provider: npm
email: tdmalone@gmail.com
api_key:
secure: eZDnL1SGpt0dbOCERxIdHu4Aamyf+kslz4LdZup6bzUg6ehUrrl989z0EZWJka/tU/IXVU00lopTplk0nxgCpuwTHhaCprXRcVnXglgyPyzvSZANHc0YQrgTtEWhLWurK70gj9zzyB7K7s+sLTUrXaMfQW8js4HdhbgFLeWEPXv6M7TWarZwsI5ftYB993TiaaWnhU33Jdn++KuUwuT2FYjRexCiAs5qBwwOuuN5NOEKDt6eyCf97OItUAgEsphJYjCpKesFOZNTARWhSBrkBMZHcqvE7vE2SwJ+LI8Krfe3IbY1FpVHmy62ytbofwYXMvKca0BRx7DovK6F1uunjOxbOD1G/qqbzXU+M5FwrKipgjOMHZUgO4sOCtQBBW7IG2hlMVpuCEqtnCcmlmRQEt8oqqoeQWzld9orKIrx2hPacYRYtYhpu8id2D1OT+IVY5AIT8mmvF2VJlVxX1TFJhKZq/2rd1EbAyAC0ZmSzegwBGArYoFgP7/gN93zHHep5ijBpSEc/DqpJ+FHCW2lhrgL8ag76dHGi5170cCerzhEJKlhpJuOg3naoTHO0SUnahKInJrd/HcN/lg1DRNYZV3W4Y1leo65MtDhM/CxPf9zTWfFkOyFSEMzKbX83CkD3V9w1HVur5GO6SBXoHWkZh99aj6jYnrxJQ+bhL6+npE=
skip_cleanup: true
on:
branch: master
tags: true
after_deploy:
# Set a Lambda alias to the most recently deployed version.
- pip install awscli --upgrade --user
- export MOST_RECENT=$(aws lambda list-versions-by-function --function "${LAMBDA_NAME}" --max-items 10000 | node -e "let stdin=''; process.stdin.on('data',(chunk)=>{stdin+=chunk}).on('end',()=>{console.log(JSON.parse(stdin).Versions.pop().Version)})")
- aws lambda update-alias --function-name "${LAMBDA_NAME}" --name "${LAMBDA_ALIAS}" --function-version "${MOST_RECENT}"
notifications:
email: false
slack:
on_start: always
rooms:
- secure: Vy2JA/ktcFrTVRPzvyQwBh4Q65Hb6lBCbM8RMshxtdSRNSVnctRofN3BJ/QlutYV4EbsWA1jgQaSb3BH0IPF5Mg5MUkv8c1bbW+GbNzMqQG3td2CcjlYF4IVB5Zd+ONqEDQJLglF1z2kwyPh1ZmaWgSvYVc2yhrkqJl3oFdhertAM2sNF7om/KugrCQsjJm+jFhNY62P84jhed7+cmNT6xl9IMN9gZvUqssdvLubmdMTpgz9JBvbn1hAMFI3JjSaHEowAMolnE3mCSlC8aLSjfdX+lKR8vRJGXzURX74eUm7jEM0vHnwn1QrRTUZdUzUl6pP9yaPPDUHNf+Lsu/fZe/vIoQW5J31Wg9itunNF6dvUduYNnDsNWW0UqokmfUkmaHlLMf1VrAjKumahHG5eSmNkgoGaYHhygrWUD1lziwjGkXf9YnCV4lgdoU5m9c+h6NeXSEI8E7IMMZLr0cwAFkqW68PQPeEcus9xWdhBMLE5DZn85EIG78Qj3qF4HliJjtuDhQPr1PsaDoun/0s3MN3cKOnDh7iuKrJU51yXnrDvW0HXzZhhc78R/mU9V0n0Isx9hizuur9eXOcbVOFG5zOaIMlFNb0pEAIkw5kaIvgLRlUf8HUm00QVIevqx17idrTkWBWd5Znan/NmVym+wMD1IjhVvYV6aI7ZRIT5vY=
You can’t perform that action at this time.