Mercurial > code > home > repos > homeauto
diff service/piNode/tasks.py @ 1431:af2d0249a2cc
wip for pytype support and separate device run loops on piNode
Ignore-this: 9aa9a3a7e715afefbc858050e02c4c62
darcs-hash:998d048d88b8cbc9e5fcd7576dec8687a9960e8c
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Sat, 10 Aug 2019 23:33:50 -0700 |
parents | 445e24e8c8bb |
children | 0da337780f22 |
line wrap: on
line diff
--- a/service/piNode/tasks.py Thu Aug 08 16:54:46 2019 -0700 +++ b/service/piNode/tasks.py Sat Aug 10 23:33:50 2019 -0700 @@ -9,6 +9,10 @@ def build_image(ctx): ctx.run(f'docker build --network=host -t {TAG} .') +@task +def build_image_check(ctx): + ctx.run(f'docker build --network=host -f Dockerfile.check -t bang6:5000/pinode_check:latest .') + @task(pre=[build_image]) def push_image(ctx): ctx.run(f'docker push {TAG}') @@ -17,6 +21,14 @@ def shell(ctx): ctx.run(f'docker run --name={JOB}_shell --rm -it --cap-add SYS_PTRACE --net=host --uts=host --cap-add SYS_RAWIO --device /dev/mem --privileged {TAG} /bin/bash', pty=True) +@task(pre=[build_image_check]) +def check(ctx): + ctx.run(f'docker run --name={JOB}_check --rm -it -v `pwd`:/opt --net=host bang6:5000/pinode_check:latest pytype -d import-error mypkg/piNode.py', pty=True) + +@task(pre=[build_image_check]) +def check_shell(ctx): + ctx.run(f'docker run --name={JOB}_check --rm -it -v `pwd`:/opt --net=host bang6:5000/pinode_check:latest /bin/bash', pty=True) + @task(pre=[build_image]) def local_run(ctx):