Skip to content

Instantly share code, notes, and snippets.

@vaz-ar
Created May 12, 2023 08:09
Show Gist options
  • Save vaz-ar/dac367545b16b905f070d56391acaae3 to your computer and use it in GitHub Desktop.
Save vaz-ar/dac367545b16b905f070d56391acaae3 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
"""
Invoke init module
"""
from invoke import Collection
from tasks import testcheck
# One unnamed Collection is always the namespace root
ns = Collection()
ns.add_collection(testcheck)
❯ pwd
/tmp/inv_test
❯ tree
.
├── invoke.yaml
└── tasks
├── __init__.py
└── testcheck.py
2 directories, 3 files
test1: value1
test2:
var: value2
from invoke import task
@task
def check(ctx):
print(ctx.test1)
print(ctx.test2.var)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment