-
Notifications
You must be signed in to change notification settings - Fork 0
/
._travis._yml
43 lines (38 loc) · 1.11 KB
/
._travis._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
35
36
37
38
39
40
41
42
43
language: go
go:
- 1.16.3
sudo: required
services:
- docker
script:
- docker-compose -f docker-compose.dev.yml up
after_success:
- go vet ./...
- env GOOS=linux ARCH=amd64 go build ./impact.oscillator.go
- zip -r imposcg.zip .
- zipinfo imposcg.zip
- mkdir lambda-build 2>/dev/null
- mv imposcg.zip lambda-build/$(bash ./terraform/get_source_archive.bash)
before_deploy:
- cd $TRAVIS_BUILD_DIR
deploy:
- on:
branch: main
provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: felixdux-imposcg-lambda
skip_cleanup: true
region: $AWS_DEFAULT_REGION
local_dir: ./lambda-build
- on:
branch: main
provider: lamdba
function_name: "ImpactOscillator"
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
region: $AWS_DEFAULT_REGION
role: $IMPOSCG_IAM_ROLE
module_name: "impact" # Horrible fudge - travis constructs handler from <module_name>.<handler_name>, defaults module_name to 'index' and won't accept an empty string
handler_name: "oscillator"
runtime: "go1.x"