-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
102 lines (86 loc) · 2.09 KB
/
Taskfile.yml
File metadata and controls
102 lines (86 loc) · 2.09 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# https://taskfile.dev
version: "3"
vars:
DOCKER_IMAGE_NAME: lambda-application
DOCKER_IMAGE_TAG:
sh: ./scripts/get-version.sh
DOCKER_IMAGE: "{{.DOCKER_IMAGE_NAME}}:{{.DOCKER_IMAGE_TAG}}"
AWS_ACCOUNT_ID:
sh: aws sts get-caller-identity --query "Account" --output text || echo ""
AWS_REGION:
sh: aws configure get region || echo ""
tasks:
default:
cmds:
- task: setup
- task: format
- task: lint
- task: build
- task: unit-test
- task: integration-test
silent: true
setup:
run: once
cmds:
- ./scripts/setup.sh
get-version:
run: once
cmds:
- ./scripts/get-version.sh
format:
run: once
cmds:
- ./scripts/format.sh
lint:
run: once
cmds:
- ./scripts/lint.sh
build:
run: once
cmds:
- ./scripts/build-image.sh {{.DOCKER_IMAGE_NAME}}
unit-test:
run: once
cmds:
- ./scripts/unit-test.sh
integration-test-no-build:
run: once
cmds:
- task: start-local-instance
- defer: { task: stop-local-instance }
- ./scripts/integration-test.sh
integration-test:
run: once
deps:
- build
cmds:
- task: start-local-instance
- defer: { task: stop-local-instance }
- ./scripts/integration-test.sh
start-local-instance:
desc: Start a local Lambda instance for testing
run: once
cmds:
- ./scripts/local-instance.sh start {{.DOCKER_IMAGE}}
stop-local-instance:
desc: Stop the local Lambda instance
run: once
cmds:
- ./scripts/local-instance.sh stop {{.DOCKER_IMAGE}}
release-ecr:
desc: Release the Docker image to ECR
run: once
deps:
- build
cmds:
- ./scripts/release-ecr.sh {{.DOCKER_IMAGE_NAME}} {{.AWS_ACCOUNT_ID}} {{.AWS_REGION}}
release-ecr-no-build:
desc: Release the Docker image to ECR without building it first
run: once
cmds:
- ./scripts/release-ecr.sh {{.DOCKER_IMAGE_NAME}} {{.AWS_ACCOUNT_ID}} {{.AWS_REGION}}
release-github:
desc: Create a GitHub release
run: once
cmds:
- ./scripts/release-github.sh