forked from saic-oss/anvil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
56 lines (47 loc) · 1.24 KB
/
Taskfile.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
44
45
46
47
48
49
50
51
52
53
54
55
56
# https://taskfile.dev
version: "2"
vars:
DOCKER_REGISTRY: docker.io
GROUP_NAME: saicoss
IMAGE_NAME: anvil
FULLY_QUALIFIED_IMAGE_NAME: "{{.DOCKER_REGISTRY}}/{{.GROUP_NAME}}/{{.IMAGE_NAME}}"
tasks:
validate:
desc: Validate the pre-commit hooks
cmds:
- pre-commit install
- pre-commit run -a
build:
desc: Build the docker image (does not work on codefresh)
dir: src/docker
vars:
TAG: '{{ coalesce .TAG "<no value>" }}'
preconditions:
- sh: test "{{.TAG}}" != "<no value>"
msg: Required variable 'TAG' not set
cmds:
- docker build --pull . -t {{.FULLY_QUALIFIED_IMAGE_NAME}}:{{.TAG}}
test:
desc: Run automated tests (does not work on codefresh)
vars:
TAG: '{{ coalesce .TAG "<no value>" }}'
preconditions:
- sh: test "{{.TAG}}" != "<no value>"
msg: Required variable 'TAG' not set
cmds:
- docker run --rm -v $(pwd):/workdir -w /workdir {{.FULLY_QUALIFIED_IMAGE_NAME}}:{{.TAG}} shellspec
codefresh:test:
cmds:
- shellspec
secure:
desc: Run automated security checks
cmds:
- echo "N/A"
deliver:
desc: Deliver artifact
cmds:
- echo "N/A"
deploy:
desc: Deploy project
cmds:
- echo "N/A"