forked from danskernesdigitalebibliotek/dpl-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
87 lines (71 loc) · 2.42 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: '3'
dotenv: [".task.env"]
vars:
COMMIT_COUNT:
sh: git rev-list --count origin/main
# Constructing docker image name.
DOCKER_IMAGE_PREFIX: "{{ .RELEASE_IMAGE_REGISTRY }}/{{ .DOCKER_IMAGE_NAMESPACE }}"
# Constructing docker image name.
RELEASE_IMAGE_NAME: '{{.RELEASE_IMAGE_NAME | default "dpl-cms-source"}}'
RELEASE_FULL_NAME: '{{.RELEASE_IMAGE_REGISTRY}}/{{.RELEASE_IMAGE_NAME}}:{{.RELEASE_IMAGE_TAG}}'
# Docker file selection
DOCKER_COMPOSE_FILES_DEFAULT: '-f docker-compose.yml'
DOCKER_COMPOSE_FILES: '{{.DOCKER_COMPOSE_FILES | default .DOCKER_COMPOSE_FILES_DEFAULT }}'
tasks:
dev:install:
summary: Install packages
cmds:
- yarn install
dev:start:
summary: Install and run docker compose
cmds:
- task dev:install
- docker compose {{ .DOCKER_COMPOSE_FILES }} up --detach
- yarn dev
dev:stop:
summary: Stop docker compose environment
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES }} stop
dev:up:
summary: Install run docker compose
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES }} up --detach
dev:down:
summary: Stop and remove docker compose environment
cmds:
# DNS proxies such as Dory may hang on to the network for a bit which
# causes the process to fail. Wait and retry if that is the case
- docker compose {{ .DOCKER_COMPOSE_FILES }} down --volumes --remove-orphans || (sleep 3 && docker-compose down)
dev:mocks:start:
summary: Start wiremocks
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES }} up wiremock-fbs --detach
- docker compose {{ .DOCKER_COMPOSE_FILES }} up wiremock-publizon --detach
- docker compose {{ .DOCKER_COMPOSE_FILES }} up wiremock --detach
dev:mocks:stop:
summary: Stop wiremocks
cmds:
- docker compose {{ .DOCKER_COMPOSE_FILES }} stop wiremock-fbs
- docker compose {{ .DOCKER_COMPOSE_FILES }} stop wiremock-publizon
- docker compose {{ .DOCKER_COMPOSE_FILES }} stop wiremock
dev:storybook:
summary: Run storybook in development mode
cmds:
- yarn start:storybook:dev
dev:reset:
summary: Install development environment and clean up.
cmds:
- task dev:down
- yarn clean
- rm -rf node_modules
- task dev:up
dev:test:
summary: Run tests
cmds:
- yarn test
dev:lint:
summary: Run linters
cmds:
- yarn lint:js
- yarn lint:scss
- yarn lint:markdown