Skip to content

Commit

Permalink
Clean containers after run
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingersGat committed Jun 11, 2024
1 parent 5afbc22 commit 1931d38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def reset_data(c, debug=False):

hide = None if debug else 'both'

c.run("docker-compose -f test/docker-compose.yml run inventree-py-test-server invoke delete-data -f", hide=hide)
c.run("docker-compose -f test/docker-compose.yml run inventree-py-test-server invoke migrate", hide=hide)
c.run("docker-compose -f test/docker-compose.yml run inventree-py-test-server invoke import-fixtures", hide=hide)
c.run("docker-compose -f test/docker-compose.yml run --rm inventree-py-test-server invoke delete-data -f", hide=hide)
c.run("docker-compose -f test/docker-compose.yml run --rm inventree-py-test-server invoke migrate", hide=hide)
c.run("docker-compose -f test/docker-compose.yml run --rm inventree-py-test-server invoke import-fixtures", hide=hide)


@task(post=[reset_data])
Expand All @@ -50,7 +50,7 @@ def update_image(c, debug=True, reset=True):
hide = None if debug else 'both'

c.run("docker-compose -f test/docker-compose.yml pull", hide=hide)
c.run("docker-compose -f test/docker-compose.yml run inventree-py-test-server invoke update --skip-backup --no-frontend --skip-static", hide=hide)
c.run("docker-compose -f test/docker-compose.yml run --rm inventree-py-test-server invoke update --skip-backup --no-frontend --skip-static", hide=hide)

if reset:
reset_data(c)
Expand Down

0 comments on commit 1931d38

Please sign in to comment.