Reuse invoke tasks in your Jarbas projects and containers.
Project description
============
Jarbas tasks
============
This is a very small module defines a mechanism to inject invoke tasks to
Jarbas enabled projects. The jarbas-tasks cli is designed to be used as an
entry point of a docker container and is used as such in most Jarbas based
images. By default, it accepts the following sub-commands:
Start a bash shell:
$ jarbas-tasks bash # starts a bash shell
$ jarbas-tasks run # run the default "run" task (a bash shell, by default)
$ jarbas-tasks tasks # list all tasks
(jarbas-tasks can also be replaced by ``python3 -m jarbas_tasks``)
If the CWD has a tasks.py, the jarbas-tasks works basically as a replacement for
the "inv" command which adds a default implementation for the "bash", "run" and
"tasks" commands.
Run a task defined in tasks.py:
$ jarbas-tasks some-task
Creating a task package
=======================
By default, jarbas-tasks inject only the "run" and "bash" tasks to the list of
available tasks. Users can create *task packages* that can inject arbitrary
default tasks to the jarbas-tasks command.
In order to do so, create a Python package that expose the following entry
point:
setup(
...,
entry_points={
'jarbas-tasks': [
'mytask1 = mytask:task1', # Maps command name to task object
'mytask2 = mytask:task2',
]
},
}
The handler should be a regular invoke task declared anywhere in the module.
Jarbas tasks
============
This is a very small module defines a mechanism to inject invoke tasks to
Jarbas enabled projects. The jarbas-tasks cli is designed to be used as an
entry point of a docker container and is used as such in most Jarbas based
images. By default, it accepts the following sub-commands:
Start a bash shell:
$ jarbas-tasks bash # starts a bash shell
$ jarbas-tasks run # run the default "run" task (a bash shell, by default)
$ jarbas-tasks tasks # list all tasks
(jarbas-tasks can also be replaced by ``python3 -m jarbas_tasks``)
If the CWD has a tasks.py, the jarbas-tasks works basically as a replacement for
the "inv" command which adds a default implementation for the "bash", "run" and
"tasks" commands.
Run a task defined in tasks.py:
$ jarbas-tasks some-task
Creating a task package
=======================
By default, jarbas-tasks inject only the "run" and "bash" tasks to the list of
available tasks. Users can create *task packages* that can inject arbitrary
default tasks to the jarbas-tasks command.
In order to do so, create a Python package that expose the following entry
point:
setup(
...,
entry_points={
'jarbas-tasks': [
'mytask1 = mytask:task1', # Maps command name to task object
'mytask2 = mytask:task2',
]
},
}
The handler should be a regular invoke task declared anywhere in the module.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jarbas-tasks-0.1.0.tar.gz
(5.1 kB
view details)
File details
Details for the file jarbas-tasks-0.1.0.tar.gz.
File metadata
- Download URL: jarbas-tasks-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46fc00abd40665f16ed6d2b05a1de8222ecf1da9d868c39341475bd54da11b0d
|
|
| MD5 |
c83de17db3982f9c815afe23799a3171
|
|
| BLAKE2b-256 |
d6dbcda7c2e01874d883c36a7d8e38b1071c6b9da37397d90fc623c3f1d6f0c6
|