Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions TaskfileCustom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
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