-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfileCustom.yaml
More file actions
29 lines (26 loc) · 1.09 KB
/
TaskfileCustom.yaml
File metadata and controls
29 lines (26 loc) · 1.09 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
---
version: '3'
tasks:
container:install:
desc: "Install package in container (then restart)"
summary: >
Note that `cmemc admin workspace python uninstall cmem-plugin-base` will
uninstall the dev-version and reveal the shipped package version again.
cmds:
- task clean build
- docker cp dist/{{.PACKAGE_FILE}} {{.DI_CONTAINER}}:/tmp/
- docker exec -t {{.DI_CONTAINER}} bash -c "{{.PIP_COMMAND}} /tmp/{{.PACKAGE_FILE}}"
- docker exec -t {{.DI_CONTAINER}} bash -c "rm -f /tmp/{{.PACKAGE_FILE}}"
- docker restart {{.DI_CONTAINER}}
preconditions:
- sh: '[ "{{.DI_RUNNING}}" == "true" ]'
msg: "Container {{.DI_CONTAINER}} not running ({{.DI_RUNNING}})"
vars:
DI_CONTAINER: dockerlocalhost-dataintegration-1
DI_RUNNING:
sh: docker inspect -f '{{ "{{" }}.State.Running{{ "}}" }}' {{.DI_CONTAINER}}
PACKAGE: cmem_plugin_base
PACKAGE_VERSION:
sh: poetry version -s
PACKAGE_FILE: "{{.PACKAGE}}-{{.PACKAGE_VERSION}}.tar.gz"
PIP_COMMAND: pip install --target /data/python-packages -q --upgrade