This repository has been archived by the owner on Jan 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8ee943
commit 42db7d9
Showing
4 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
import os | ||
from rkd.syntax import TaskAliasDeclaration as Task, TaskDeclaration | ||
from rkd.standardlib.python import imports as PythonImports | ||
from rkd.standardlib.docker import imports as DockerImports | ||
from rkd.standardlib import CallableTask | ||
from rkd.contract import ExecutionContext | ||
|
||
|
||
def create_union_task_as_method(context: ExecutionContext) -> bool: | ||
os.system('xdg-open https://iwa-ait.org') | ||
return True | ||
|
||
|
||
# optionally, import docker-related and python-related tasks from Python packages | ||
IMPORTS = [] + PythonImports() + DockerImports() | ||
|
||
# optionally, add a custom task written in pure Python | ||
IMPORTS += [TaskDeclaration(CallableTask(':create-union', create_union_task_as_method))] | ||
|
||
# optionally, create own tasks that are using other tasks | ||
TASKS = [ | ||
Task(':hello-world', [':sh', '-c', ''' | ||
set -x | ||
MSG="Hello world" | ||
echo "${MSG}" | ||
''']) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters