generated from saic-oss/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Taskfile.yml
66 lines (56 loc) · 1.58 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
57
58
59
60
61
62
63
64
65
66
# https://taskfile.dev
version: "3"
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
updates:
desc: Run automated check for updates
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 updates
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"