-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Taskfile.yml
98 lines (90 loc) · 3.92 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
88
89
90
91
92
93
94
95
96
97
98
# yaml-language-server: $schema=https://taskfile.dev/schema.json
# https://taskfile.dev
version: '3'
vars:
TESTING_DIR: './backend/Testing'
HG_REPO_DIR: './hgweb/repos'
DATA_DIR: './data'
includes:
k8s:
taskfile: ./deployment/Taskfile.yml
dir: ./deployment
gh:
dir: ./.github
taskfile: ./.github/Taskfile.yml
ui:
taskfile: ./frontend/Taskfile.yml
dir: ./frontend
api:
taskfile: ./backend/Taskfile.yml
dir: ./backend
hgweb:
taskfile: ./hgweb/Taskfile.yml
dir: ./hgweb
test:
taskfile: ./backend/Testing/Taskfile.yml
dir: ./backend/Testing
fw-lite:
taskfile: ./backend/FwLite/Taskfile.yml
dir: ./backend/FwLite
tasks:
setup:
deps: [ setup-win, setup-unix ]
cmds:
- git config blame.ignoreRevsFile .git-blame-ignore-revs
- git submodule init
- git submodule update --recursive
- git config --local submodule.recurse true
- kubectl --context=docker-desktop apply -f deployment/setup/namespace.yaml
- kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.15.0/cert-manager.yaml
- docker build -t local-dev-init data/
setup-win:
platforms: [ windows ]
cmds:
- powershell "if (!(test-path deployment/local-dev/local.env)) { cp deployment/local-dev/local.env.template deployment/local-dev/local.env }"
- powershell -File download.ps1 sena-3 'https://drive.google.com/uc?export=download&id=1I-hwc0RHoQqW774gbS5qR-GHa1E7BlsS' 'BEC5131799DB07BF8D84D8FC1F3169FB2574F2A1F4C37F6898EAB563A4AE95B8'
- powershell -File download.ps1 empty 'https://drive.google.com/uc?export=download&id=1p73u-AGdSwNkg_5KEv9-4iLRuN-1V-LD' 'F4EB48D2C7B3294DCA93965F14F058E56D797F38D562B86CF0372F774E1B486B'
- powershell -File download.ps1 elawa 'https://drive.usercontent.google.com/download?export=download&id=1Jk-eSDho8ATBMS-Kmfatwi-MWQth26ro&confirm=t' "E3608F1E3188CE5FDB166FBF9D5AAD06558DB68EFA079FB453881572B50CB8E3"
setup-unix:
platforms: [ linux, darwin ]
cmds:
- "test -f deployment/local-dev/local.env || cp deployment/local-dev/local.env.template deployment/local-dev/local.env"
- wget -c -O {{.DATA_DIR}}/sena-3.zip 'https://drive.google.com/uc?export=download&id=1I-hwc0RHoQqW774gbS5qR-GHa1E7BlsS'
- wget -c -O {{.DATA_DIR}}/empty.zip 'https://drive.google.com/uc?export=download&id=1p73u-AGdSwNkg_5KEv9-4iLRuN-1V-LD'
- wget -c -O {{.DATA_DIR}}/elawa.zip 'https://drive.usercontent.google.com/download?export=download&id=1Jk-eSDho8ATBMS-Kmfatwi-MWQth26ro&confirm=t'
setup-local-env:
cmds:
- echo "HONEYCOMB_API_KEY=__REPLACE__" > deployment/local-dev/local.env
- echo "#OTEL_SDK_DISABLED=true" >> deployment/local-dev/local.env
- echo "GOOGLE_OAUTH_CLIENT_ID=__REPLACE__.apps.googleusercontent.com" >> deployment/local-dev/local.env
- echo "GOOGLE_OAUTH_CLIENT_SECRET=__REPLACE__" >> deployment/local-dev/local.env
# k8s
up:
interactive: true
cmds:
- skaffold dev --cleanup=false --kube-context docker-desktop
# dev
infra-up:
desc: 'Starts infrastructure for our ui and api, if you want port forwarding use k8s:infra-forward'
cmds:
- skaffold run --cleanup=false --kube-context docker-desktop --profile=infra
backend-up:
desc: Starts entire backend for our ui (including the LexBox api)
cmds:
- skaffold dev --cleanup=false --kube-context docker-desktop --profile=no-frontend
ui-dev:
aliases: [ ui ]
desc: The single command for local ui development
dir: ./frontend
deps: [ backend-up, ui:only ]
interactive: true
# api
api-dev:
aliases: [ api ]
desc: The single command for local api development
deps: [ infra-up, api:only, k8s:infra-forward ]
interactive: true
local-web-app-for-develop:
deps: [ ui:viewer-dev, fw-lite:local-web-app-for-develop, ui:https-oauth-authority ]
local-web-app:
deps: [ ui:viewer-dev, fw-lite:local-web-app, ui:https-oauth-authority ]