-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
44 lines (39 loc) · 1.31 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
version: '3'
vars:
PIP_TOOLS_IMAGE: snapi-pip-tools
tasks:
build-pip-tools-image:
desc: Build docker image with Python toolchain
sources:
- containers/pip-tools/Dockerfile
cmds:
- cmd: echo "[+] Building pip-tools image..."
silent: true
- cmd: docker build --rm -t {{.PIP_TOOLS_IMAGE}} -f containers/pip-tools/Dockerfile .
silent: true
build-snapi-pkg-image:
desc: Build docker image with Python toolchain and snapi package
sources:
- containers/snapi-pkg/Dockerfile
- pkg/**/*
cmds:
- cmd: echo "[+] Building snapi image..."
silent: true
- cmd: docker build --rm -t snapi -f containers/snapi-pkg/Dockerfile .
silent: true
pip-compile:
desc: Create or upgrade pinned requirements
cmds:
- task: build-pip-tools-image
- cmd: >
docker run -it --rm -v $(pwd):/app {{.PIP_TOOLS_IMAGE}}
pip-compile -P --resolver backtracking -o pkg/requirements.txt pkg/pyproject.toml
- cmd: >
docker run -it --rm -v $(pwd):/app {{.PIP_TOOLS_IMAGE}}
pip-compile -P --extra dev --resolver backtracking -o pkg/requirements-dev.txt pkg/pyproject.toml
shell:
cmds:
- task: build-snapi-pkg-image
- cmd: >
docker run -it --rm -v $(pwd):/app snapi
sh