-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathTaskfile.yml
More file actions
50 lines (43 loc) · 1.1 KB
/
Taskfile.yml
File metadata and controls
50 lines (43 loc) · 1.1 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
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
---
version: '3'
silent: true
tasks:
dependencies:
desc: Install dependencies
dir: '{{.USER_WORKING_DIR}}'
cmds:
- uv sync
lint:
desc: Run lint with black
dir: '{{.USER_WORKING_DIR}}'
deps:
- dependencies
cmds:
- uv run ruff check .
fix-lint:
desc: Run lint with black
dir: '{{.USER_WORKING_DIR}}'
deps:
- dependencies
cmds:
- uv run ruff check --fix .
compose:
desc: 'Run docker-compose'
cmds:
- docker compose up --build -d
kind:
desc: 'Run app in kind'
dir: '{{.USER_WORKING_DIR}}'
vars:
PARENT_DIR:
sh: basename ${PWD}
cmds:
- docker compose build
- kind create cluster --name {{.PARENT_DIR}} || true
- |
# For each image
images=($(yq '.services | keys | map("{{.PARENT_DIR}}-" + .) | join(" ")' docker-compose.yaml))
kind load docker-image ${images[@]} --name {{.PARENT_DIR}}
- kubectl --context kind-{{.PARENT_DIR}} apply -k .